tollecode

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

README

TolleCode CLI

An agentic AI coding assistant for the terminal. Multi-provider by design — bring your own key, or run entirely locally against Ollama.

go install github.com/tolle-ai/tollecode/cmd/tollecode@latest

Providers

TolleCode is not tied to one vendor. Every provider implements the same ai.Provider interface (internal/ai/types.go):

Provider Notes
Anthropic Claude models
OpenAI GPT models, plus any OpenAI-compatible endpoint
Ollama Local models — no API key, nothing leaves your machine
tollecode configure set-key anthropic sk-...
tollecode launch ollama --model qwen2.5-coder   # fully local

Usage

tollecode                       # interactive REPL in the current directory
tollecode --task "add tests"    # one-shot, non-interactive
tollecode sessions list         # browse past sessions
tollecode web                   # serve the browser UI
tollecode serve                 # run as an HTTP/WebSocket API

Web mode and the access key

tollecode web serves a browser UI. It binds locally by default, but if you put it behind nginx on a public host, turn on the access key first — otherwise anyone who can reach the port can drive an agent on your machine.

tollecode web            # prints the access key when one is required

Generate or rotate the key from Settings → Security. Rotating immediately invalidates every browser still holding the old key. The key is stored on your machine, is compared in constant time, and grants expire after 30 days (internal/liteaccess). This is your gate, not ours — there is no phone-home.

Building from source

git clone https://github.com/tolle-ai/tollecode
cd tollecode
go build ./cmd/tollecode
go test ./...

Requires the Go version in go.mod.

Note on tollecode web in source builds: the browser UI is compiled in via go:embed from internal/webmode/dist/browser, which ships a placeholder here. Source builds serve no UI until a build is staged there; the released binaries include it. The CLI, serve, and every provider work normally either way.

What's in this repository

The agent loop, tool execution, provider adapters, session storage, MCP and LSP integration, the local web server, and the CLI itself.

Not included: the hosted cloud service and the self-hosted team server are separate products and are not open source. The CLI does not depend on either — it is fully functional standalone with your own provider keys.

License

Copyright (c) 2026 Tollecode. Licensed under the GNU Affero General Public License v3.0.

AGPL section 13 matters here: if you modify TolleCode and let others use it over a network, you must offer those users the modified source. Running it unmodified, or modifying it for your own use, carries no such obligation.

Contributing

We're not accepting pull requests yet. The project isn't set up to take outside code at the moment, so PRs will be closed unmerged — please don't spend time on one. This will change; watch this section.

Bug reports and feature requests are welcome now. Open an issue.

See CONTRIBUTING.md for how the codebase is laid out and how to build it, and CLA.md for the agreement that will apply once contributions open.

Found a security issue? Please don't open a public issue — see SECURITY.md.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
tollecode command
internal
agent
Package agent implements the core agentic loop for the Go sidecar.
Package agent implements the core agentic loop for the Go sidecar.
ai
alerts
Package alerts provides a global pub/sub bus for agent-generated alerts and persists them to disk for reconnection replay.
Package alerts provides a global pub/sub bus for agent-generated alerts and persists them to disk for reconnection replay.
channels
Package channels provides shared helpers used by all chat-platform gateways.
Package channels provides shared helpers used by all chat-platform gateways.
channels/discord
Package discord implements a Discord bot gateway via the Discord Gateway WebSocket API.
Package discord implements a Discord bot gateway via the Discord Gateway WebSocket API.
channels/signal
Package signal implements a Signal gateway via the signal-cli daemon.
Package signal implements a Signal gateway via the signal-cli daemon.
channels/slack
Package slack implements a Slack bot gateway using the Slack Events API (webhook mode).
Package slack implements a Slack bot gateway using the Slack Events API (webhook mode).
channels/telegram
Package telegram implements a Telegram bot gateway via the Bot API long-polling interface.
Package telegram implements a Telegram bot gateway via the Bot API long-polling interface.
channels/whatsapp
Package whatsapp implements a WhatsApp bot gateway via the Meta Cloud API.
Package whatsapp implements a WhatsApp bot gateway via the Meta Cloud API.
cli
Package cli implements the interactive TolleCode CLI.
Package cli implements the interactive TolleCode CLI.
etl
liteaccess
Package liteaccess implements the optional "server access key" — the DOOR that gates browser access to Tollecode Lite web mode.
Package liteaccess implements the optional "server access key" — the DOOR that gates browser access to Tollecode Lite web mode.
liteauth
Package liteauth is the single source of truth for Tollecode Lite's local 2FA.
Package liteauth is the single source of truth for Tollecode Lite's local 2FA.
lsp
mcp
Package mcp implements a Model Context Protocol client.
Package mcp implements a Model Context Protocol client.
selfhostgate
Package selfhostgate is the single seam between the open-source CLI and the closed-source selfhost server.
Package selfhostgate is the single seam between the open-source CLI and the closed-source selfhost server.
session
Package session provides JSONL-based session storage compatible with the Python sidecar.
Package session provides JSONL-based session storage compatible with the Python sidecar.
shellenv
Package shellenv resolves the shell interpreter used to run agent and workflow shell commands, so run_shell works on every platform.
Package shellenv resolves the shell interpreter used to run agent and workflow shell commands, so run_shell works on every platform.
todo
Package todo provides persistent storage and scheduling for TodoTask workflows.
Package todo provides persistent storage and scheduling for TodoTask workflows.
webauth
Package webauth holds the HTTP-layer security shared by `tollecode web` (browser Lite): the Origin policy, a session-token gate backed by liteauth, and a CORS policy that reflects the request Origin.
Package webauth holds the HTTP-layer security shared by `tollecode web` (browser Lite): the Origin policy, a session-token gate backed by liteauth, and a CORS policy that reflects the request Origin.
webmode
Package webmode runs Tollecode Lite as a local web app: the same Go sidecar that Tauri drives over stdio, but serving the Angular UI over HTTP and speaking the command protocol over a WebSocket (/ws/cmd) instead of Tauri IPC.
Package webmode runs Tollecode Lite as a local web app: the same Go sidecar that Tauri drives over stdio, but serving the Angular UI over HTTP and speaking the command protocol over a WebSocket (/ws/cmd) instead of Tauri IPC.
workflow
Package workflow implements a server-side, n8n-style workflow execution engine: a DAG of typed nodes (triggers, AI agents, logic, actions, data) wired by ports, executed with join-gated scheduling, cancellation, and per-node run state suitable for a live executions inspector.
Package workflow implements a server-side, n8n-style workflow execution engine: a DAG of typed nodes (triggers, AI agents, logic, actions, data) wired by ports, executed with join-gated scheduling, cancellation, and per-node run state suitable for a live executions inspector.

Jump to

Keyboard shortcuts

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