这是indexloc提供的服务,不要输入任何密码
Skip to content

Feature Request: Add option to specify custom output filename (not just directory) #509

@NoahTheGinger

Description

@NoahTheGinger

Current Behavior

Currently, humanify only allows specifying an output directory with -o, and the output file is always named deobfuscated.js:

humanify openai -o ./output input.js
# Creates: ./output/deobfuscated.js

Problem

This makes it difficult to:

  1. Compare deobfuscation results from different models on the same file
  2. Process multiple files without overwriting previous results
  3. Keep track of which output corresponds to which input/model combination

Proposed Solution

Add a new option (e.g., --output-file or enhance -o) to specify the complete output path including filename:

# New option
humanify openai --output-file ./results/myfile-gpt4.js input.js

# Or enhance existing -o to detect file vs directory
humanify openai -o ./results/myfile-gpt4.js input.js

Use Case Examples

# Compare different models
humanify openai --model gpt-4.1-nano --output-file compare-nano.js input.js
humanify gemini --model gemini-2.0-flash --output-file compare-gemini.js input.js

# Process multiple files
humanify openai --output-file processed/file1-clean.js file1.min.js
humanify openai --output-file processed/file2-clean.js file2.min.js

Alternative

If changing the CLI is not preferred, even just preserving the input filename would help:

humanify openai -o ./output input.js
# Could create: ./output/input-deobfuscated.js (instead of deobfuscated.js)

Would love to hear your thoughts on this! Happy to help implement if you think it's a good addition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions