Command Reference
This page provides a comprehensive reference for all command-line options available in promptprep.
Core Options
Option |
Description |
|---|---|
|
Directory to scan for code files (default: current directory) |
|
Output file path (default: |
|
Copy output to clipboard instead of saving to a file |
File Selection Options
Option |
Description |
|---|---|
|
Only include these specific files (comma-separated list of relative paths) |
|
Skip these directories (comma-separated list) |
|
Only include files with these extensions (comma-separated list) |
|
Skip files larger than this size in MB (default: 100.0) |
|
Launch terminal-based file browser for visual selection |
Content Processing Options
Option |
Description |
|---|---|
|
Extract only function/class signatures and docstrings |
|
Include comments in the output (default) |
|
Strip all comments from the output |
|
Add statistics about your codebase at the beginning |
|
Count tokens for AI model context limits (requires |
|
Tokenizer model to use (default: |
Output Formatting Options
Option |
Description |
|---|---|
|
Output format: |
|
Add line numbers to code in the output |
|
Custom template file (required if using |
Incremental Processing Options
Option |
Description |
|---|---|
|
Only process files that have changed since last run |
|
Unix timestamp of last run (e.g., |
Diff Generation Options
Option |
Description |
|---|---|
|
Compare with a previous output file and show changes |
|
Number of unchanged lines to show around changes (default: 3) |
|
Save diff to a file instead of showing on screen |
Configuration Management Options
Option |
Description |
|---|---|
|
Save current options to a configuration file |
|
Load options from a configuration file |
Other Options
Option |
Description |
|---|---|
|
Show version number and exit |
|
Show help message and exit |
Option Details
Directory Selection
promptprep -d PATH, --directory PATH
Specify the directory to scan for code files. If not provided, promptprep will use the current directory.
Output Options
promptprep -o FILE, --output-file FILE
Specify the file where the output should be saved. If not provided, promptprep will save to full_code.txt.
promptprep -c, --clipboard
Send the output directly to the clipboard instead of saving to a file. This is useful when you want to immediately paste the output into another application.
File Selection
promptprep -i LIST, --include-files LIST
Only process the specified files. Provide a comma-separated list of relative paths. For example:
promptprep -i "src/main.py,src/utils.py,README.md"
promptprep -e LIST, --exclude-dirs LIST
Skip the specified directories. Provide a comma-separated list of directory names. For example:
promptprep -e "node_modules,venv,.git,__pycache__"
promptprep -x LIST, --extensions LIST
Only include files with the specified extensions. Provide a comma-separated list of extensions. For example:
promptprep -x ".py,.js,.md"
promptprep -m SIZE, --max-file-size SIZE
Skip files larger than the specified size in MB. Default is 100.0 MB. For example:
promptprep -m 5 # Skip files larger than 5 MB
promptprep --interactive
Launch a terminal-based file browser to select files visually.
Content Processing
promptprep --summary-mode
Extract only function/class signatures and docstrings, skipping implementation details.
promptprep --include-comments # Default behavior
promptprep --no-include-comments # Strip all comments
Control whether comments are included in the output.
promptprep --metadata
Add statistics about your codebase at the beginning of the output.
promptprep --count-tokens
promptprep --token-model MODEL # Default: cl100k_base (GPT-4)
Count how many tokens your code will use when sent to AI models. Requires --metadata.
Output Formatting
promptprep --format FORMAT
Choose the output format. Available options:
plain: Simple text format (default)markdown: GitHub-friendly Markdown with code blockshtml: Complete webpage with basic stylinghighlighted: Syntax-highlighted code (requires pygments)custom: Custom format using a template file
promptprep --line-numbers
Add line numbers to the code in the output.
promptprep --format custom --template-file FILE
Use a custom template file for the output.
Incremental Processing
promptprep --incremental
promptprep --last-run-timestamp TIMESTAMP
Only process files that have changed since the last run.
Diff Generation
promptprep --diff PREV_FILE
promptprep --diff-context LINES # Default: 3
promptprep --diff-output FILE
Compare with a previous output file and show what changed.
Configuration Management
promptprep [options] --save-config [FILE]
Save the current options to a configuration file for later use.
promptprep --load-config [FILE] [additional options]
Load options from a configuration file. Additional options will override the loaded ones.