-
-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Description
Feature Request: Configuration file support for default options
Problem
Using the same flags repeatedly is tedious:
# Python projects
files-to-prompt . --ignore "*.pyc" --ignore "__pycache__" --ignore ".venv" --ignore "*.egg-info" --ignore ".pytest_cache"
# Node projects
files-to-prompt . --ignore "node_modules" --ignore "dist" --ignore "*.min.js" --ignore "package-lock.json"
Proposed Solution
Support configuration files to set defaults:
.files-to-prompt.toml
in project directory~/.config/files-to-prompt/config.toml
for user defaults- CLI args override config values
Example
.files-to-prompt.toml:
[defaults]
ignore = [
"*.pyc",
"__pycache__",
".venv",
"*.egg-info",
".pytest_cache",
]
extensions = ["py", "md", "toml"]
Usage:
files-to-prompt . # Uses config
files-to-prompt . --ignore-gitignore # CLI overrides config
files-to-prompt . --no-config # Skips config
Implementation Proposal
- TOML format (built-in for Python 3.11+, tomli for older versions)
- Config discovery walks up directories (like .gitignore)
- Precedence: CLI > project config > user config > defaults
- All CLI options supported in config
Metadata
Metadata
Assignees
Labels
No labels