yottacode

module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT

README

yottacode

An autonomous, self-learning AI coding agent that handles complex, multi-step development tasks — directly from your terminal, with the model of your choice.

Go Release CI Docs

Getting StartedAgent CoreMemoryProvidersModelsWorkflowReference


yottacode is an autonomous, self-learning coding agent. Give it a goal in plain language and it plans the work, reads and edits real repositories, runs commands and tests, drives git, and iterates until the task is done — all from your terminal. It's model-agnostic by design: bring your own provider and swap models mid-session without changing how you work. As it goes, a self-learning memory layer captures what it discovers about you and your codebase and surfaces the most relevant pieces back into every turn, so it gets sharper the more you use it — while a built-in security policy of layered approvals and path validation gates every edit and shell command, keeping that autonomy under your control. Around the core loop you get an interactive terminal UI, a scriptable one-shot mode for automation, durable sessions, and cross-session recall.

Status: pre-1.0 (v0.3.0). The CLI, configuration, and on-disk formats are stabilizing. Pin a tag if you depend on yottacode from scripts.


Quick Start

One-liner install (Linux + macOS):

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

Then launch the interactive setup wizard:

yottacode setup

Windows users should run yottacode under WSL.

Manual install (pinned version, no installer script)
export VERSION=0.3.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 in SHA256SUMS on each release.

For build-from-source, cross-compilation, manual provider configuration, and other install paths, see docs/installation.md.


Why yottacode

  • Memory that learns you. Memory is plain text and grep-able: you own USER.md, and the agent curates everything else through memory_save / memory_forget (project writes to YOTTACODE.md are approval-gated). A per-turn retrieval engine surfaces only what's relevant, so yottacode gets sharper about you and your codebase the more you use it. See docs/memory.md.

  • Use any model, switch any time. Native adapters for OpenAI, Anthropic, Google Gemini, xAI (Grok), local Ollama (no API key), and ChatGPT OAuth, plus a generic OpenAI-compatible adapter for NVIDIA NIM, Groq, vLLM, Llama Stack, or any custom /v1 gateway. Swap provider or model mid-session with /provider use and /model — no lock-in, and no hidden default that silently bills you.

  • A built-in security policy. A first-launch trust prompt scopes each workspace, mutating tools pause for approval with a syntax-highlighted diff, and project rules support allow / ask / deny (deny wins) for team-shared pre-approvals. Write-path validation confines edits to the working tree, blocks symlink writes, and firewalls secret-bearing paths (.env, ~/.ssh, cloud credentials) from both reads and writes. Tools run on the host with no in-process sandbox — containerize for stronger isolation. See docs/security-and-allow-lists.md.

  • Deep GitHub integration. A typed go-github adapter (no shelling out to the gh CLI) gives the agent first-class pull-request and issue tools — read and review PRs, open and update them, post review comments, and triage issues — plus slash commands like /git-create-pr, /git-review-pr, and /git-implement-issue, which takes an issue end-to-end: research → plan → branch → implement → tests → commit → push → draft PR. See docs/github.md.

  • A deep, repo-aware tool surface. Forty built-in tools span reads, writes, search, a full git suite (status / diff / blame / log / commit / checkpoint / rollback / file-at-revision), bash, tests, the todo_write working-plan tracker, and the plan-mode tools — each with an explicit approval policy. See docs/tools.md.

  • Plan first, then let it run. Plan mode (/plan, Shift+Tab, or --permission-mode plan) investigates read-only and drafts a plan you approve; approving drops into auto mode so implementation skips per-tool prompts, while run_bash, git_commit, git_checkpoint, and rollback stay in the safety floor. Shift+Tab cycles normal → auto → plan mid-turn, and the agent can never escalate its own permissions.

  • Delegate to typed subagents. Hand research, code search, planning, and verification to subagents that run in their own context window, so the parent only sees the final answer. Four ship built-in — Explore, Plan, general-purpose, and verification — and you can add your own under .yottacode/agents/.

  • Reusable skills, loaded on demand. 17 built-in skill playbooks (SSH/remote ops, git investigation, TDD, security audit, code review, performance profiling, and more) load only when relevant, and you can install your own from a path, URL, or GitHub shorthand. Skills stay off until you enable them each session, following the agentskills.io spec.

  • Undo any step. Every message is auto-checkpointed with the conversation and the pre-edit contents of the files about to change, so /checkpoints (or a double-tap of Esc) rolls back conversation, files, or both — with a configurable 30-day TTL.

  • Never lose a session. Per-turn atomic saves survive crashed terminals, /recall runs local full-text search across every saved session, and /summarize compacts long histories after snapshotting the original transcript.

  • Work in parallel. yottacode --worktree <name> runs a session in its own git worktree so two agents can edit the same repo without colliding, and a per-repo .worktreeinclude copies gitignored configs into each one. See docs/worktrees.md.

  • Make it your own. Add /your-command by dropping a markdown file into ~/.yottacode/commands/ or .yottacode/commands/, with $ARGUMENTS substitution, optional frontmatter, and @<path> file references.

  • Built for the terminal. Inline rendering keeps your scrollback intact, with markdown-rendered output, a Tab-completing slash palette, multi-line input, image paste, and a ? cheatsheet. Run it interactively, or script the same core in one-shot mode — yottacode run "…" puts the answer on stdout and reasoning on stderr — all from a single static Go binary.


Commands

Type / in the TUI to open the command palette — it filters as you type and supports Tab completion.

Command Description
/help List all commands with help text
/clear Start a fresh session (the current one is saved)
/sessions [id|name] Open the sessions menu, or resume a session directly
/recall <query> Full-text search across every saved session
/summarize Compress session history into a structured summary
/checkpoints Restore conversation and/or files to a prior prompt (also Esc Esc)
/redo Edit and re-run the most recent message
/usage Per-session token usage, today's rollup, and estimated cost
/context Show the context-window usage breakdown
/model [name] Open the model picker, or switch the active model
/provider Select or inspect a provider (list, use, add, remove, models)
/effort [level] Set reasoning effort where supported (default · low · medium · high)
/doctor Probe provider auth and model access
/memory Open the memory picker (/memory search <q> ranks saved memories)
/system Show the active system prompt, including injected memory
/init Draft .yottacode/YOTTACODE.md from the current repo
/permissions Show where permissions are configured
/max-iterations <N> Cap tool-call iterations per turn (default 50; auto mode doubles)
/plan Toggle plan mode (/plan list resumes a saved plan; also Shift+Tab)
/subagents Open the subagents picker — view, stop, or list agent types
/skills Open the skills menu (install, show, uninstall, check, update)
/git-commit Compose and run a one-line commit on the staged changes
/git-create-pr [base] Open a pull request for the current branch
/git-update-pr [ref] Refresh a PR's title and body to match the commit list
/git-review-pr [ref] Self-review a PR: failing checks, blockers, suggestions, nits
/git-push Push the current branch to origin (sets upstream on first push)
/git-implement-issue <n> Implement a GitHub issue end-to-end: fetch → plan → branch → code → tests → commit → push → draft PR
/mcp Manage MCP servers (/mcp logs <name> dumps recent stderr)
/theme [name] Change the color theme (live preview; persists to config)
/setup Re-run the setup wizard (reloads config on return)
/quit Exit yottacode

Auto mode and the permissions-bypass overlay are intentionally not slash commands: enter auto mode with Shift+Tab (or --permission-mode auto), and the bypass overlay only via yottacode --yolo at launch.

Full references: docs/cli.md and docs/tui-slash-commands.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/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
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.


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
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).
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.
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
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.
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.
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.
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.
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