The touchfs touch
command provides an explicit way to mark files for content generation, equivalent to using the standard touch
command within a TouchFS filesystem.
touchfs touch [options] file [file ...]
-p, --parents
: Create parent directories as needed
# Example: Create file in new directory structure
touchfs touch src/components/Button.tsx -p
-f, --force
: Skip confirmation for non-touchfs paths
# Example: Skip confirmation prompts
touchfs touch README.md --force
--debug-stdout
: Enable debug output to stdout
# Example: Debug touch operations
touchfs touch app.py --debug-stdout
-m, --max-tokens
: Maximum number of tokens to include in context
# Example: Limit context size
touchfs touch README.md --max-tokens 4000
# Mark a single file for generation
touchfs touch README.md
# Mark multiple files
touchfs touch app.py tests/test_app.py
# Enter interactive mode for a directory
touchfs touch src/components
# This will:
# 1. Generate filename suggestions based on directory context
# 2. Display an interactive menu for selection
# 3. Allow multiple selections
# 4. Option to regenerate suggestions
# Create and mark multiple related files
touchfs touch -p \
src/models/user.py \
src/models/product.py \
tests/test_models.py
# Mark files outside TouchFS filesystem
touchfs touch --force external/file.txt
# Create with parent directories
touchfs touch -p -f new/project/setup.py
The command automatically builds context from the parent directory of the first specified file. This context is used for:
# Files will be marked with awareness of existing project context
touchfs touch \
src/components/NewFeature.tsx \ # Context from src/components/
src/hooks/useNewFeature.ts \ # Uses same context
tests/NewFeature.test.tsx # Uses same context
When a single directory is provided as an argument, the command enters interactive mode:
Filename Suggestions:
Selection Menu:
Iterative Creation:
The touch command differs from the generate command in several ways: