@inference-gateway/cli 0.217.0 โ†’ 0.219.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +69 -1487
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  An agentic command-line assistant that writes code, understands project context, and uses tools to perform real tasks.
11
11
 
12
- [๐Ÿ“– Documentation](https://docs.inference-gateway.com/cli) ยท [๐Ÿš€ Quick Start](#quick-start) ยท [๐Ÿ› ๏ธ Tools Reference](docs/tools-reference.md) ยท [๐Ÿ’ฌ Discussions](https://github.com/orgs/inference-gateway/discussions)
12
+ [๐Ÿ“– Documentation](https://docs.inference-gateway.com/cli) ยท [๐Ÿš€ Quick Start](#quick-start) ยท [๐Ÿงญ Features](#features) ยท [๐Ÿ’ฌ Discussions](https://github.com/orgs/inference-gateway/discussions)
13
13
 
14
14
  <br/>
15
15
 
@@ -19,268 +19,18 @@ An agentic command-line assistant that writes code, understands project context,
19
19
 
20
20
  </div>
21
21
 
22
- ## โš ๏ธ Warning
23
-
24
- > **Early Development Stage**: This project is in its early development
25
- > stage and breaking changes are expected until it reaches a stable version.
26
- >
27
- > Always use pinned versions by specifying a specific version tag when
28
- > downloading binaries or using install scripts.
29
-
30
- ## Table of Contents
31
-
32
- - [Features](#features)
33
- - [Installation](#installation)
34
- - [Quick Start](#quick-start)
35
- - [Commands](#commands)
36
- - [Tools for LLMs](#tools-for-llms)
37
- - [Configuration](#configuration)
38
- - [Cost Tracking](#cost-tracking)
39
- - [Tool Approval System](#tool-approval-system)
40
- - [Shortcuts](#shortcuts)
41
- - [Channels (Remote Messaging)](#channels-remote-messaging)
42
- - [Heartbeat (Periodic Wake-Up)](#heartbeat-periodic-wake-up)
43
- - [Agent Skills](#agent-skills)
44
- - [Computer Use](#computer-use)
45
- - [Persistent Memory](#persistent-memory)
46
- - [Reminders & Command Hooks](#reminders--command-hooks)
47
- - [Global Flags](#global-flags)
48
- - [Examples](#examples)
49
- - [Development](#development)
50
- - [License](#license)
51
-
52
- ## Features
53
-
54
- - **Automatic Gateway Management**: Automatically downloads and runs the Inference Gateway binary (no Docker required!)
55
- - **Zero-Configuration Setup**: Start chatting immediately with just your API keys in a `.env` file
56
- - **Interactive Chat**: Chat with models using an interactive interface
57
- - **Status Monitoring**: Check gateway health and resource usage
58
- - **Conversation History**: Store and retrieve past conversations with multiple storage backends
59
- - [Conversation Storage](docs/conversation-storage.md) - Detailed storage backend documentation
60
- - [Conversation Title Generation](docs/conversation-title-generation.md) - AI-powered title generation system
61
- - [Database Migrations](docs/database-migrations.md) - Schema migration system for the SQLite/Postgres backends
62
- - **Conversation Versioning**: Navigate back in time to previous conversation points (double ESC)
63
- - View message history with timestamps
64
- - Restore conversation to any previous user message
65
- - Permanent deletion of messages after restore point
66
- - [Learn more โ†’](docs/conversation-versioning.md)
67
- - **Configuration Management**: Manage gateway settings via YAML config
68
- - **Project Initialization**: Set up local project configurations
69
- - **Tool Execution**: LLMs can execute allowed commands and tools - [See all tools โ†’](docs/tools-reference.md)
70
- - **Tool Approval System**: User approval workflow for sensitive operations with real-time diff visualization
71
- - **Agent Modes**: Four operational modes for different workflows:
72
- - **Standard Mode** (default): Normal operation with all configured tools and approval checks
73
- - **Plan Mode**: Read-only mode for planning and analysis without execution - [Learn more โ†’](docs/plan-mode.md)
74
- - **Auto-Accept Mode**: All tools auto-approved for rapid execution (YOLO mode)
75
- - **Auto+Judge Mode**: No human approves tool calls - an LLM judge decides gated calls - [Learn more โ†’](docs/judge-mode.md)
76
- - Toggle between modes with **Shift+Tab**
77
- - **Token Usage Tracking**: Accurate token counting with polyfill support for providers that don't return usage metrics
78
- - **Cost Tracking**: Real-time cost calculation for API usage with per-model breakdown and configurable pricing
79
- - **Inline History Auto-Completion**: Smart command history suggestions with inline completion
80
- - **GitHub Issue References (`#`)**: Type `#` in chat to open a dropdown of the current
81
- repo's open issues. Selecting one inserts a `#N` token that is highlighted in the input
82
- and, on submit, expanded inline into the issue's title, body, and recent comments - so
83
- the agent works from full context without a redundant `gh issue view` lookup. Gracefully
84
- no-ops when `gh` is not installed or the repo has no remote.
85
- - **Customizable Keybindings**: Fully configurable keyboard shortcuts for the chat interface
86
- - **Selectable Status Indicators**: Press `โ†“` in chat to select the indicators below the input and
87
- open the matching view with `enter` (model โ†’ model selection, theme โ†’ theme selection,
88
- `A2A:` โ†’ registered agents, `Tools:` โ†’ available tools, `โš™` jobs โ†’ task management)
89
- - **Model Thinking Visualization**: When models use extended thinking,
90
- their internal reasoning process is displayed as collapsible blocks above responses (toggle with **ctrl+k** by default, configurable via `display_toggle_thinking`)
91
- - **Extensible Shortcuts System**: Create custom commands with AI-powered snippets - [Learn more โ†’](docs/shortcuts-guide.md)
92
- - **MCP Server Support**: Direct integration with Model Context Protocol servers for extended tool capabilities.
93
- Servers must speak MCP `2026-07-28`; the gateway's `/mcp` works as a single entry for all its servers -
94
- [Learn more โ†’](docs/mcp-integration.md)
95
- - **Custom Tools**: Add tools written in any language with one YAML manifest per tool in `~/.infer/tools/` or a
96
- project's `.infer/tools/` / `.agents/tools/` - no SDK or server needed - [Learn more โ†’](docs/custom-tools.md)
97
- - **Web Terminal Interface**: Browser-based terminal access with tabbed sessions for remote access and multi-session workflows - [Learn more โ†’](docs/web-terminal.md)
98
- - **Remote Messaging Channels**: Control the agent from Telegram, WhatsApp, and other platforms via a pluggable channel system - [Learn more โ†’](docs/channels.md)
99
- - **Speech-to-Text (Whisper)**: Dictate into chat with `/voice` and transcribe inbound Telegram voice messages, locally and offline -
100
- off by default - [Learn more โ†’](docs/speech-to-text.md)
101
- - **Text-to-Speech (Qwen3-TTS)**: Turn text into a spoken WAV locally and offline, with zero-shot voice cloning
102
- from a short reference recording - off by default - [Learn more โ†’](docs/text-to-speech.md)
103
- - **Text-to-Music**: Compose a music clip from a text prompt through the gateway's Music API -
104
- off by default - [Learn more โ†’](docs/text-to-music.md)
105
- - **Scheduled Tasks**: Ask the agent (over Telegram, etc.) to run a prompt on a cron schedule and deliver the result back through the same channel -
106
- recurring ("send me a quote every morning") or one-off ("remind me at 6pm today") - [Learn more โ†’](docs/scheduling.md)
107
- - **Heartbeat (Periodic Wake-Up)**: Wake the agent on a fixed interval to check for pending todos and background work,
108
- with a separate configurable system prompt - off by default - [Learn more โ†’](docs/heartbeat.md)
109
- - **Agent Skills**: Drop-in `SKILL.md` instruction folders the agent discovers and loads on demand;
110
- install them straight from GitHub with `infer skills install` - on by default - [Learn more โ†’](docs/skills.md)
111
- - **Plugins**: Install Claude Code-format plugins (skills + an always-on `AGENTS.md` ruleset) from GitHub with
112
- `infer plugins install owner/repo` - content only, plugin code is never executed - [Learn more โ†’](docs/plugins.md)
113
- - **Persistent Memory**: Cross-session memory stored as individual Markdown fact-files with an
114
- auto-maintained `MEMORY.md` index that is injected at session start - on by default - [Learn more โ†’](#persistent-memory)
115
- - **Subagents**: Spawn parallel `infer headless` subprocesses from chat with the `Agent` tool to fan out
116
- independent work (research, edits, investigations) and fold their results back into the conversation;
117
- define reusable presets as Markdown files in `.infer/agents/` (Claude Code / Gemini CLI compatible)
118
- - [Learn more โ†’](docs/subagents.md)
119
- - **Computer Use**: Let the agent drive the desktop - mouse, keyboard, screenshots, app focus - across
120
- macOS, X11, and Wayland - off by default - [Learn more โ†’](#computer-use)
121
- - **Reminders & Command Hooks**: Inject system reminders or run shell commands at agent-loop hook
122
- points to enforce project conventions - [Learn more โ†’](#reminders--command-hooks)
22
+ > **Early development stage**: breaking changes are expected until the project reaches a stable version.
23
+ > Always pin a specific version tag when downloading binaries or using install scripts.
123
24
 
124
25
  ## Installation
125
26
 
126
- ### Using npm/npx (Recommended)
127
-
128
- If you already have Node.js (>= 18), run the CLI with npx - no Go toolchain or manual
129
- download required. The matching native binary is fetched and cached on first use:
27
+ The recommended install is npm/npx - the matching native binary is fetched and cached on first use:
130
28
 
131
29
  ```bash
132
- # Run without installing
133
- npx @inference-gateway/cli@latest --help
134
30
  npx @inference-gateway/cli@latest chat
135
31
  ```
136
32
 
137
- Or install it globally:
138
-
139
- ```bash
140
- npm install -g @inference-gateway/cli
141
- infer --help
142
- ```
143
-
144
- > **Not recommended for production.** For production or CI, prefer the
145
- > [install script](#using-install-script), [Nix flake](#using-nix-flake--flox),
146
- > [container image](#using-container-image), or [building from source](#build-from-source). Prebuilt binaries cover Linux, macOS, and Windows on
147
- > amd64/arm64.
148
-
149
- ### Using Go Install
150
-
151
- ```bash
152
- go install github.com/inference-gateway/cli/cmd/infer@latest
153
- ```
154
-
155
- This installs the binary as `infer`.
156
-
157
- ### Using Nix Flake / Flox
158
-
159
- With Nix (flakes enabled), run directly without installing:
160
-
161
- ```bash
162
- nix run github:inference-gateway/cli
163
-
164
- # Pin a specific release
165
- nix run github:inference-gateway/cli/v0.135.0
166
- ```
167
-
168
- Or install into your profile:
169
-
170
- ```bash
171
- nix profile install github:inference-gateway/cli
172
- ```
173
-
174
- With [Flox](https://flox.dev), pin it in your environment manifest (`.flox/env/manifest.toml`):
175
-
176
- ```toml
177
- [install]
178
- infer.flake = "github:inference-gateway/cli"
179
- ```
180
-
181
- Then `flox activate` makes `infer` available in the environment. Pin a release by appending the tag: `github:inference-gateway/cli/v0.135.0`.
182
-
183
- ### Using Container Image
184
-
185
- ```bash
186
- # Create network and deploy inference gateway first
187
- docker network create inference-gateway
188
- docker run -d --name inference-gateway --network inference-gateway \
189
- --env-file .env \
190
- ghcr.io/inference-gateway/inference-gateway:latest
191
-
192
- # Pull and run the CLI
193
- docker pull ghcr.io/inference-gateway/cli:latest
194
- docker run -it --rm --network inference-gateway ghcr.io/inference-gateway/cli:latest chat
195
- ```
196
-
197
- ### Using Install Script
198
-
199
- **Linux/macOS:**
200
-
201
- ```bash
202
- # Latest version
203
- curl -fsSL https://raw.githubusercontent.com/inference-gateway/cli/main/install.sh | bash
204
-
205
- # Specific version
206
- curl -fsSL https://raw.githubusercontent.com/inference-gateway/cli/main/install.sh | bash -s -- --version v0.77.0
207
-
208
- # Custom installation directory
209
- curl -fsSL https://raw.githubusercontent.com/inference-gateway/cli/main/install.sh | bash -s -- --install-dir $HOME/.local/bin
210
- ```
211
-
212
- **Windows (PowerShell 5.1+ / pwsh):**
213
-
214
- ```powershell
215
- # Latest version
216
- .\install.ps1
217
-
218
- # Specific version
219
- .\install.ps1 -Version v0.1.0
220
-
221
- # Custom installation directory
222
- $env:INSTALL_DIR = "C:\tools"; .\install.ps1
223
- ```
224
-
225
- Or run directly from GitHub:
226
-
227
- ```powershell
228
- # Download and run
229
- iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/inference-gateway/cli/main/install.ps1'))
230
- ```
231
-
232
- ### Manual Download
233
-
234
- Download the latest release binary for your platform from the [releases page](https://github.com/inference-gateway/cli/releases).
235
-
236
- Available binaries:
237
-
238
- | Platform | Binary |
239
- | -------- | ------ |
240
- | Linux amd64 | `infer-linux-amd64` |
241
- | Linux arm64 | `infer-linux-arm64` |
242
- | macOS amd64 (Intel) | `infer-darwin-amd64` |
243
- | macOS arm64 (Apple Silicon) | `infer-darwin-arm64` |
244
- | Windows amd64 | `infer-windows-amd64` (rename to `infer.exe`) |
245
- | Windows arm64 | `infer-windows-arm64` (rename to `infer.exe`) |
246
-
247
- **Verify the binary** (recommended for security):
248
-
249
- ```bash
250
- # Download binary and checksums
251
- curl -L -o infer-darwin-amd64 \
252
- https://github.com/inference-gateway/cli/releases/latest/download/infer-darwin-amd64
253
- curl -L -o checksums.txt \
254
- https://github.com/inference-gateway/cli/releases/latest/download/checksums.txt
255
-
256
- # Verify checksum
257
- shasum -a 256 infer-darwin-amd64
258
- grep infer-darwin-amd64 checksums.txt
259
-
260
- # Install
261
- chmod +x infer-darwin-amd64
262
- sudo mv infer-darwin-amd64 /usr/local/bin/infer
263
- ```
264
-
265
- For advanced verification with Cosign signatures, see [Binary Verification Guide](docs/binary-verification.md).
266
-
267
- ### Build from Source
268
-
269
- ```bash
270
- git clone https://github.com/inference-gateway/cli.git
271
- cd cli
272
- go build -o infer ./cmd/infer
273
- sudo mv infer /usr/local/bin/
274
- ```
275
-
276
- On Windows, build with:
277
-
278
- ```powershell
279
- git clone https://github.com/inference-gateway/cli.git
280
- cd cli
281
- go build -o infer.exe ./cmd/infer
282
- # The binary is at .\infer.exe
283
- ```
33
+ See **[Installation](docs/installation.md)** for production and CI installs, and **[Binary Verification](docs/binary-verification.md)** to verify a download.
284
34
 
285
35
  ## Quick Start
286
36
 
@@ -290,12 +40,11 @@ go build -o infer.exe ./cmd/infer
290
40
  infer init
291
41
  ```
292
42
 
293
- This creates the shared `~/.infer/` configuration directory. All state
294
- (conversations, logs, history, artifacts) lives under `~/.infer/` too; a
295
- project `.infer/` is an optional config override layer you create with
296
- `infer config set --project` when a project needs different settings.
43
+ This creates the shared `~/.infer/` configuration directory. All state (conversations, logs, history,
44
+ artifacts) lives there, and a project `.infer/` is an optional override layer you create with
45
+ `infer config set --project`.
297
46
 
298
- 2. **Set up your environment** (create `.env` file):
47
+ 2. **Set up your environment** (create a `.env` file):
299
48
 
300
49
  ```env
301
50
  ANTHROPIC_API_KEY=your_key_here
@@ -303,18 +52,8 @@ OPENAI_API_KEY=your_key_here
303
52
  DEEPSEEK_API_KEY=your_key_here
304
53
  ```
305
54
 
306
- Provider keys resolve in this order, first hit wins: the system environment, the
307
- project `.env`, then the userspace fallback `~/.infer/auth.yaml` - a flat YAML
308
- map of provider key env vars, so you can keep keys in one place across all
309
- projects (or run `infer` outside any project):
310
-
311
- ```yaml
312
- ANTHROPIC_API_KEY: sk-ant-...
313
- OPENAI_API_KEY: sk-...
314
- ```
315
-
316
- A missing `auth.yaml` changes nothing, and a malformed one is ignored with a
317
- logged warning. Keep the file private (`chmod 600 ~/.infer/auth.yaml`).
55
+ Provider keys resolve in this order, first hit wins: the system environment, the project `.env`, then the userspace
56
+ `~/.infer/auth.yaml` fallback - see [Provider API Keys](docs/configuration-reference.md#provider-api-keys).
318
57
 
319
58
  3. **Start chatting**:
320
59
 
@@ -322,1227 +61,70 @@ logged warning. Keep the file private (`chmod 600 ~/.infer/auth.yaml`).
322
61
  infer chat
323
62
  ```
324
63
 
325
- ### Next Steps
326
-
327
- Now that you're up and running, explore these guides:
328
-
329
- - **[Commands Reference](docs/commands-reference.md)** - Complete command documentation
330
- - **[Tools Reference](docs/tools-reference.md)** - Available tools for LLMs
331
- - **[Custom Tools](docs/custom-tools.md)** - Add your own tools in any language through YAML manifests
332
- - **[Configuration Guide](docs/configuration-reference.md)** - Full configuration options
333
- - **[Directory Structure](docs/directory-structure.md)** - Map of every file and subdirectory the CLI creates under `.infer/` and `~/.infer/`
334
- - **[Web Terminal](docs/web-terminal.md)** - Browser-based terminal interface
335
- - **[Shortcuts Guide](docs/shortcuts-guide.md)** - Custom shortcuts and AI-powered snippets
336
- - **[A2A Agents](docs/agents-configuration.md)** - Agent-to-agent communication setup
337
- - **[Markdown Subagents](docs/subagents.md)** - Reusable subagent presets in `.infer/agents/<name>.md`
338
- - **[Telemetry](docs/telemetry.md)** - OpenTelemetry traces/metrics and baggage propagation
339
- - **[AG-UI Output](docs/ag-ui-output.md)** - AG-UI protocol event stream for the headless agent
340
-
341
- ## Commands
342
-
343
- The CLI provides several commands for different workflows. For detailed documentation, see [Commands Reference](docs/commands-reference.md).
344
-
345
- ### Core Commands
346
-
347
- **`infer init`** - Initialize the userspace baseline configuration
348
-
349
- ```bash
350
- infer init # Seed the shared ~/.infer/ baseline
351
- infer init --overwrite # Re-seed the baseline files
352
- ```
353
-
354
- **`infer chat`** - Start an interactive chat session with model selection
355
-
356
- ```bash
357
- # Terminal mode (default)
358
- infer chat
359
-
360
- # Resume a previous chat session
361
- infer conversations list # Find session IDs
362
- infer chat --session-id abc-123-def
363
-
364
- # Web terminal mode with browser interface
365
- infer chat --web
366
- infer chat --web --port 8080 # Custom port
367
- ```
368
-
369
- **Features:** Model selection, real-time streaming, scrollable history, four agent modes (Standard/Plan/Auto-Accept/Auto+Judge).
370
- Select text by holding Shift (Option on macOS terminals) while dragging.
371
-
372
- **Web Mode Features:**
373
-
374
- - Browser-based terminal using xterm.js
375
- - Multiple independent tabbed sessions
376
- - Automatic session cleanup on inactivity
377
- - Each tab manages its own `infer chat` process with isolated containers
378
- - Access from any device on the network
379
- - Responsive terminal sizing with horizontal padding
380
-
381
- **`infer headless`** - Execute autonomous tasks in background mode
382
-
383
- ```bash
384
- # Start new agent sessions
385
- infer headless "Please fix the github issue 38"
386
- infer headless --model "openai/gpt-4" "Implement feature from issue #42"
387
- infer headless "Analyze this UI issue" --files screenshot.png
388
-
389
- # Resume existing sessions
390
- infer conversations list # Find session IDs
391
- infer headless "continue fixing the bug" --session-id abc-123-def
392
- infer headless "analyze new logs" --session-id abc-123 --files error.log
393
- ```
394
-
395
- **Features:** Autonomous execution, multimodal support (images/files), parallel tool execution, **session resumption**.
396
-
397
- ### Configuration Commands
398
-
399
- **`infer config`** - Manage CLI configuration settings
400
-
401
- ```bash
402
- # Read any value (effective config: defaults + ~/.infer + .infer + env)
403
- infer config get agent.model
404
- infer config get # dump the whole effective config
405
-
406
- # Agent configuration
407
- infer config set agent.model "deepseek/deepseek-v4-pro"
408
- infer config set agent.max_turns 100
409
-
410
- # Tool management
411
- infer config set tools.enabled true
412
- infer config set tools.bash.enabled true
413
- infer config set tools.safety.require_approval true
414
-
415
- # Write a project-level override into ./.infer/config.yaml instead
416
- infer config set agent.model "openai/gpt-4o" --project
417
- ```
418
-
419
- > System prompts live in `prompts.yaml` (e.g. `prompts.agent.system_prompt`), not
420
- > in `config.yaml`, so they are edited there rather than via `config set`.
421
-
422
- See [Commands Reference](docs/commands-reference.md#configuration-management) for all configuration options.
423
-
424
- ### Agent Management
425
-
426
- **`infer agents`** - Manage A2A (Agent-to-Agent) agent configurations
427
-
428
- ```bash
429
- infer agents init # Initialize agents configuration
430
- infer agents add browser-agent # Add an agent from the registry with defaults
431
- infer agents add browser-agent --tag lightpanda # Pick another image tag (engine/version)
432
- infer agents add custom https://... # Add a custom agent
433
- infer agents list # List all agents
434
- ```
435
-
436
- For detailed A2A setup, see [A2A Agents Configuration](docs/agents-configuration.md); for how
437
- connections are established and tasks polled, see [A2A Connections](docs/a2a-connections.md).
438
-
439
- ### Utility Commands
440
-
441
- **`infer status`** - Check gateway health and resource usage
442
-
443
- ```bash
444
- infer status
445
- ```
446
-
447
- **`infer conversations`** - List and manage conversation history
448
-
449
- ```bash
450
- infer conversations list # List all saved conversations
451
- infer conversations list --limit 20 # List first 20 conversations
452
- infer conversations list --offset 40 -l 20 # Paginate: conversations 41-60
453
- infer conversations list --format json # Output as JSON
454
-
455
- infer conversations show <session-id> # Show a conversation's entries
456
- infer conversations show <session-id> --include-hidden # Include hidden entries (e.g. system reminders)
457
- infer conversations show <session-id> --format json # One JSON object per line (jq-friendly)
458
- ```
459
-
460
- **`infer conversation-title`** - Manage AI-powered conversation titles
461
-
462
- ```bash
463
- infer conversation-title generate # Generate titles for all conversations
464
- infer conversation-title status # Show generation status
465
- ```
466
-
467
- **`infer skills`** - Manage Agent Skills (reusable `SKILL.md` instruction folders)
468
-
469
- ```bash
470
- infer skills list # List discovered skills
471
- infer skills install skill-creator # Install a skill from GitHub
472
- infer skills install acme/internal-comms --user # Install to ~/.infer/skills
473
- infer skills uninstall pdf # Remove a skill by name
474
- ```
475
-
476
- See [Agent Skills](#agent-skills) and [docs/skills.md](docs/skills.md) for the format.
477
-
478
- **`infer plugins`** - Manage Claude Code-format plugins (skills + instruction rulesets)
479
-
480
- ```bash
481
- infer plugins install DietrichGebert/ponytail # Install a plugin from GitHub
482
- infer plugins list # List installed plugins
483
- infer plugins disable ponytail # Unload its skills + instructions
484
- infer plugins update # Re-fetch all plugins
485
- infer plugins remove ponytail # Remove entirely
486
- ```
487
-
488
- See [docs/plugins.md](docs/plugins.md) for the mapping and security model.
489
-
490
- **`infer avatars`** - Create and manage the TextToVideo avatar library (`~/.infer/avatars/<name>/` portrait folders)
491
-
492
- ```bash
493
- infer avatars create presenter --from me.jpg # Photo + generated three-quarter views
494
- infer avatars list # List avatars and their images
495
- infer avatars list --format json # Machine-readable listing
496
- infer avatars delete presenter # Remove an avatar folder
497
- ```
498
-
499
- See [docs/text-to-video.md](docs/text-to-video.md#avatar-library) for the layout. With `text_to_video.create_avatar` the agent
500
- can build avatars itself through the `CreateAvatar` tool.
501
-
502
- **`infer export`** - Export a conversation to a Markdown file
503
-
504
- ```bash
505
- infer conversations list # Find the session ID
506
- infer export <session-id> # Writes ~/.infer/projects/<slug>/exports/chat_export_<timestamp>.md
507
- ```
508
-
509
- **`infer insights`** - Analyze past sessions for repeatable workflows and recurring tool failures
510
-
511
- ```bash
512
- infer insights # Every saved session
513
- infer insights 7d # Only the last 7 days (also 24h, 30d)
514
- infer insights --model <id> # Pick the model; defaults to agent.model
515
- ```
516
-
517
- Writes a markdown report to `~/.infer/insights/`. Needs conversation storage enabled.
518
-
519
- Reads the conversation store, the telemetry directory, the log directory and the persistent
520
- memory index (`MEMORY.md`, capped at `memory.max_chars`). `infer reset insights` runs the
521
- analysis before the wipe, so the facts survive in the report even though the memory directory
522
- does not.
523
-
524
- The logs are the only source that sees a failure which never reached a saved session - a startup
525
- crash, a gateway that never came up, a background job that died. They are deduplicated before the
526
- model sees them: records at or above `logging.insights_min_level` (default `warn`) inside the
527
- window are folded by normalized message, so lines differing only in a path, an id or a number
528
- become one group with a count, a first/last timestamp and one verbatim sample. The report's
529
- frontmatter states how many records were read (`log_records`) and how many groups survived
530
- (`log_groups`). Only the structured `app-*.log` and `daemon-*.log` files and their `.gz` archives
531
- are read; `gateway-*.log` is raw subprocess output with no level or timestamp to filter on, and
532
- the gateway's own failures are logged through zap into `app-*.log` anyway.
533
-
534
- The analysis runs on `agent.max_tokens` (default 8192) rather than a fixed budget โ€” a
535
- reasoning model spends that budget thinking before it answers, and too small a value fails
536
- the run outright. The written analysis is capped at 200 lines / 16000 characters, so a
537
- model that ignores the requested length cannot flood the report.
538
-
539
- Each report records what it cost to produce in its own frontmatter
540
- (`analysis_prompt_tokens`, `analysis_completion_tokens`, `analysis_total_tokens`, and
541
- `analysis_reasoning_tokens` where the provider breaks it out), so the price of a run is
542
- visible in the artifact rather than guessed at.
543
-
544
- **`infer reset`** - Wipe all local runtime state and start fresh
545
-
546
- ```bash
547
- infer reset # Preview every path that would be deleted; deletes nothing
548
- infer reset confirm # Perform the wipe
549
- infer reset insights # Analyze past sessions first, then preview (takes --model)
550
- ```
551
-
552
- Clears the runtime directories of **every project on this machine**, the persistent memory directory
553
- and the local conversation store. Per-project runtime directories are deleted rather than recreated
554
- empty, and a project whose working directory no longer exists is removed entirely.
555
-
556
- Config, custom shortcuts, skills and saved insights are preserved; remote stores (postgres, redis, d1)
557
- are skipped, and a git-backed memory directory syncs back from its remote on the next run.
558
-
559
- The `/reset` and `/insights` chat shortcuts are thin YAML wrappers over these commands, written to
560
- `~/.infer/shortcuts/` by `infer init` - edit them like any other shortcut.
561
-
562
- **`infer version`** - Display CLI version information
563
-
564
- ```bash
565
- infer version
566
- ```
567
-
568
- ## Tools for LLMs
569
-
570
- When tool execution is enabled, LLMs can use various tools to interact with your system. Below is a
571
- summary of available tools. For detailed documentation, parameters, and examples, see
572
- [Tools Reference](docs/tools-reference.md).
573
-
574
- <div align="center">
575
-
576
- <img src="./assets/tui-tools.png" width="760" alt="A Grep tool call executed by the agent, with its result and the assistant's summary" />
577
-
578
- *The agent running a `Grep` tool call - results are collapsible with `ctrl+o`*
579
-
580
- </div>
581
-
582
- Tools are grouped by category below. Many are gated behind a config flag (noted per group);
583
- the always-available set is registered for every session. There is **no built-in GitHub tool** -
584
- use the `gh` CLI through Bash (or the built-in `/scm` shortcuts) for GitHub operations.
585
-
586
- **Core file & search** (always available):
587
-
588
- | Tool | Purpose | Approval |
589
- | ------ | --------- | ---------- |
590
- | **Read** | Read file contents with line ranges | No |
591
- | **Write** | Write content to files | Yes |
592
- | **Edit** | Exact string replacements in files | Yes |
593
- | **MultiEdit** | Multiple atomic edits to a single file | Yes |
594
- | **Delete** | Delete files and directories | Yes |
595
- | **Grep** | Search files with regex (ripgrep/Go) | No |
596
- | **Tree** | Display directory structure | No |
597
-
598
- **Shell** (Bash is always available; the background-shell trio needs `tools.bash.background_shells.enabled`):
599
-
600
- | Tool | Purpose | Approval |
601
- | ------ | --------- | ---------- |
602
- | **Bash** | Execute shell commands (per-mode allow-list) | Optional |
603
- | **BashOutput** | Read new output from a running background shell | Yes |
604
- | **KillShell** | Terminate a background shell | Yes |
605
- | **ListShells** | List background shells and their state | Yes |
606
- | **Wait** | Block until a condition is met (shells exit, file event, or check command succeeds) - no LLM round-trips wasted | No |
607
-
608
- **Task & planning** (`AskUserQuestion` needs `tools.ask_user_question.enabled`):
609
-
610
- | Tool | Purpose | Approval |
611
- | ------ | --------- | ---------- |
612
- | **TodoWrite** | Create and manage task lists | No |
613
- | **RequestPlanApproval** | Submit a plan for approval and persist it (plan mode) | No |
614
- | **AskUserQuestion** | Ask the user multiple-choice questions | No |
615
- | **RequestApproval** | Ask the user to override a judge rejection once (judge mode) | No |
616
-
617
- **Web** (`WebSearch`/`WebFetch` need their respective config flag):
618
-
619
- | Tool | Purpose | Approval |
620
- | ------ | --------- | ---------- |
621
- | **WebSearch** | Search the web (DuckDuckGo/Google) | Yes |
622
- | **WebFetch** | Fetch content from a URL | No |
623
-
624
- `WebFetch` does not require approval by default; set `tools.web_fetch.require_approval: true` to require it.
625
-
626
- **Subagents** (the `Agent` tool and its companions, enabled by default):
627
-
628
- | Tool | Purpose | Approval |
629
- | ------ | --------- | ---------- |
630
- | **Agent** | Spawn an `infer headless` subprocess to run work in parallel | Yes |
631
- | **ListSubagents** | List spawned subagents and their status | No |
632
- | **GetSubagentResult** | Re-read a finished subagent's last message | No |
633
- | **ReadSubagentScreen** | Capture an interactive subagent's terminal screen | No |
634
- | **SendSubagentInput** | Type into an interactive subagent's TUI | Yes |
635
- | **CloseSubagent** | Stop a subagent or tidy a finished pane | Yes |
636
- | **ApproveSubagent** | Relay an approval decision to a waiting subagent | Yes |
637
-
638
- **Computer Use** (require `computer_use.enabled`; these bypass the approval prompt and run silently):
639
-
640
- | Tool | Purpose | Approval |
641
- | ------ | --------- | ---------- |
642
- | **Computer** | Read the accessibility tree, press labelled controls, capture screenshots, and control mouse/keyboard | Configurable |
643
- | **GetLatestFrame** | Read the latest frame from a named source (screen, camera directory) | No |
644
- | **RecordStart** | Record the screen, a window, or a region to MP4 (needs `computer_use.recording.enabled`) | Configurable |
645
- | **RecordStop** | Stop the recording and return the file path, duration, and size | Configurable |
646
-
647
- **Media** (each gated by its own flag; all output is written to disk, never played aloud):
648
-
649
- | Tool | Purpose | Approval | Enabled by |
650
- | ------ | --------- | ---------- | ------------ |
651
- | **ImageGeneration** | Generate an image from a prompt into `~/.infer/projects/<project-slug>/artifacts/` | No | `tools.image_generation.enabled` |
652
- | **ImageEdit** | Edit an existing image and save the result | No | `tools.image_edit.enabled` |
653
- | **ImageVariation** | Produce a variation of an existing image | No | `tools.image_variation.enabled` |
654
- | **TextToSpeech** | Synthesize speech to a WAV (local llama-tts or gateway Audio API), optionally cloning a voice | No | `text_to_speech.enabled` |
655
-
656
- **Memory, scheduling & A2A** (each gated by its own flag):
657
-
658
- | Tool | Purpose | Approval | Enabled by |
659
- | ------ | --------- | ---------- | ------------ |
660
- | **Memory** | Persistent, cross-session fact storage | No | `memory.enabled` (default on) |
661
- | **Schedule** | Cron-driven recurring/one-off tasks via the originating channel | Yes | `tools.schedule.enabled` |
662
- | **A2A_SubmitTask** | Submit a task to an A2A agent | Yes | A2A enabled |
663
- | **A2A_QueryAgent** | Query an A2A agent's capabilities | No | A2A enabled |
664
- | **A2A_QueryTask** | Check an A2A task's status | No | A2A enabled |
665
-
666
- > **Approval** reflects the default policy. The global default is `tools.safety.require_approval: true`,
667
- > so a tool is **No** only where it is explicitly exempt in code (read-only file/search tools, Memory,
668
- > the plan/question tools, subagent reads, and computer-use). Bash is governed instead by the per-mode
669
- > bash allow-list. Override any tool with `tools.<name>.require_approval`.
670
- >
671
- > **MCP tools** are not listed here - they are discovered and registered dynamically at runtime from your
672
- > configured MCP servers and surface as `MCP_<server>_<tool>` (see [MCP Integration](docs/mcp-integration.md)).
673
-
674
- **Tool Configuration:**
675
-
676
- Tools can be enabled/disabled and configured individually:
677
-
678
- ```bash
679
- # Enable/disable specific tools
680
- infer config set tools.bash.enabled true
681
- infer config set tools.write.enabled true
682
-
683
- # Configure tool settings
684
- infer config set tools.grep.backend ripgrep
685
- # List values are comma-separated and replace the whole list
686
- infer config set tools.web_fetch.allowed_domains "example.com,github.com"
687
- ```
688
-
689
- See [Tools Reference](docs/tools-reference.md) for complete documentation.
690
-
691
- ## Configuration
692
-
693
- The CLI uses a powerful 2-layer configuration system with environment variable support.
694
-
695
- ### Configuration Quick Start
696
-
697
- Create a minimal configuration:
698
-
699
- ```yaml
700
- # .infer/config.yaml
701
- gateway:
702
- url: http://localhost:8080
703
- standalone_binary: true # Run the gateway as a standalone binary (false = Docker container)
704
-
705
- tools:
706
- enabled: true
707
- bash:
708
- enabled: true
709
-
710
- agent:
711
- model: "deepseek/deepseek-v4-pro"
712
- max_turns: 50
713
-
714
- chat:
715
- theme: tokyo-night
716
- ```
717
-
718
- System prompts and custom instructions live in `prompts.yaml`, not `config.yaml`:
719
-
720
- ```yaml
721
- # .infer/prompts.yaml
722
- agent:
723
- system_prompt: "You are a helpful assistant" # Base identity
724
- custom_instructions: "" # Additional instructions appended to system prompt
725
- ```
726
-
727
- ### Configuration Layers
728
-
729
- 1. **Command Line Flags** - Highest priority
730
- 2. **Environment Variables** (`INFER_*`)
731
- 3. **Project Config** (`.infer/config.yaml`)
732
- 4. **Userspace Config** (`~/.infer/config.yaml`)
733
- 5. **Built-in Defaults** - Lowest priority
734
-
735
- **Example:**
736
-
737
- ```bash
738
- # Set via command flag (highest priority; beats env vars and config files)
739
- infer headless --model "anthropic/claude-4" "Summarize this repository"
740
-
741
- # Or via environment variable (beats config files)
742
- export INFER_AGENT_MODEL="openai/gpt-4"
743
-
744
- # Or via config file
745
- infer config set agent.model "deepseek/deepseek-v4-pro"
746
- ```
747
-
748
- The two exceptions where the environment variable wins over the flag:
749
- `INFER_TOOLS_BASH_ALLOW_APPEND` (over `--tools-bash-allow-append`) and
750
- `INFER_REMINDERS_CONFIG` (over `--reminders-file`).
751
-
752
- ### Key Configuration Options
753
-
754
- - **gateway.url** - Gateway URL (default: `http://localhost:8080`)
755
- - **gateway.standalone_binary** - Run the gateway as a standalone binary instead of a Docker container (default: `true`)
756
- - **tools.enabled** - Enable/disable all tools (default: `true`)
757
- - **agent.model** - Default model for agent operations
758
- - **prompts.agent.system_prompt** (prompts.yaml) - Base identity for the agent (e.g., `"You are a helpful assistant"`)
759
- - **prompts.agent.custom_instructions** (prompts.yaml) - Additional instructions appended after the system prompt
760
- - **agent.max_turns** - Maximum turns for agent sessions (default: `50`)
761
- - **chat.theme** - Chat interface theme (default: `tokyo-night`)
762
- - **chat.status_bar.enabled** - Enable/disable status bar (default: `true`)
763
- - **chat.status_bar.indicators** - Configure individual status indicators (all enabled by default except `max_output`)
764
- - **web.enabled** - Enable web terminal mode (default: `false`)
765
- - **web.port** - Web server port (default: `3000`)
766
- - **web.host** - Web server host (default: `localhost`)
767
- - **web.session_inactivity_mins** - Minutes a session may go without activity before it is reaped (default: `5`).
768
- A connected browser tab refreshes its session every 10s, so in practice this only reaps sessions whose
769
- connection is gone or stalled. `0` or negative disables cleanup entirely.
770
-
771
- ### Environment Variables
772
-
773
- All configuration can be set via environment variables with the `INFER_` prefix:
774
-
775
- ```bash
776
- export INFER_GATEWAY_URL="http://localhost:8080"
777
- export INFER_GATEWAY_MOCK=true # embedded mock gateway with canned scenario responses, no real LLM
778
- export INFER_AGENT_MODEL="deepseek/deepseek-v4-pro"
779
- export INFER_TOOLS_BASH_ENABLED=true
780
- export INFER_CHAT_THEME="tokyo-night"
781
-
782
- # Web terminal configuration
783
- export INFER_WEB_PORT=3000
784
- export INFER_WEB_HOST="localhost"
785
- export INFER_WEB_SESSION_INACTIVITY_MINS=5
786
- ```
787
-
788
- **Format:** `INFER_<PATH>` where dots become underscores.
789
- Example: `agent.model` โ†’ `INFER_AGENT_MODEL`
790
-
791
- For complete configuration documentation, including all options and environment variables, see [Configuration Reference](docs/configuration-reference.md).
792
-
793
- ## Cost Tracking
794
-
795
- The CLI automatically tracks API costs based on token usage for all providers and models.
796
- Costs are calculated in real-time with support for both aggregate totals and per-model breakdowns.
797
-
798
- ### Viewing Costs
799
-
800
- Use the `/cost` command in any chat session to see the cost breakdown:
801
-
802
- ```bash
803
- # In chat, use the /cost shortcut
804
- /cost
805
- ```
806
-
807
- This displays:
808
-
809
- - **Total session cost** in USD
810
- - **Input/output costs** separately
811
- - **Per-model breakdown** when using multiple models
812
- - **Token usage** for each model
813
-
814
- **Status Bar**: Session costs are also displayed in the status bar (e.g., `๐Ÿ’ฐ $0.0234`) if enabled.
815
-
816
- ### Configuring Pricing
817
-
818
- The CLI includes hardcoded pricing for 30+ models across all major providers
819
- (Anthropic, OpenAI, Google, DeepSeek, Groq, Mistral, Cohere, etc.).
820
- Prices are updated regularly to match current provider pricing.
821
-
822
- The model picker groups models into three categories you can filter with the
823
- `[1] All` / `[2] Free` / `[3] Paid` / `[4] Pro` tabs:
824
-
825
- - **Free** - no per-token cost (e.g. local Ollama, Gemma).
826
- - **Paid** - billed per token at the listed `$input/$output per MTok` rate.
827
- - **Pro** - gated behind a paid **Pro subscription** (some Ollama Cloud models).
828
- These have no per-token price but are not free, so they are marked
829
- `pro subscription` instead of `free` to avoid the misleading label.
830
-
831
- **Override pricing** for specific models or add pricing for custom models:
832
-
833
- ```yaml
834
- # .infer/config.yaml
835
- pricing:
836
- enabled: true
837
- currency: "USD"
838
- custom_prices:
839
- # Override existing model pricing
840
- "openai/gpt-4o":
841
- input_price_per_mtoken: 2.50 # Price per million input tokens
842
- output_price_per_mtoken: 10.00 # Price per million output tokens
843
-
844
- # Add pricing for custom/local models
845
- "ollama/llama3.2":
846
- input_price_per_mtoken: 0.0
847
- output_price_per_mtoken: 0.0
848
-
849
- "custom-fine-tuned-model":
850
- input_price_per_mtoken: 5.00
851
- output_price_per_mtoken: 15.00
852
-
853
- # Mark a model as Pro-subscription only (no per-token cost, but gated)
854
- "ollama_cloud/deepseek-v4-pro":
855
- input_price_per_mtoken: 0.0
856
- output_price_per_mtoken: 0.0
857
- requires_pro: true
858
- ```
859
-
860
- > **Note:** A custom entry fully replaces the default for that model. Omitting
861
- > `requires_pro` in a custom override resets it to `false`, so re-state
862
- > `requires_pro: true` if you override a model the CLI flags as Pro by default.
863
-
864
- **Via environment variables:**
865
-
866
- ```bash
867
- # Disable cost tracking entirely
868
- export INFER_PRICING_ENABLED=false
869
-
870
- # Hide cost from status bar
871
- export INFER_CHAT_STATUS_BAR_INDICATORS_COST=false
872
- ```
873
-
874
- > **Note:** `pricing.custom_prices` is a map keyed by `provider/model`, so its entries
875
- > cannot be set through environment variables. Override per-model pricing only via
876
- > the `custom_prices` block in `config.yaml` (shown above).
877
-
878
- **Status Bar Configuration:**
879
-
880
- ```yaml
881
- # .infer/config.yaml
882
- chat:
883
- status_bar:
884
- enabled: true
885
- indicators:
886
- cost: true # Show/hide cost indicator
887
- ```
888
-
889
- ### Cost Calculation
890
-
891
- - Costs are calculated as: `(tokens / 1,000,000) ร— price_per_million_tokens`
892
- - Prices are per million tokens (input and output priced separately)
893
- - Models without pricing data (Ollama, free tiers) show $0.00
894
- - Token counts use actual usage from providers or polyfilled estimates
895
-
896
- ## Tool Approval System
897
-
898
- The CLI includes a comprehensive approval system for sensitive tool operations, providing security and
899
- visibility into what actions LLMs are taking.
900
-
901
- ### How It Works
902
-
903
- When a tool requiring approval is executed:
904
-
905
- 1. **Validation**: Tool arguments are validated
906
- 2. **Approval Prompt**: User sees tool details with:
907
- - Tool name and parameters
908
- - Real-time diff preview (for file modifications)
909
- - Approve/Reject/Auto-approve options
910
- 3. **Execution**: Tool runs only if approved
911
-
912
- ### Default Approval Requirements
913
-
914
- The global default is `tools.safety.require_approval: true`, so **any tool not explicitly exempt requires
915
- approval**; override per tool with `tools.<name>.require_approval`.
916
-
917
- | Tool | Requires Approval | Reason |
918
- | ------ | ------------------- | --------- |
919
- | Write, Edit, MultiEdit, Delete | Yes | Create / modify / remove files |
920
- | Schedule, Agent | Yes | Side effects (scheduled jobs, spawned subprocesses) |
921
- | WebSearch | Yes | Make external requests (global default) |
922
- | WebFetch | No | Explicitly exempt - override with `tools.web_fetch.require_approval` |
923
- | A2A_SubmitTask | Yes | Dispatches work to another agent |
924
- | Bash | Optional | Governed by the per-mode bash allow-list |
925
- | Wait | No | Passive utility - blocks until condition met, no side effects |
926
- | Read, Grep, Tree | No | Read-only operations |
927
- | Memory, TodoWrite | No | Local agent state (explicitly exempt) |
928
- | Image tools | No | Output confined to `~/.infer/projects/<project-slug>/artifacts/` - override with `tools.<name>.require_approval` |
929
- | TextToSpeech | No | Output confined to `text_to_speech.output_dir` - override with `text_to_speech.require_approval` |
930
- | Computer-use tools | No | Run silently in the background |
931
- | A2A_QueryAgent, A2A_QueryTask | No | Read-only A2A queries |
932
-
933
- ### Approval Configuration
934
-
935
- Configure approval requirements per tool:
936
-
937
- ```bash
938
- # Enable/disable approval for specific tools
939
- infer config set tools.safety.require_approval true # Global approval
940
- infer config set tools.bash.enabled true # Enable bash tool
941
- ```
942
-
943
- Or via configuration file:
944
-
945
- ```yaml
946
- tools:
947
- safety:
948
- require_approval: true # Global default
949
- write:
950
- require_approval: true
951
- bash:
952
- require_approval: false # Override for bash
953
- ```
954
-
955
- ### Approval UI Controls
956
-
957
- The approval box is an inline select: **left / right** moves between
958
- **Approve**, **Reject** and **Auto-Approve**, **enter** confirms.
959
-
960
- - **Left / Right** - Choose an option
961
- - **Enter** - Confirm the highlighted choice
962
- - **Esc** - Reject execution
963
-
964
- ## Shortcuts
965
-
966
- The CLI provides an extensible shortcuts system for quickly executing common commands with `/shortcut-name` syntax.
967
-
968
- **Subcommands:** Shortcuts can have subcommands for organized command groups (e.g., `/git status`,
969
- `/scm issues`). This allows related operations to be grouped under a single shortcut name with multiple
970
- actions.
971
-
972
- ### Built-in Shortcuts
973
-
974
- **Conversation & session:**
975
-
976
- - `/new [title]` - Start a new conversation (optionally titled)
977
- - `/clear` - Save the current conversation and start a new one
978
- - `/insights [24h|7d|30d]` - Analyze past sessions for repeatable workflows worth a skill and recurring tool failures; saves a report to `~/.infer/insights/`.
979
- Vendored as `~/.infer/shortcuts/insights.yaml`, wrapping `infer insights` - edit it to pin a model or change the windows.
980
- - `/reset [insights|confirm]` - Wipe the local runtime state (conversations, plans, scratch, artifacts, history, backups, exports, logs) of
981
- **every project on this machine**.
982
- `/reset` previews and deletes nothing, `/reset insights` analyzes the sessions first, `/reset confirm` performs the wipe.
983
- Config and saved insights are preserved, remote stores are skipped.
984
- Vendored as `~/.infer/shortcuts/reset.yaml`, wrapping `infer reset` - edit or delete it like any other shortcut.
985
- A chat session running during the wipe keeps the conversation it already has in memory; run `/new` or restart to be fully fresh.
986
- - `/compact` - Save the conversation and start a new session seeded with a summary
987
- - `/conversations` - Open the conversation selection dropdown
988
- - `/context` - Show context-window usage
989
- - `/cost` - Show session cost breakdown with per-model details
990
- - `/copy [text|markdown|json]` - Copy the conversation to the clipboard (aliases: `txt`, `md`)
991
- - `/model [model-name] [prompt]` - Switch model, or run a single prompt against a specific model then restore
992
- - `/theme` - Switch chat theme
993
- - `/voice [seconds]` - Record from the microphone and transcribe to the input with Whisper (requires `speech_to_text.enabled`)
994
- - `/help [shortcut]` - Show available shortcuts
995
- - `/exit` - Exit the chat session
996
-
997
- **Panels & views:**
998
-
999
- - `/diff` - Open the changes panel (interactive diff viewer)
1000
- - `/explorer` - Open the file explorer (tree + fuzzy finder) - [Learn more โ†’](docs/explorer.md)
1001
- - `/tools` - Show the tools available to the agent (read-only, filterable list)
1002
- - `/a2a` - Show registered A2A agents and their status (requires A2A)
1003
- - `/tasks` - Show the A2A task-management interface (requires A2A) - [Learn more โ†’](docs/tasks-management.md)
1004
- - `/release-notes [version]` - Show release notes from GitHub Releases (latest, or a specific version)
1005
-
1006
- **Project setup:**
1007
-
1008
- - `/init` - Generate an `AGENTS.md` by analyzing the project
1009
- - `/install-opentask [owner/repo] [extra context...]` - Install the OpenTask GitHub workflow via the chat agent:
1010
- creates or updates `.github/workflows/tasks.yml` for `infer-action` on an install branch, then opens a pull
1011
- request (pass `[owner/repo]` to target a repo other than the current checkout)
1012
-
1013
- **Git Shortcuts** (created by `infer init`):
1014
-
1015
- - `/git status` - Show working tree status
1016
- - `/git commit` - Generate AI commit message from staged changes
1017
- - `/git push` - Push commits to remote
1018
- - `/git log` - Show commit logs
1019
-
1020
- **SCM Shortcuts** (GitHub integration):
1021
-
1022
- - `/scm issues` - List GitHub issues
1023
- - `/scm issue <number>` - Show issue details
1024
-
1025
- **Other Shortcuts** (created by `infer init`):
1026
-
1027
- - `/mcp [list|add|remove|enable|disable]` - Manage MCP servers
1028
- - `/shells` - List running and recent background shell processes
1029
- - `/export` - Export the current conversation to markdown
1030
- - `/env` - Generate a `.env.example` with all provider API keys
1031
- - `/agents [list|add|remove]` - Manage A2A agents
1032
- - `/skills [list|install|uninstall]` - Manage Agent Skills
1033
-
1034
- ### AI-Powered Snippets
1035
-
1036
- Create shortcuts that use LLMs to transform data:
1037
-
1038
- ```yaml
1039
- # ~/.infer/shortcuts/custom-example.yaml
1040
- shortcuts:
1041
- - name: analyze-diff
1042
- description: "Analyze git diff with AI"
1043
- command: bash
1044
- args:
1045
- - -c
1046
- - |
1047
- diff=$(git diff)
1048
- jq -n --arg diff "$diff" '{diff: $diff}'
1049
- snippet:
1050
- prompt: |
1051
- Analyze this diff and suggest improvements:
1052
- ```diff
1053
- {diff}
1054
- ```
1055
- template: |
1056
- ## Analysis
1057
- {llm}
1058
- ```
1059
-
1060
- ### Custom Shortcuts
1061
-
1062
- Create custom shortcuts by adding YAML files to `~/.infer/shortcuts/` (a
1063
- project `./.infer/shortcuts/` is overlaid on top by name):
1064
-
1065
- ```yaml
1066
- # ~/.infer/shortcuts/custom-dev.yaml
1067
- shortcuts:
1068
- - name: tests
1069
- description: "Run all tests"
1070
- command: go
1071
- args:
1072
- - test
1073
- - ./...
1074
-
1075
- - name: build
1076
- description: "Build the project"
1077
- command: go
1078
- args:
1079
- - build
1080
- - -o
1081
- - infer
1082
- - .
1083
- ```
1084
-
1085
- **With Subcommands:**
1086
-
1087
- ```yaml
1088
- # .infer/shortcuts/custom-docker.yaml
1089
- shortcuts:
1090
- - name: docker
1091
- description: "Docker operations"
1092
- command: docker
1093
- subcommands:
1094
- - name: build
1095
- description: "Build Docker image"
1096
- args:
1097
- - -t
1098
- - myapp
1099
- - .
1100
- - name: run
1101
- description: "Run Docker container"
1102
- args:
1103
- - -p
1104
- - "8080:8080"
1105
- - myapp
1106
- ```
1107
-
1108
- Use as: `/docker build` or `/docker run`
1109
-
1110
- Use with `/tests` or `/build`.
1111
-
1112
- For complete shortcuts documentation, including advanced features and examples, see [Shortcuts Guide](docs/shortcuts-guide.md).
1113
-
1114
- ## Channels (Remote Messaging)
1115
-
1116
- Control the agent remotely from messaging platforms like Telegram or
1117
- WhatsApp. Messages sent to a bot are forwarded to the agent, and the
1118
- agent's responses are sent back through the same platform.
1119
-
1120
- ### Setup (Telegram)
1121
-
1122
- **1. Create a Telegram bot** by messaging [@BotFather](https://t.me/BotFather) and sending `/newbot`. Copy the bot token.
1123
-
1124
- **2. Get your chat ID** by messaging your bot, then visiting:
1125
-
1126
- ```text
1127
- https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates
1128
- ```
1129
-
1130
- Find `"chat":{"id":123456789}` in the response.
1131
-
1132
- **3. Configure** in `.infer/channels.yaml` (seeded by `infer init`):
1133
-
1134
- ```yaml
1135
- ---
1136
- enabled: true
1137
-
1138
- telegram:
1139
- enabled: true
1140
- bot_token: "${INFER_CHANNELS_TELEGRAM_BOT_TOKEN}"
1141
- allowed_users:
1142
- - "123456789"
1143
- poll_timeout: 30
1144
- ```
1145
-
1146
- Or via environment variables:
1147
-
1148
- ```bash
1149
- export INFER_CHANNELS_ENABLED=true
1150
- export INFER_CHANNELS_TELEGRAM_ENABLED=true
1151
- export INFER_CHANNELS_TELEGRAM_BOT_TOKEN="123456:ABC-DEF..."
1152
- export INFER_CHANNELS_TELEGRAM_ALLOWED_USERS="123456789"
1153
- ```
1154
-
1155
- **4. Start the channel listener:**
1156
-
1157
- ```bash
1158
- infer daemon
1159
- ```
1160
-
1161
- **5. Send a message** to your bot in Telegram - the agent will respond.
1162
-
1163
- Each incoming message triggers `infer headless --session-id <id>` as a
1164
- subprocess with a persistent session per sender.
1165
-
1166
- ### Tool Approval
1167
-
1168
- By default, sensitive tools (Write, Edit, Delete, Bash) require user approval
1169
- before executing. The agent sends an approval prompt to the channel and waits
1170
- for the user to reply "yes" or "no". Read-only tools (Read, Grep, Tree) execute
1171
- without approval.
1172
-
1173
- This reuses the existing `tools.*.require_approval` configuration. To disable, set in `.infer/channels.yaml`:
1174
-
1175
- ```yaml
1176
- require_approval: false # default: true
1177
- ```
1178
-
1179
- Or: `INFER_CHANNELS_REQUIRE_APPROVAL=false`
1180
-
1181
- Approvals time out after 5 minutes and are automatically rejected.
1182
-
1183
- ### Security
1184
-
1185
- - **Allowlist-only access**: Only chat IDs in `allowed_users` can interact with the agent
1186
- - **Empty allowlist = reject all**: If no users are configured, all messages are rejected (secure by default)
1187
- - **Per-channel allowlists**: Each channel (Telegram, WhatsApp) has its own independent allowlist
1188
- - **Tool approval by default**: Sensitive tools require explicit user approval before executing
1189
- - **Use environment variables** for tokens - never commit secrets to config files
1190
-
1191
- ### Supported Channels
1192
-
1193
- | Channel | Status | Transport |
1194
- | -------- | --------- | --------------------------- |
1195
- | Telegram | Available | Long-polling (Bot API) |
1196
- | WhatsApp | Planned | Webhook (Meta Business API) |
1197
-
1198
- For a complete working example with Docker Compose, see [examples/telegram-channel](examples/telegram-channel/).
1199
-
1200
- For detailed documentation including custom channel development, see [Channels Documentation](docs/channels.md).
1201
-
1202
- ### Scheduled Tasks
1203
-
1204
- When the daemon is running, the agent can schedule prompts on a cron
1205
- schedule. Every fire runs an agent and records the run to storage; jobs
1206
- created from a channel chat (e.g. Telegram) additionally deliver the
1207
- response back through that channel.
1208
-
1209
- > *"Send me an inspiring quote every day at 8 AM"* - recurring
1210
- > *"Remind me at 6pm today to call mum"* - one-off (deletes itself after firing)
1211
-
1212
- Enable in `.infer/config.yaml`:
1213
-
1214
- ```yaml
1215
- tools:
1216
- schedule:
1217
- enabled: true # disabled by default
1218
- require_approval: true # default; recommended
1219
- ```
1220
-
1221
- Or via env var: `INFER_TOOLS_SCHEDULE_ENABLED=true`.
1222
-
1223
- Jobs are persisted as YAML in `~/.infer/schedules/<id>.yaml` and hot-reloaded
1224
- by the daemon (no restart needed). Channel + recipient are derived
1225
- automatically from the session - the LLM never has to guess them.
1226
-
1227
- Container deployments must set `TZ=Europe/Berlin` (or your zone) so cron
1228
- expressions are interpreted in local time. The binary embeds the IANA zone
1229
- database so this works on any base image.
1230
-
1231
- For the full guide, including the cron syntax primer and end-to-end Telegram
1232
- walkthroughs, see [Scheduling Documentation](docs/scheduling.md).
1233
-
1234
- ## Heartbeat (Periodic Wake-Up)
1235
-
1236
- Heartbeat wakes the agent on a fixed interval - without any user input -
1237
- so it can check for pending todos, background tasks, or anything else
1238
- your system prompt tells it to monitor. It runs alongside the scheduler
1239
- inside the `infer daemon` process and is **disabled by default**.
1240
-
1241
- Unlike the [Schedule](docs/scheduling.md) tool (which the LLM uses to
1242
- create user-driven cron jobs that deliver to a channel), heartbeat is a
1243
- single global tick the operator configures once. Output goes to logs;
1244
- the agent itself decides whether to send a Telegram message, open a PR,
1245
- or just no-op.
1246
-
1247
- Enable in `.infer/heartbeat.yaml` (seeded by `infer init`):
1248
-
1249
- ```yaml
1250
- ---
1251
- enabled: true
1252
- interval: 1h # Go duration: 30s, 5m, 1h, 24h
1253
- initial_delay: 1m # delay before first tick
1254
- model: "" # optional override; empty = agent.model
1255
- prompt: "Heartbeat tick - check for any pending tasks, todos, or background work and act on them."
1256
- ```
1257
-
1258
- The **system prompt** for heartbeat runs lives in `.infer/prompts.yaml`
1259
- under `agent.system_prompt_heartbeat` so you can tune the agent's
1260
- wake-up behaviour separately from chat-mode behaviour.
1261
-
1262
- Then start the daemon:
1263
-
1264
- ```bash
1265
- infer daemon
1266
- ```
1267
-
1268
- Heartbeat alone is a valid run mode - you don't need any channel
1269
- enabled to use it. The daemon hosts whichever of channels / scheduler /
1270
- heartbeat are turned on.
1271
-
1272
- Or via env vars:
1273
-
1274
- ```bash
1275
- export INFER_HEARTBEAT_ENABLED=true
1276
- export INFER_HEARTBEAT_INTERVAL=30m
1277
- ```
1278
-
1279
- For the full guide, including configuration reference and common
1280
- patterns (TODO sweeps, CI watchdogs), see [Heartbeat Documentation](docs/heartbeat.md).
1281
-
1282
- ## Agent Skills
1283
-
1284
- Agent Skills are reusable, model-readable instruction folders. Each skill is a folder containing a
1285
- `SKILL.md` file with YAML frontmatter (`name`, `description`) - the same contract used by the open
1286
- `.agents/skills/` standard, so existing skill folders drop in unchanged. The agent discovers skills at
1287
- startup and loads a skill's full instructions on demand when they are relevant.
1288
-
1289
- Skills are scanned from three locations (highest precedence first; first match wins on a name collision):
1290
-
1291
- - `.infer/skills/<name>/SKILL.md` - project
1292
- - `.agents/skills/<name>/SKILL.md` - open standard
1293
- - `~/.infer/skills/<name>/SKILL.md` - user-global
1294
-
1295
- Skills are **enabled by default**; disable with `agent.skills.enabled=false` (or `INFER_AGENT_SKILLS_ENABLED=false`).
1296
-
1297
- ```bash
1298
- infer skills list # Discover skills (works even when disabled)
1299
- infer skills install skill-creator # Install from github.com/inference-gateway/skills
1300
- infer skills install acme/internal-comms # Install from github.com/acme/skills
1301
- infer skills uninstall pdf # Remove a skill folder by name
1302
- ```
1303
-
1304
- `install` accepts a skill name, an `org/skill` pair, or a full GitHub tree URL; set `GITHUB_TOKEN`
1305
- (or `GH_TOKEN`) to raise the rate limit and reach private repositories. See
1306
- [docs/skills.md](docs/skills.md) for the authoring format.
1307
-
1308
- ## Computer Use
1309
-
1310
- When enabled, the agent can inspect and control the desktop - read accessible controls, press them by
1311
- label, capture screenshots, move and click the mouse, scroll, and type text or key combinations. The
1312
- display backend is detected automatically across **macOS**, **Linux**, and **Windows**.
1313
-
1314
- Computer Use is **off by default**. Turn it on in `computer_use.yaml` (or with `INFER_COMPUTER_USE_ENABLED=true`):
1315
-
1316
- ```yaml
1317
- # .infer/computer_use.yaml
1318
- enabled: true
1319
- rate_limit:
1320
- enabled: true
1321
- screenshot:
1322
- streaming_enabled: true # also registers the GetLatestFrame tool
1323
- ```
1324
-
1325
- Tools: `Computer` and `GetLatestFrame`. `Computer` is action-based. Its `accessibility` action is the
1326
- preferred first observation on macOS: it returns compact `{role,label,state,bbox}` text in the same
1327
- coordinate space as screenshots, without a screenshot or vision-model call. Its `press` action invokes
1328
- an element's accessibility action by exact label without moving the cursor. Use `screenshot` only when
1329
- the accessibility tree is unavailable, empty, or insufficient; the remaining actions control the
1330
- pointer and keyboard.
1331
-
1332
- The macOS AX bridge is implemented in Go with PureGo and runs in a short-lived helper process, so a
1333
- native accessibility failure degrades to screenshot guidance without taking down the CLI. Linux AT-SPI
1334
- and Windows UIA providers are not implemented yet and report that fallback explicitly. Computer-use
1335
- actions are governed by `computer_use.enabled`, rate limits, and `computer_use.approval`. The
1336
- [desktop app](https://github.com/inference-gateway/desktop) visualizes what the agent is doing
1337
- (monitor, screen overlay, approvals). For a sandboxed desktop to drive, see
1338
- [examples/computer-use](examples/computer-use/).
1339
-
1340
- ## Frame Sources & Vision Annotation
1341
-
1342
- Cheap or text-only models (DeepSeek, small local models) can still "see". Named **frame sources**
1343
- feed images to the agent - the built-in `screen` source (computer-use screenshot streaming) plus any
1344
- number of **directory sources** watching a folder for camera frames - and a pluggable **image
1345
- annotator** turns each frame into text: a scene summary and a numbered element list with bounding
1346
- boxes.
1347
-
1348
- ```yaml
1349
- # .infer/config.yaml
1350
- vision:
1351
- annotator:
1352
- enabled: true
1353
- model: anthropic/claude-haiku-4-5-20251001 # any vision model served by your gateway
1354
- sources:
1355
- camera-front:
1356
- type: directory
1357
- path: .infer/frames/front # wherever your camera process writes frames
1358
- retention: { max_files: 100, max_age: 24h }
1359
- ```
1360
-
1361
- The agent reads frames via `GetLatestFrame(source, format)` and arbitrary image files via
1362
- `ImageDecode(image, prompt)`. Any orchestrator or model that speaks chat completions can use these
1363
- tools - a vision model gets the image itself and a text-only model gets the annotation text: with an
1364
- annotator configured, `GetLatestFrame` defaults to `format: annotated` (text replaces the frame) and
1365
- `format: regular` returns the raw image; `ImageDecode` always attaches the image and adds the
1366
- annotation when an annotator is configured. Annotation is a side-call through the
1367
- gateway, so any vision model it serves works - including fully local ones via Ollama. See the
1368
- [configuration reference](docs/configuration-reference.md#vision-settings) for all options.
1369
-
1370
- ## Persistent Memory
1371
-
1372
- The agent keeps a durable, cross-session memory: individual Markdown **fact-files** under a global
1373
- directory (`~/.infer/memory` by default), catalogued by a `MEMORY.md` index. The index is injected
1374
- into context at session start, and the agent reads or writes individual facts on demand through the
1375
- `Memory` tool. A session reminder nudges it to consult and keep memory up to date.
1376
-
1377
- Memory is **enabled by default**. Configure it in `memory.yaml`:
1378
-
1379
- ```yaml
1380
- # .infer/memory.yaml
1381
- enabled: true
1382
- dir: "" # "" => ~/.infer/memory
1383
- max_chars: 4000 # cap on the injected MEMORY.md index
1384
- ```
1385
-
1386
- Turn it off with `memory.enabled=false` (or `INFER_MEMORY_ENABLED=false`); the memory-consult
1387
- reminder below is pruned automatically when memory is disabled.
1388
-
1389
- ## Reminders & Command Hooks
1390
-
1391
- Two lightweight extension points fire at fixed **agent-loop hook points** - `pre_session`,
1392
- `pre_stream`, `post_stream`, `pre_tool`, `post_tool`, `pre_queue_drain`, `post_queue_drain`, and
1393
- `post_session`:
1394
-
1395
- - **Reminders** (`reminders.yaml`) inject a `<system-reminder>` text block at a hook point, gated by a
1396
- trigger (`always`, `interval`, `once_after`, `turns_before_max`, `once`, `on_failure`,
1397
- `on_mode_change`, `on_repeated_failure`, `on_truncation`, `on_stalled_todos`, or
1398
- `on_empty_response`; see the [configuration reference](docs/configuration-reference.md) for the
1399
- full table). Reminders ship **enabled** with nine defaults: `todo-hygiene` (nudges the agent to
1400
- keep a todo list), `mode-change-reminder`, `user-intent-focus`, `repeated-failure`,
1401
- `todo-continuation`, `truncation-continuation`, `empty-response-continuation`, and the memory
1402
- reminders `memory-consult` (points it at the memory index) and `memory-hygiene` (one nudge after
1403
- 25 turns to save what a future session would otherwise miss); the memory ones are auto-pruned
1404
- when memory is off.
1405
- - **Command Hooks** (`hooks.yaml`) run a shell command at a hook point - the executable sibling of
1406
- reminders. They are **off by default**; each command still faces the per-mode bash allow-list when
1407
- the agent runs it, so allow-list the command and set `enabled: true` to turn hooks on.
1408
-
1409
- ```yaml
1410
- # .infer/hooks.yaml
1411
- enabled: true
1412
- hooks:
1413
- - name: gofmt
1414
- hook: post_session
1415
- command: "gofmt -w ."
1416
- timeout: 30 # seconds; 0 -> default 30
1417
- ```
1418
-
1419
- ## Global Flags
64
+ ## Features
1420
65
 
1421
- - `-v, --verbose`: Enable verbose output
1422
- - `--no-colors`: Disable ANSI colors in command output (colors are also auto-disabled when stdout is not a terminal or `NO_COLOR` is set)
1423
- - `--tools-bash-allow-append <cmds>`: Comma/newline-separated commands added to the bash allow-list in every mode
1424
- (`standard`, `plan`, `auto`); `INFER_TOOLS_BASH_ALLOW_APPEND` takes precedence
1425
- - `--reminders-file <path>`: Path to a reminders YAML file, overriding project `.infer/` and `~/.infer/` reminders
66
+ One line per feature, each linking to its full guide:
67
+
68
+ ### Core
69
+
70
+ - **Automatic gateway management** - downloads and runs the gateway binary, no Docker required - [Installation](docs/installation.md)
71
+ - **Interactive chat and headless agent** - model selection, streaming, session resumption, inline history auto-completion - [Commands Reference](docs/commands-reference.md)
72
+ - **Agent modes** - Standard, Plan, Auto-Accept and Auto+Judge, toggled with Shift+Tab - [Plan Mode](docs/plan-mode.md) ยท [Judge Mode](docs/judge-mode.md)
73
+ - **Tool execution** - every built-in tool the LLM can call, with parameters and approval defaults - [Tools Reference](docs/tools-reference.md)
74
+ - **Tool approval** - the gate in front of sensitive tools - [Tool Approval](docs/tool-approval.md)
75
+ - **Custom tools** - add tools in any language with one YAML manifest - [Custom Tools](docs/custom-tools.md)
76
+ - **MCP servers** - Model Context Protocol integration - [MCP Integration](docs/mcp-integration.md)
77
+ - **Subagents** - fan out parallel `infer headless` runs - [Subagents](docs/subagents.md)
78
+ - **GitHub issue references** - type `#` in chat to expand an issue inline (needs `gh` and a GitHub remote) - [Shortcuts Guide](docs/shortcuts-guide.md)
79
+ - **Cost tracking** - real-time per-model cost breakdown - [Cost Tracking](docs/cost-tracking.md)
80
+ - **Conversation history** - multiple storage backends - [Conversation Storage](docs/conversation-storage.md)
81
+ - **Conversation versioning** - navigate back in time to a previous point - [Conversation Versioning](docs/conversation-versioning.md)
82
+ - **Conversation titles** - AI-generated session titles - [Conversation Title Generation](docs/conversation-title-generation.md)
83
+ - **Configuration** - two-layer YAML plus `INFER_*` environment overrides - [Configuration Reference](docs/configuration-reference.md)
84
+ - **Configurable keybindings and themes** - [Configuration Reference](docs/configuration-reference.md#keybinding-configuration)
85
+ - **Persistent memory** - cross-session Markdown facts with an injected index - [Persistent Memory](docs/memory.md)
86
+ - **Reminders and command hooks** - extension points at agent-loop hook points - [Reminders & Command Hooks](docs/hooks.md)
87
+ - **Telemetry** - OpenTelemetry traces and metrics - [Telemetry](docs/telemetry.md)
88
+ - **AG-UI output** - protocol event stream for the headless agent - [AG-UI Output](docs/ag-ui-output.md)
89
+
90
+ ### Remote and automation
91
+
92
+ - **Web terminal** - browser-based, tabbed sessions - [Web Terminal](docs/web-terminal.md)
93
+ - **Remote messaging channels** - drive the agent from Telegram - [Channels](docs/channels.md)
94
+ - **Scheduled tasks** - cron prompts that deliver back through the channel - [Scheduling](docs/scheduling.md)
95
+ - **Heartbeat** - periodic wake-up to check pending work - [Heartbeat](docs/heartbeat.md)
96
+ - **A2A agents** - delegate to Agent-to-Agent servers - [A2A Agents Configuration](docs/agents-configuration.md) ยท [A2A Connections](docs/a2a-connections.md)
97
+ - **Task management** - the A2A task interface - [Tasks Management](docs/tasks-management.md)
98
+ - **Browser tools** - drive a browser through an extension bridge - [Browser Extension Protocol](docs/browser-extension-protocol.md)
99
+ - **Explorer and diffs** - in-terminal file tree, fuzzy finder and diff viewer - [Explorer](docs/explorer.md)
100
+
101
+ ### Skills and plugins
102
+
103
+ - **Agent Skills** - drop-in `SKILL.md` instruction folders - [Agent Skills](docs/skills.md)
104
+ - **Plugins** - Claude Code-format skills plus an always-on ruleset - [Plugins](docs/plugins.md)
105
+ - **Extensible shortcuts** - custom `/`-commands with AI-powered snippets - [Shortcuts Guide](docs/shortcuts-guide.md)
106
+
107
+ ### Media and computer use
108
+
109
+ - **Computer Use** - drive the desktop: mouse, keyboard, screenshots - [Computer Use](docs/computer-use.md)
110
+ - **Frame sources and vision annotation** - let text-only models "see" - [Vision](docs/vision.md)
111
+ - **Image generation, edit and variation** - written to the session artifacts dir - [Tools Reference](docs/tools-reference.md#media-tools)
112
+ - **Speech-to-text** - dictate with Whisper, locally and offline - [Speech-to-Text](docs/speech-to-text.md)
113
+ - **Text-to-speech** - local WAV synthesis with zero-shot voice cloning - [Text-to-Speech](docs/text-to-speech.md)
114
+ - **Text-to-music and text-to-video** - generate audio and video through the gateway - [Text-to-Music](docs/text-to-music.md) ยท [Text-to-Video](docs/text-to-video.md)
1426
115
 
1427
116
  ## Examples
1428
117
 
1429
- ### Docker Compose Examples
1430
-
1431
- Each directory under [`examples/`](examples/) is a self-contained, runnable setup with its own README,
1432
- most with a Docker Compose file:
1433
-
1434
- | Example | Demonstrates |
1435
- | --------- | -------------- |
1436
- | [basic](examples/basic/) | Minimal gateway + CLI setup to get started |
1437
- | [a2a](examples/a2a/) | Agent-to-Agent: multiple agents, a demo site, and a VNC container |
1438
- | [mcp](examples/mcp/) | MCP server integration with a sample server and config |
1439
- | [tools](examples/tools/) | Custom tools in Python and shell, run offline against a scripted mock model |
1440
- | [computer-use](examples/computer-use/) | Computer Use driving a sandboxed Ubuntu GUI container |
1441
- | [model-switching](examples/model-switching/) | Switching models mid-session, with a small frontend |
1442
- | [shortcuts](examples/shortcuts/) | Custom `/`-shortcuts wired through config |
1443
- | [web-terminal](examples/web-terminal/) | Browser-based, multi-tab web terminal |
1444
- | [telegram-channel](examples/telegram-channel/) | Driving the agent from a Telegram channel |
1445
- | [working-offline](examples/working-offline/) | Fully offline usage with local models via Ollama or llama.cpp |
1446
- | [gpu-provisioning](examples/gpu-provisioning/) | Renting an on-demand cloud GPU running llama.cpp via `infer gpu` (RunPod) |
1447
- | [postgres-storage](examples/postgres-storage/) | Persisting conversations to PostgreSQL |
1448
- | [a2a-traces](examples/a2a-traces/) | End-to-end OpenTelemetry traces between the CLI and an A2A agent |
1449
-
1450
- ### Basic Workflow
1451
-
1452
- ```bash
1453
- # Initialize project
1454
- infer init
1455
-
1456
- # Start interactive chat
1457
- infer chat
1458
-
1459
- # Execute autonomous task
1460
- infer headless "Fix the bug in issue #42"
1461
-
1462
- # Check gateway status
1463
- infer status
1464
- ```
1465
-
1466
- ### Working on a GitHub Issue
118
+ Each directory under [`examples/`](examples/) is a self-contained, runnable setup. See
119
+ **[Examples](docs/examples.md)** for the full index and common workflows, or jump straight to
120
+ [basic](examples/basic/) for a minimal gateway plus CLI.
1467
121
 
1468
- ```bash
1469
- # Start chat
1470
- infer chat
1471
-
1472
- # In chat, use shortcuts to get context
1473
- /scm issue 123
1474
-
1475
- # Discuss with AI, let it use tools to:
1476
- # - Read files
1477
- # - Search codebase
1478
- # - Make changes
1479
- # - Run tests
1480
-
1481
- # Ask the agent to open the PR when ready
1482
- > Create a pull request for these changes - it fixes the authentication timeout issue
1483
- ```
1484
-
1485
- ### Configuration Example
1486
-
1487
- ```bash
1488
- # Set default model
1489
- infer config set agent.model "deepseek/deepseek-v4-pro"
1490
-
1491
- # Enable bash tool
1492
- infer config set tools.bash.enabled true
1493
-
1494
- # Configure web search
1495
- infer config set tools.web_search.enabled true
1496
-
1497
- # Check current configuration
1498
- infer config get
1499
- ```
1500
-
1501
- ### Web Terminal Example
1502
-
1503
- ```bash
1504
- # Start web terminal server
1505
- infer chat --web
1506
-
1507
- # Open browser to http://localhost:3000
1508
- # Click "+" to create new terminal tabs
1509
- # Each tab is an independent chat session
1510
-
1511
- # Custom port for remote access
1512
- infer chat --web --port 8080 --host 0.0.0.0
1513
-
1514
- # Configure via config file
1515
- cat > .infer/config.yaml <<EOF
1516
- web:
1517
- enabled: true
1518
- port: 3000
1519
- host: "localhost"
1520
- session_inactivity_mins: 10 # Reap sessions with no activity for 10 minutes
1521
- EOF
1522
-
1523
- infer chat --web # Uses config file settings
1524
- ```
1525
-
1526
- **Use Cases:**
1527
-
1528
- - Remote access to CLI from any device
1529
- - Multiple parallel chat sessions in browser tabs
1530
- - Team collaboration with shared terminal access
1531
- - Persistent sessions with automatic cleanup
1532
-
1533
- ## Development
1534
-
1535
- For development, use [Task](https://taskfile.dev) for build automation:
1536
-
1537
- ```bash
1538
- task build # Build binary
1539
- task test # Run tests
1540
- task fmt # Format code
1541
- task lint # Run linter
1542
- ```
122
+ ## Contributing
1543
123
 
1544
- See [AGENTS.md](AGENTS.md) for detailed development documentation.
124
+ Development is documented in **[CONTRIBUTING.md](CONTRIBUTING.md)**. Coding agents working in this repository
125
+ should read **[AGENTS.md](AGENTS.md)** first; packages with their own agent-specific rules ship an `AGENTS.md`
126
+ next to the code.
1545
127
 
1546
128
  ## License
1547
129
 
1548
- Apache 2.0 License - see [LICENSE](LICENSE) file for details.
130
+ Apache 2.0 License - see the [LICENSE](LICENSE) file for details.