Add files or folders to .stampignore to exclude them from context compilation.
stamp ignore <path1> [path2] ... [options]# Add a single file to .stampignore
stamp ignore src/secrets.ts
# Add multiple files/folders
stamp ignore src/config/credentials.ts src/secrets/
# Add glob patterns
stamp ignore "**/secrets.ts" "**/*.key"
# Quiet mode (suppress verbose output)
stamp ignore src/secrets.ts --quiet<path1> [path2] ...- One or more file or folder paths to ignore (relative to project root). Supports glob patterns.
| Option | Alias | Description |
|---|---|---|
--quiet |
-q |
Suppress verbose output (show only errors) |
--help |
-h |
Show help message |
stamp ignore adds file or folder paths to .stampignore, which tells LogicStamp Context to exclude those files from context compilation. This is useful for:
- Excluding files with secrets - Files that contain sensitive information (API keys, passwords, tokens) that shouldn't be included in context bundles
- Excluding large generated files - Files that are too large or not useful for AI context
- Excluding test files - Test files that aren't needed for understanding the codebase structure
- Excluding temporary files - Temporary or build artifacts
Key features:
- Creates
.stampignoreif it doesn't exist - The file is automatically created in your project root - Prevents duplicates - Won't add the same path twice
- Normalizes paths - Automatically normalizes paths (removes
./prefix, converts backslashes to forward slashes) - Supports glob patterns - Can use glob patterns like
**/*.keyor**/secrets.ts - Shows feedback - Displays which paths were added (unless using
--quiet)
- Reads existing
.stampignore(if it exists) to check for duplicates - Normalizes all paths to ensure consistent formatting
- Filters out duplicates - Only adds paths that aren't already in
.stampignore - Writes updated
.stampignorewith the new paths added - Shows feedback about what was added (unless
--quietis used)
# Add a single file
stamp ignore src/secrets.ts
# Output:
# ✅ Created .stampignore and added 1 path(s)
# Added paths:
# - src/secrets.ts# Add multiple files and folders
stamp ignore src/config/credentials.ts src/secrets/ config/api-keys.json
# Output:
# ✅ Created .stampignore and added 3 path(s)
# Added paths:
# - src/config/credentials.ts
# - src/secrets/
# - config/api-keys.json# Add glob patterns to ignore all files matching a pattern
stamp ignore "**/secrets.ts" "**/*.key" "**/*.pem"
# Output:
# ✅ Created .stampignore and added 3 path(s)
# Added paths:
# - **/secrets.ts
# - **/*.key
# - **/*.pem# If .stampignore already exists, new paths are appended
stamp ignore src/new-secrets.ts
# Output:
# ✅ Added 1 path(s) to .stampignore
# Added paths:
# - src/new-secrets.ts# Trying to add a path that already exists
stamp ignore src/secrets.ts
# Output (if already in .stampignore):
# ℹ️ All specified paths are already in .stampignore# Suppress verbose output
stamp ignore src/secrets.ts --quiet
# No output (unless there's an error)
# .stampignore is still created/updatedFiles listed in .stampignore are automatically excluded when running stamp context:
# Files in .stampignore are automatically excluded
stamp context
# Output will show:
# ℹ️ Excluded 3 file(s) via .stampignore.stampignore uses JSON format:
{
"ignore": [
"src/secrets.ts",
"config/api-keys.json",
"**/*.key"
]
}All paths are relative to the project root. The file is automatically created and managed by stamp ignore - you typically don't need to edit it manually.
Paths are automatically normalized:
./src/secrets.ts→src/secrets.ts(removes./prefix)src\config\keys.json→src/config/keys.json(converts backslashes to forward slashes)src//secrets.ts→src/secrets.ts(removes duplicate slashes)
This ensures consistent formatting regardless of how you specify paths.
.stampignore supports glob patterns for matching multiple files:
**/*.key- Matches all.keyfiles in any directory**/secrets.ts- Matches allsecrets.tsfiles in any directorysrc/**/*.test.ts- Matches all.test.tsfiles undersrc/config/*.json- Matches all.jsonfiles directly inconfig/
See stampignore.md for more details on glob pattern syntax.
- Use for secrets and sensitive files - The primary use case is excluding files that contain secrets or sensitive information
- Commit
.stampignoreto version control - This helps your team know which files are excluded - Use
stamp ignoreafter security scans - After runningstamp security scan, review the report and usestamp ignore <file>to exclude files with detected secrets - Review periodically - Regularly review
.stampignoreto ensure it's still accurate - Use glob patterns wisely - Glob patterns are powerful but can exclude more than intended if not careful
- stampignore.md - Complete
.stampignorefile format and usage guide - context.md - How
.stampignoreaffects context compilation - security-scan.md - Security scanning to detect secrets in your codebase