Introduce built-in templates for enhanced configuration options, support JSONC format
This commit is contained in:
28
docs/templates.md
Normal file
28
docs/templates.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Config Templates
|
||||
|
||||
Fence includes built-in config templates for common use cases. Templates are embedded in the binary, so you can use them directly without copying files.
|
||||
|
||||
## Using templates
|
||||
|
||||
Use the `-t` / `--template` flag to apply a template:
|
||||
|
||||
```bash
|
||||
# Use a built-in template
|
||||
fence -t npm-install npm install
|
||||
|
||||
# Wraps Claude Code
|
||||
fence -t code -- claude
|
||||
|
||||
# List available templates
|
||||
fence --list-templates
|
||||
```
|
||||
|
||||
You can also copy and customize templates from [`internal/templates/`](/internal/templates/).
|
||||
|
||||
## Available Templates
|
||||
|
||||
| Template | Description |
|
||||
|----------|-------------|
|
||||
| `code` | Production-ready config for AI coding agents (Claude Code, Codex, Copilot, etc.) |
|
||||
| `git-readonly` | Blocks destructive commands like `git push`, `rm -rf`, etc. |
|
||||
| `local-dev-server` | Allow binding and localhost outbound; allow writes to workspace/tmp |
|
||||
Reference in New Issue
Block a user