CLI Reference
Command-line interface for llmist.
Installation
Section titled “Installation”bunx @llmist/clinpx @llmist/cliCommands
Section titled “Commands”init - Initialize Configuration
Section titled “init - Initialize Configuration”Create a starter configuration file at ~/.llmist/cli.toml:
bunx @llmist/cli initnpx @llmist/cli initcomplete - Simple Completion
Section titled “complete - Simple Completion”Stream a single response without agent loop:
bunx @llmist/cli complete "Explain TypeScript generics" --model haikunpx @llmist/cli complete "Explain TypeScript generics" --model haikuOptions:
| Flag | Short | Description | Default |
|---|---|---|---|
--model <model> | -m | Model name or alias | gpt-5-nano |
--system <prompt> | -s | System prompt | none |
--temperature <n> | -t | Temperature (0-2) | Provider default |
--max-tokens <n> | Max output tokens | Provider default | |
--quiet | -q | Suppress all output except content | false |
agent - Agent with Gadgets
Section titled “agent - Agent with Gadgets”Run the full agent loop with tools:
bunx @llmist/cli agent "How many floppies for DOOM.ZIP?" --gadget ./floppy.ts --model sonnetnpx @llmist/cli agent "How many floppies for DOOM.ZIP?" --gadget ./floppy.ts --model sonnetOptions:
| Flag | Short | Description | Default |
|---|---|---|---|
--model <model> | -m | Model name or alias | gpt-5-nano |
--system <prompt> | -s | System prompt | none |
--temperature <n> | -t | Temperature (0-2) | Provider default |
--max-iterations <n> | -i | Max agent iterations | 10 |
--gadget <path> | -g | Gadget file (repeatable) | none |
--no-builtins | Disable all built-in gadgets | false | |
--no-builtin-interaction | Disable AskUser gadget | false | |
--quiet | -q | Suppress output except TellUser | false |
Built-in Gadgets:
| Gadget | Description |
|---|---|
AskUser | Asks the user a question and waits for response |
TellUser | Outputs a message with type indicator. Set done=true to end conversation |
gadget - Test and Inspect Gadgets
Section titled “gadget - Test and Inspect Gadgets”bunx @llmist/cli gadget run ./floppy.tsbunx @llmist/cli gadget info ./floppy.tsbunx @llmist/cli gadget validate ./floppy.tsnpx @llmist/cli gadget run ./floppy.tsnpx @llmist/cli gadget info ./floppy.tsnpx @llmist/cli gadget validate ./floppy.tsConfiguration File
Section titled “Configuration File”The CLI loads configuration from ~/.llmist/cli.toml:
[complete]model = "anthropic:claude-sonnet-4-5"temperature = 0.7
[agent]model = "anthropic:claude-sonnet-4-5"max-iterations = 15gadget = ["~/gadgets/common-tools.ts"]
# Custom command[code-review]type = "agent"description = "Review code for bugs and best practices."system = "You are a senior code reviewer."max-iterations = 5Inheritance
Section titled “Inheritance”Sections can inherit settings:
[agent]model = "anthropic:claude-sonnet-4-5"max-iterations = 15
[code-review]inherits = "agent"temperature = 0.3system = "You are a code reviewer."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"}) %>'Global Options
Section titled “Global Options”| Flag | Description |
|---|---|
--log-level <level> | Log level: silly, trace, debug, info, warn, error, fatal |
--log-file <path> | Path to log file |
--version | Show version number |
--help | Show help |
Environment Variables
Section titled “Environment Variables”export OPENAI_API_KEY="sk-..."export ANTHROPIC_API_KEY="sk-ant-..."export GEMINI_API_KEY="..."
# Loggingexport LLMIST_LOG_LEVEL="debug"export LLMIST_LOG_FILE="./app.log"Stdin Input
Section titled “Stdin Input”Pipe content to llmist:
cat code.ts | bunx @llmist/cli complete "Review this code"git diff | bunx @llmist/cli complete "Summarize changes"cat code.ts | npx @llmist/cli complete "Review this code"git diff | npx @llmist/cli complete "Summarize changes"Model Shortcuts
Section titled “Model Shortcuts”bunx @llmist/cli complete "Hello" --model haikubunx @llmist/cli complete "Hello" --model sonnetbunx @llmist/cli complete "Hello" --model gpt4obunx @llmist/cli complete "Hello" --model flashnpx @llmist/cli complete "Hello" --model haikunpx @llmist/cli complete "Hello" --model sonnetnpx @llmist/cli complete "Hello" --model gpt4onpx @llmist/cli complete "Hello" --model flashInteractive TUI
Section titled “Interactive TUI”When running in an interactive terminal, llmist agent provides a rich Terminal User Interface with keyboard navigation, real-time status, and debug views.
See TUI Overview for full documentation and keyboard shortcuts.
See Also
Section titled “See Also”- CLI Configuration - TOML, gadget approval, environment variables
- CLI Gadgets - Writing local gadgets
- Gadget Ecosystem - Third-party packages (Dhalsim, etc.)
- Gadgets Guide - Complete gadget development reference