yottacode

module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT

README

yottacode

Sovereign terminal AI coding agent.
Any model. Durable memory. Real GitOps. Your machine, your rules.

Model-agnostic · Agent-managed memory · Typed GitHub workflows · Approval-first by design

Go Pure Go No telemetry Release CI Docs Stars

Getting StartedAgent CoreMemoryProvidersModelsWorkflowReference


From prompt to pull request, without leaving your terminal

An end-to-end agentic development workflow: plan mode → branch → implement → tests → commit → push → create PR.

yottacode GitOps demo


What makes yottacode different

For engineers who want terminal-agent agency without vendor lock-in, cloud data leakage, or black-box behavior.

  • Any model, zero lock-in. Native adapters for OpenAI, Anthropic, Gemini, Google Vertex AI, xAI, ChatGPT/Copilot OAuth, OpenAI-compatible endpoints, and local Ollama — switch providers or models mid-session with /model.
  • Agent-managed memory that compounds. yottacode captures durable user and project context, retrieves only what matters each turn, and helps keep memory clean over time.
  • Typed GitHub + worktree workflows. Issues, PR reviews, check status, commits, pushes, PR creation, PR updates, comments, and isolated worktrees are first-class tools instead of fragile shell transcripts.
  • GA code intelligence without IDE lock-in. LSP tools are default-on for Go, TypeScript/JavaScript, Python, and Rust; servers run locally, start lazily, and are never installed without approval. Offline, no-server structural edit ranges (syntax_range) cover the same four languages.
  • Plan mode as a real permission boundary. yottacode can investigate read-only, produce a plan, and only then move into implementation with approvals, path validation, diffs, and checkpoints.
  • Local-first by design. Sessions, memory, checkpoints, and project rules are plain files under ~/.yottacode/; there is no telemetry or analytics, and code only leaves your machine for the model provider you choose.
  • A growing skills ecosystem. Reusable Agent Skills let teams package repeatable workflows; see yottacode-skills.

Try it in 60 seconds

Install on Linux or macOS:

curl -fsSL https://raw.githubusercontent.com/yottadynamics/yottacode/main/install.sh | bash

Prefer to read it first? View install.sh.

Run setup once:

yottacode setup

Open a repository and start with a real task:

yottacode

Try prompts like:

  • Review this repo and suggest the safest first bug to fix.
  • Find why the tests are failing, explain the issue, then propose a fix.
  • Update this GitOps YAML for the new image tag and show me the diff before any commit.
Prefer local models?

Start with Ollama if you want to try yottacode without API keys:

ollama pull <model>   # e.g. qwen2.5-coder, llama3.1, deepseek-coder-v2
yottacode setup

Watch the Ollama setup walkthrough: Get started with yottacode and Ollama.

Manual install (pinned version, no installer script)
export VERSION=<latest-release> # for example: 0.4.0
# Swap linux/darwin and amd64/arm64 to match your machine
curl -fsSL https://github.com/yottadynamics/yottacode/releases/download/v${VERSION}/yottacode_${VERSION}_linux_amd64.tar.gz \
  | tar -xz
install -m 0755 ./yottacode "$HOME/.yottacode/bin/yottacode"

Available archives: yottacode_${VERSION}_{linux,darwin}_{amd64,arm64}.tar.gz; checksums are published in SHA256SUMS on each release.

Windows users should run yottacode under WSL.

More install options: docs/installation.md.


Best first tasks

  • Review before you merge. Ask yottacode to inspect a PR, summarize the risk, check failing CI, and suggest follow-up work.
  • Fix a failing test. Let it read the failure, trace the relevant code, propose a fix, edit the repo, and rerun checks with your approval.
  • Ship a GitOps change. Update YAML, preserve a reviewable diff, and carry the change through branch → commit → push → PR.
  • Learn an unfamiliar repo. Use local session recall and project memory so explanations get sharper as yottacode learns the codebase.
  • Package repeatable workflows. Install or write Agent Skills for team-specific reviews, release checklists, migrations, and runbooks.
  • Turn an issue into a draft PR. Move from issue context to plan, implementation, tests, commit, push, and PR without leaving the terminal.

See the full command reference in docs/tui-slash-commands.md and docs/cli.md. Browse reusable workflows in yottacode-skills.


Built for control and privacy

Autonomy is useful only when you can trust the loop, and trust starts with knowing where your data lives: no telemetry, no analytics, plain files under ~/.yottacode/, and model traffic only to providers you configure.

  • Mutating tools pause for approval with a diff or command preview.
  • Path validation confines edits to the working tree and blocks risky targets like secrets and SSH/cloud credentials.
  • Project rules can allow, ask, or deny specific tools and paths for team-shared policy.
  • Checkpoints let you roll back conversation state, file changes, or both.
  • Plan mode investigates read-only first, then waits for approval before implementation.
  • Data sovereignty by default. Sessions, memory, and checkpoints are plain files on your machine under ~/.yottacode/. Code only leaves the machine to reach the model provider you explicitly configure, and with local Ollama, nothing leaves at all.

Tools run on the host with no in-process sandbox; use a container or devcontainer when you need stronger isolation. See docs/security-and-allow-lists.md.


Documentation

Browse the full documentation online at yottacode.ai/docs. The guides below are the in-repo copies.

Section Description
docs/quickstart.md First successful session
docs/installation.md Build and install options
docs/configuration.md Flags, env vars, config file, diagnostics
docs/providers.md Provider setup and switching
docs/models.md Model configuration
docs/tools.md Built-in tools and approval behavior
docs/lsp.md LSP code intelligence for Go, TypeScript/JavaScript, Python, and Rust
docs/github.md GitHub integration: auth, tools, permissions
docs/security-and-allow-lists.md Approvals, permissions, path policy, isolation
docs/worktrees.md Parallel sessions and .worktreeinclude
docs/memory.md Memory and context persistence
docs/sessions.md Session management and recall
docs/tui-slash-commands.md TUI command reference
docs/cli.md CLI command reference
docs/architecture.md Internals
docs/development.md Contribution workflow
docs/troubleshooting.md Common issues
docs/faq.md Frequently asked questions

Contributing

yottacode is built in the open and contributions are very welcome — from typo fixes to new tools and provider adapters. The full guide lives in CONTRIBUTING.md; here's the short version.

Ways to contribute

  • Report a bug or request a feature with the issue templates.
  • Improve the docs — the in-repo docs/ guides or the published site at yottacode.ai/docs.
  • Open a pull request for a fix or feature. Planning something big? File an issue first so we can align on the approach.

Before you open a PR

  • Keep it focused — one logical change, with a clear description and the issue it closes (Closes #123).
  • Ship code, tests, and docs together: every feature needs tests, every bug fix needs a regression test that fails before and passes after, and behavior changes update the matching docs/ guide.
  • Make sure go test ./... and go vet ./... pass — CI runs build, vet, and tests on every PR and must be green before merge.

Where things plug in — adding a built-in tool, a slash command, or a model adapter is a well-defined seam; see the Development section and docs/development.md for build, test, and extension details.

Security and conduct — please don't file public issues for vulnerabilities. Use GitHub's "Report a vulnerability" button under the repository's Security tab, or follow the private reporting path in SECURITY.md. Community standards are in CODE_OF_CONDUCT.md.


Development

yottacode is a single, pure-Go binary (no CGo) targeting Go 1.26+ on Linux and macOS (amd64/arm64).

Build

go build -o yottacode ./cmd/yottacode

Test

go test ./...                    # unit tests — fast, no network
go vet ./...                     # static checks
govulncheck ./...                # reachable dependency/toolchain CVEs
go test -race ./...              # race detector
go test -cover ./...             # coverage
go test -tags=integration ./...  # live-provider tests (needs API keys)

Where to extend — most feature work lands on a well-defined seam:

  • A built-in tool — implement agent.Tool and register it in internal/tui/run.go and internal/oneshot/oneshot.go.
  • A slash command — add an entry in internal/tui/commands.go.
  • A provider adapter — extend internal/adapter; the agent loop depends only on the streaming interface.

See docs/development.md for the full guide — project layout, the model-catalog refresh, provider diagnostics, and release versioning.


If yottacode is useful to you, starring the repo is the single highest-leverage thing you can do right now. It directly affects how many other engineers discover it. Found a bug or have an idea? Issues are always welcome.


License

MIT. See LICENSE.

Directories

Path Synopsis
cmd
yotta-models command
Command yotta-models refreshes internal/catalog/catalog.gen.json by querying each cloud provider's list-models endpoint.
Command yotta-models refreshes internal/catalog/catalog.gen.json by querying each cloud provider's list-models endpoint.
yottacode command
internal
acp
Package acp implements yottacode as an Agent Client Protocol (ACP) server — a long-lived process hosting N concurrent sessions over one stdio JSON-RPC connection, so yottacode is embeddable in editors that speak ACP (Zed, JetBrains, and others).
Package acp implements yottacode as an Agent Client Protocol (ACP) server — a long-lived process hosting N concurrent sessions over one stdio JSON-RPC connection, so yottacode is embeddable in editors that speak ACP (Zed, JetBrains, and others).
agent
Path-validation helpers for the mutating filesystem tools (write_file, edit_file, mkdir, copy_file, move_file, delete_file).
Path-validation helpers for the mutating filesystem tools (write_file, edit_file, mkdir, copy_file, move_file, delete_file).
agentruntime
Package agentruntime is the shared session-construction layer behind `yottacode run` (internal/oneshot), the TUI (internal/tui), and the ACP server (internal/acp).
Package agentruntime is the shared session-construction layer behind `yottacode run` (internal/oneshot), the TUI (internal/tui), and the ACP server (internal/acp).
auth/openai
Package openai implements the OAuth 2.0 Authorization Code + PKCE flow that OpenAI's Codex CLI uses to authenticate to ChatGPT subscriber backends.
Package openai implements the OAuth 2.0 Authorization Code + PKCE flow that OpenAI's Codex CLI uses to authenticate to ChatGPT subscriber backends.
auth/vertex
Package vertex resolves Google Cloud Application Default Credentials into the short-lived OAuth access tokens Vertex AI requests carry.
Package vertex resolves Google Cloud Application Default Credentials into the short-lived OAuth access tokens Vertex AI requests carry.
catalog
Package catalog is yottacode's source of truth for the set of cloud LLMs the wizard and TUI offer.
Package catalog is yottacode's source of truth for the set of cloud LLMs the wizard and TUI offer.
checkpoint
Package checkpoint implements the file + conversation snapshot store behind the TUI's /rewind command and Esc Esc keybinding.
Package checkpoint implements the file + conversation snapshot store behind the TUI's /rewind command and Esc Esc keybinding.
cli
codemap
Package codemap builds a compact, read-only structural index of a workspace.
Package codemap builds a compact, read-only structural index of a workspace.
config
Package config loads ~/.yottacode/config.toml — the single tunable surface for context-window watermarks, retrieval, and provider profiles.
Package config loads ~/.yottacode/config.toml — the single tunable surface for context-window watermarks, retrieval, and provider profiles.
contextwindow
Package contextwindow estimates token usage for a message history.
Package contextwindow estimates token usage for a message history.
documents
Package documents provides bounded, provenance-rich text extraction from local structured and markup files — CSV, TSV, JSON, JSONL, XML, and HTML — for the read_document agent tool.
Package documents provides bounded, provenance-rich text extraction from local structured and markup files — CSV, TSV, JSON, JSONL, XML, and HTML — for the read_document agent tool.
dotenv
Package dotenv loads KEY=VALUE pairs from .env files into a map.
Package dotenv loads KEY=VALUE pairs from .env files into a map.
experimental
Package experimental gates not-yet-stable features behind named flags so early adopters can iterate on them while the default experience stays stable.
Package experimental gates not-yet-stable features behind named flags so early adopters can iterate on them while the default experience stays stable.
filerefs
Package filerefs implements the @file reference system: when a user types something like "explain @main.go and @internal/foo.go", the agent detects the @-prefixed tokens, reads the matching files from the working directory, and injects their contents into the system prompt so the model sees the file as authoritative context for the turn — no extra read_file tool call required.
Package filerefs implements the @file reference system: when a user types something like "explain @main.go and @internal/foo.go", the agent detects the @-prefixed tokens, reads the matching files from the working directory, and injects their contents into the system prompt so the model sees the file as authoritative context for the turn — no extra read_file tool call required.
github
Package github is the typed adapter between yottacode and GitHub.
Package github is the typed adapter between yottacode and GitHub.
lsp
Package lsp provides the small language-server bridge used by yottacode's experimental code-intelligence tools.
Package lsp provides the small language-server bridge used by yottacode's experimental code-intelligence tools.
mcp
Package mcp implements yottacode's client for the Model Context Protocol (MCP).
Package mcp implements yottacode's client for the Model Context Protocol (MCP).
memory
Package memory loads optional context files that are auto-injected into the system prompt at session start.
Package memory loads optional context files that are auto-injected into the system prompt at session start.
oneshot
Package oneshot is the non-interactive entry point: read one prompt, run one agent turn, print the final answer to stdout, exit.
Package oneshot is the non-interactive entry point: read one prompt, run one agent turn, print the final answer to stdout, exit.
permissions
Package permissions implements the project-local permissions layer that gates tool calls.
Package permissions implements the project-local permissions layer that gates tool calls.
promptmacros
Package promptmacros holds the "prompt macro" slash commands shared between internal/tui and internal/acp — the bucket-A commands (/git-commit, /git-push, /git-create-pr, /git-update-pr, /git-create-issue, /git-review-pr, /code-review, /git-implement-issue, /init) that translate a slash invocation into a directive prompt for the agent loop to run as a normal turn.
Package promptmacros holds the "prompt macro" slash commands shared between internal/tui and internal/acp — the bucket-A commands (/git-commit, /git-push, /git-create-pr, /git-update-pr, /git-create-issue, /git-review-pr, /code-review, /git-implement-issue, /init) that translate a slash invocation into a directive prompt for the agent loop to run as a normal turn.
providerops
Package providerops centralizes the provider/model mutation operations the TUI picker and the cobra `yottacode provider` / `yottacode model` subcommands both perform.
Package providerops centralizes the provider/model mutation operations the TUI picker and the cobra `yottacode provider` / `yottacode model` subcommands both perform.
recall
Package recall is a tiny full-text index over saved sessions.
Package recall is a tiny full-text index over saved sessions.
sandbox
Package sandbox holds the podman-backed Sandbox implementation (internal/agent.Sandbox) — a session- or worker-scoped rootless container that RunBashTool dispatches commands into via `podman exec` instead of running them directly on the host.
Package sandbox holds the podman-backed Sandbox implementation (internal/agent.Sandbox) — a session- or worker-scoped rootless container that RunBashTool dispatches commands into via `podman exec` instead of running them directly on the host.
sensitive
Sensitive projects — the per-repository opt-out that stops automatic session recall from moving a project's conversations across the network.
Sensitive projects — the per-repository opt-out that stops automatic session recall from moving a project's conversations across the network.
shellseg
Package shellseg splits a (possibly compound) shell command into its top-level segments — the pieces separated by &&, ||, ;, and pipes — while respecting quotes, escapes, and $(...)/backtick substitutions so a separator inside a string literal or substitution doesn't split.
Package shellseg splits a (possibly compound) shell command into its top-level segments — the pieces separated by &&, ||, ;, and pipes — while respecting quotes, escapes, and $(...)/backtick substitutions so a separator inside a string literal or substitution doesn't split.
skills
Package skills owns spec-compliant Agent Skills: discovery, parsing, and the in-memory registry the agent loop reads.
Package skills owns spec-compliant Agent Skills: discovery, parsing, and the in-memory registry the agent loop reads.
subagents
Package subagents owns typed-subagent configuration, the per-session task registry for background runs, and the discovery + parsing of agent definition files (`.yottacode/agents/*.md` and `~/.yottacode/agents/*.md`).
Package subagents owns typed-subagent configuration, the per-session task registry for background runs, and the discovery + parsing of agent definition files (`.yottacode/agents/*.md` and `~/.yottacode/agents/*.md`).
trust
Folder trust — the per-directory consent gate that fires before the TUI opens a session in a previously-unseen workspace.
Folder trust — the per-directory consent gate that fires before the TUI opens a session in a previously-unseen workspace.
tui
tui/themes
Package themes is the palette registry the TUI's styles.go reads from when (re)building style vars.
Package themes is the palette registry the TUI's styles.go reads from when (re)building style vars.
update
Package update polls GitHub once a day for newer yottacode releases and caches the answer under ~/.yottacode/cache/update-check.json.
Package update polls GitHub once a day for newer yottacode releases and caches the answer under ~/.yottacode/cache/update-check.json.
usercmd
Package usercmd loads user-authored slash commands from markdown files dropped in ~/.yottacode/commands/ (user scope) and <cwd>/.yottacode/commands/ (project scope).
Package usercmd loads user-authored slash commands from markdown files dropped in ~/.yottacode/commands/ (user scope) and <cwd>/.yottacode/commands/ (project scope).
version
Package version exposes the build version.
Package version exposes the build version.
wizard
Package wizard implements `yottacode setup` — the first-run setup flow.
Package wizard implements `yottacode setup` — the first-run setup flow.
worktree
Package worktree owns the git-worktree machinery yottacode layers on top of plain `git worktree`: name generation, path resolution under <repo>/.yottacode/worktrees/, .worktreeinclude file copying, and clean/dirty detection for end-of-session cleanup.
Package worktree owns the git-worktree machinery yottacode layers on top of plain `git worktree`: name generation, path resolution under <repo>/.yottacode/worktrees/, .worktreeinclude file copying, and clean/dirty detection for end-of-session cleanup.
ychome
Package ychome resolves the root directory for yottacode's global state: $YOTTACODE_HOME when the override is set, ~/.yottacode otherwise.
Package ychome resolves the root directory for yottacode's global state: $YOTTACODE_HOME when the override is set, ~/.yottacode otherwise.

Jump to

Keyboard shortcuts

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