term-llm

command module
v0.9.40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 1 Imported by: 0

README

term-llm logo

term-llm

Terminal-first AI runtime for commands, chat, editing, tools, jobs, agents, and local workflows.

Release

Docs: https://term-llm.com

Install

With the release installer (recommended):

curl -fsSL https://raw.githubusercontent.com/samsaffron/term-llm/main/install.sh | sh

Or with Homebrew:

brew install samsaffron/tap/term-llm

For a source build, clone the repository and build from its root. This requires Go, Node.js 24 or newer, npm, and Make:

git clone https://github.com/samsaffron/term-llm.git
cd term-llm
make build
./term-llm version

make build installs the locked frontend dependencies when needed, generates the embedded web UI, and then builds the Go binary with the current version, commit, and UTC build time embedded. The generated frontend bundles are intentionally not checked into Git, so plain go build from a fresh checkout will fail until make frontend has run.

go install github.com/samsaffron/term-llm@latest cannot build this repository: in addition to the generated frontend prerequisite, the application intentionally uses local replace directives for the owned Bubble Tea, Ultraviolet, and reflow modules. Use the installer/release archive or make build from a complete checkout.

Shell completions are available for Bash, Zsh, Fish, and PowerShell. Fish users can install an auto-loaded completion file with:

term-llm config completion fish --install

See the installation guide for every shell and manual setup.

30-second quickstart

No API key needed if you use Zen:

term-llm exec --provider zen "list files"
term-llm ask --provider zen "explain git rebase"
term-llm chat
term-llm serve web

Want it running without a terminal? Use term-llm service install web (or hub). See background services for macOS/Linux setup and custom authentication.

If you already have a provider key:

export ANTHROPIC_API_KEY=your-key
# or OPENAI_API_KEY / GEMINI_API_KEY / OPENROUTER_API_KEY / XAI_API_KEY / NEARAI_API_KEY / SAMBANOVA_API_KEY

Read the docs

The detailed docs live at https://term-llm.com and are authored in Markdown in this repo, then built with Hugo.

Common entry points:

Contributing

The root go test ./... command does not cross Go module boundaries. During development, use Go's standard short mode to skip subprocess-heavy integration tests:

go test -short ./...

Before submitting or merging, generate the frontend and run the complete root suite plus the owned nested-module verification:

make build
go test ./...
go vet ./...
scripts/verify_nested_modules.sh
VERIFY_RACE=1 scripts/verify_nested_modules.sh

The terminal event loop/runtime and cell/diff/output renderer under internal/terminal/ are deliberately reduced, application-owned source modules rather than external dependency copies. They preserve the Bubble Tea and Ultraviolet module paths only because Bubbles and Huh require exact import and concrete type identity. See internal/terminal/README.md for the ownership contract, architecture, provenance, selective-sync workflow, fuzz/benchmark commands, and cross-build matrix. Run scripts/cross_build_owned_terminal.sh when changing platform- or release-sensitive terminal code.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
imagetest command
Standalone test binary to debug image rendering with streaming markdown
Standalone test binary to debug image rendering with streaming markdown
internal
acp
Package acp implements the client side of Agent Client Protocol v1.
Package acp implements the client side of Agent Client Protocol v1.
agents
Package agents provides named configuration bundles for term-llm.
Package agents provides named configuration bundles for term-llm.
agents/gist
Package gist provides GitHub Gist operations through the gh CLI.
Package gist provides GitHub Gist operations through the gh CLI.
agyproxy
Package agyproxy contains the temporary request-filter compatibility layer needed while agy cannot combine MCP with an empty native-tool set.
Package agyproxy contains the temporary request-filter compatibility layer needed while agy cannot combine MCP with an empty native-tool set.
buildinfo
Package buildinfo exposes application identity to packages below the CLI.
Package buildinfo exposes application identity to packages below the CLI.
cliwire
Package cliwire implements the opt-in wire audit proxy for authenticated CLI-backed providers.
Package cliwire implements the opt-in wire audit proxy for authenticated CLI-backed providers.
commitworkflow
Package commitworkflow owns the read-only agent phases for native commits.
Package commitworkflow owns the read-only agent phases for native commits.
diff
Package diff provides shared constants for diff handling across packages.
Package diff provides shared constants for diff handling across packages.
edit
Package edit provides editing functionality for the term-llm.
Package edit provides editing functionality for the term-llm.
extensions
Package extensions discovers trusted local CSS/JavaScript web extensions.
Package extensions discovers trusted local CSS/JavaScript web extensions.
filetrack
Package filetrack records file changes made by agent tools so sessions can expose a cumulative diff (baseline = file state at first touch in a session).
Package filetrack records file changes made by agent tools so sessions can expose a cumulative diff (baseline = file state at first touch in a session).
gitcommit
Package gitcommit provides the host-owned Git transaction used by native commit workflows.
Package gitcommit provides the host-owned Git transaction used by native commit workflows.
gitdiff
Package gitdiff exposes structured staged and working-tree changes for the web Changes panel.
Package gitdiff exposes structured staged and working-tree changes for the web Changes panel.
grokprotocol
Package grokprotocol defines wire metadata shared by Grok OAuth and subscription proxy clients.
Package grokprotocol defines wire metadata shared by Grok OAuth and subscription proxy clients.
hub
Package hub models a fleet of term-llm web nodes for `term-llm serve hub`.
Package hub models a fleet of term-llm web nodes for `term-llm serve hub`.
lifecycle
Package lifecycle defines the dependency-free lifecycle domain shared by chat and terminal-host integrations.
Package lifecycle defines the dependency-free lifecycle domain shared by chat and terminal-host integrations.
llm
mcp
mcphttp
Package mcphttp provides an HTTP-based MCP server for tool execution.
Package mcphttp provides an HTTP-based MCP server for tool execution.
mitmca
Package mitmca provides the ephemeral certificate authority shared by term-llm's loopback TLS proxies.
Package mitmca provides the ephemeral certificate authority shared by term-llm's loopback TLS proxies.
passkeyauth
Package passkeyauth provides application-neutral WebAuthn authentication primitives for first-party term-llm servers.
Package passkeyauth provides application-neutral WebAuthn authentication primitives for first-party term-llm servers.
pathutil
Package pathutil provides shared path manipulation utilities.
Package pathutil provides shared path manipulation utilities.
plan
Package plan owns the shared update_plan snapshot model, validation, history extraction, and bounded rendering helpers.
Package plan owns the shared update_plan snapshot model, validation, history extraction, and bounded rendering helpers.
process
Package process provides advisory process discovery, never restart authority.
Package process provides advisory process discovery, never restart authority.
restart
Package restart coordinates safe-point process replacement.
Package restart coordinates safe-point process replacement.
run
runboundary
Package runboundary tracks the provider-complete and durably branchable prefixes of one active model run.
Package runboundary tracks the provider-complete and durably branchable prefixes of one active model run.
share
Package share defines provider-neutral transcript sharing.
Package share defines provider-neutral transcript sharing.
skills
Package skills provides Agent Skills integration for term-llm.
Package skills provides Agent Skills integration for term-llm.
subagentview
Package subagentview reconstructs immutable completed subagent presentation from the durable parent spawn_agent result and child session transcript.
Package subagentview reconstructs immutable completed subagent presentation from the durable parent spawn_agent result and child session transcript.
termhost
Package termhost publishes the visible chat lifecycle to terminal hosts.
Package termhost publishes the visible chat lifecycle to terminal hosts.
terminalpolicy
Package terminalpolicy centralizes decisions about whether term-llm may start an interactive terminal UI.
Package terminalpolicy centralizes decisions about whether term-llm may start an interactive terminal UI.
testutil/webrtcrelay command
Command webrtcrelay is an isolated loopback signaling fixture for browser integration tests.
Command webrtcrelay is an isolated loopback signaling fixture for browser integration tests.
tooldiscovery/evalfixture
Package evalfixture provides the deterministic ten-server, 200-tool MCP federation and its single-server aggregate used to evaluate deferred tool discovery with real transports.
Package evalfixture provides the deterministic ten-server, 200-tool MCP federation and its single-server aggregate used to evaluate deferred tool discovery with real transports.
tools
Package tools provides a permission-aware local tool system for term-llm.
Package tools provides a permission-aware local tool system for term-llm.
udiff
Package udiff provides parsing and application of unified diffs with elision support.
Package udiff provides parsing and application of unified diffs with elision support.
ui
ui/streaming
Package streaming provides a streaming markdown renderer for incremental terminal markdown output.
Package streaming provides a streaming markdown renderer for incremental terminal markdown output.
uisource
Package uisource provides private, on-demand authoring references.
Package uisource provides private, on-demand authoring references.
userservice
Package userservice manages native per-user service definitions, not processes.
Package userservice manages native per-user service definitions, not processes.
webrtc
Package webrtc provides a WebRTC home peer for direct browser-to-server communication, bypassing intermediate relay servers.
Package webrtc provides a WebRTC home peer for direct browser-to-server communication, bypassing intermediate relay servers.
worktree
Package worktree manages git worktrees for term-llm sessions.
Package worktree manages git worktrees for term-llm sessions.
worktree/recovery
Package recovery contains the user-facing worktree promotion recovery flow shared by interactive clients.
Package recovery contains the user-facing worktree promotion recovery flow shared by interactive clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL