CLI Configuration
The llmist CLI is configured through TOML files and environment variables.
Configuration File
Section titled “Configuration File”The CLI loads configuration from ~/.llmist/cli.toml:
# Initialize with default configbunx @llmist/cli init# Initialize with default confignpx @llmist/cli initBasic Structure
Section titled “Basic Structure”[complete]model = "anthropic:claude-sonnet-4-5"temperature = 0.7
[agent]model = "anthropic:claude-sonnet-4-5"max-iterations = 15gadget = ["~/gadgets/common-tools.ts"]Inheritance
Section titled “Inheritance”Sections can inherit settings from parent sections:
[agent]model = "anthropic:claude-sonnet-4-5"max-iterations = 15
[code-review]inherits = "agent"temperature = 0.3system = "You are a code reviewer."Custom Commands
Section titled “Custom Commands”Create custom commands with a type field:
[code-review]type = "agent"description = "Review code for bugs and best practices."system = "You are a senior code reviewer."max-iterations = 5gadget = ["~/gadgets/code-tools.ts"]Run with:
bunx @llmist/cli code-review "Review my PR"npx @llmist/cli code-review "Review my PR"Prompt Templates
Section titled “Prompt Templates”Define reusable prompts with Eta templating:
[prompts]base-assistant = "You are a helpful AI assistant."expert = """<%~ include("@base-assistant") %>You are also an expert in <%= it.field %>."""
[my-expert]system = '<%~ include("@expert", {field: "TypeScript"}) %>'Gadget Approval
Section titled “Gadget Approval”The gadget approval system provides a safety layer for potentially dangerous gadget executions.
Approval Modes
Section titled “Approval Modes”| Mode | Behavior |
|---|---|
allowed | Gadget executes immediately |
denied | Gadget is rejected, LLM receives denial message |
approval-required | User is prompted before execution |
Default Behavior
Section titled “Default Behavior”By default, these gadgets require approval:
RunCommand- Executes shell commandsWriteFile- Creates or modifies filesEditFile- Edits existing files
All other gadgets default to allowed.
Configuration
Section titled “Configuration”[agent]gadget-approval = { WriteFile = "allowed", Shell = "denied", ReadFile = "allowed" }Wildcard Default
Section titled “Wildcard Default”Set default mode for all unconfigured gadgets:
[agent]gadget-approval = { "*" = "denied", ReadFile = "allowed", FloppyDisk = "allowed" }Example Configurations
Section titled “Example Configurations”High-Security Mode:
[agent]gadget-approval = { WriteFile = "denied", EditFile = "denied", RunCommand = "denied", ReadFile = "allowed"}Trust All Mode:
[agent]gadget-approval = { "*" = "allowed" }Selective Approval:
[agent]gadget-approval = { RunCommand = "approval-required", WriteFile = "allowed", DeleteFile = "denied"}Approval Prompts
Section titled “Approval Prompts”For file operations, a colored diff is shown:
🔒 Approval required: Modify src/index.ts
--- src/index.ts (original)+++ src/index.ts (modified)@@ -1,3 +1,4 @@ import { foo } from './foo';+import { bar } from './bar';
⏎ approve, or type to reject:- Press Enter or type
yto approve - Type any other text to reject (sent to LLM as feedback)
Non-Interactive Mode
Section titled “Non-Interactive Mode”When running non-interactively (e.g., in scripts or CI), approval-required gadgets are automatically denied.
Environment Variables
Section titled “Environment Variables”API Keys
Section titled “API Keys”export OPENAI_API_KEY="sk-..."export ANTHROPIC_API_KEY="sk-ant-..."export GEMINI_API_KEY="..."Logging
Section titled “Logging”export LLMIST_LOG_LEVEL="debug" # silly, trace, debug, info, warn, error, fatalexport LLMIST_LOG_FILE="./app.log"export LLMIST_LOG_RESET="true" # Clear log file on startGlobal CLI Flags
Section titled “Global CLI Flags”These flags work with any command:
| Flag | Description |
|---|---|
--log-level <level> | Set log level |
--log-file <path> | Path to log file |
--version | Show version number |
--help | Show help |
See Also
Section titled “See Also”- CLI Reference - All CLI commands
- CLI Gadgets - Writing gadgets for CLI
- Logging - Detailed logging configuration