{"id":50944246,"url":"https://github.com/luckeyfaraday/athena-code","last_synced_at":"2026-06-17T18:07:09.995Z","repository":{"id":363825032,"uuid":"1263337356","full_name":"luckeyfaraday/athena-code","owner":"luckeyfaraday","description":"Open-source terminal AI coding agent with persistent local memory, automatic context recall, and searchable cross-session history.","archived":false,"fork":false,"pushed_at":"2026-06-10T14:57:56.000Z","size":53,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T15:10:48.274Z","etag":null,"topics":["ai","ai-agent","bun","cli","coding-agent","context-retrieval","developer-tools","llm","local-first","opencode","persistent-memory","session-search","sqlite","terminal","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/luckeyfaraday/athena-code/releases","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luckeyfaraday.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-08T21:24:35.000Z","updated_at":"2026-06-10T15:03:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/luckeyfaraday/athena-code","commit_stats":null,"previous_names":["luckeyfaraday/athena-code"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/luckeyfaraday/athena-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckeyfaraday%2Fathena-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckeyfaraday%2Fathena-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckeyfaraday%2Fathena-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckeyfaraday%2Fathena-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luckeyfaraday","download_url":"https://codeload.github.com/luckeyfaraday/athena-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckeyfaraday%2Fathena-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34459762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agent","bun","cli","coding-agent","context-retrieval","developer-tools","llm","local-first","opencode","persistent-memory","session-search","sqlite","terminal","typescript"],"created_at":"2026-06-17T18:07:09.130Z","updated_at":"2026-06-17T18:07:09.985Z","avatar_url":"https://github.com/luckeyfaraday.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Athena Code\n\n**Athena Code is an open-source terminal AI coding agent with persistent memory,\nautomatic context recall, and searchable history across coding sessions.**\n\n[![CI](https://github.com/luckeyfaraday/athena-code/actions/workflows/ci.yml/badge.svg)](https://github.com/luckeyfaraday/athena-code/actions/workflows/ci.yml)\n[![Latest release](https://img.shields.io/github/v/release/luckeyfaraday/athena-code)](https://github.com/luckeyfaraday/athena-code/releases/latest)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Platforms: Linux, macOS, Windows](https://img.shields.io/badge/platforms-Linux%20%7C%20macOS%20%7C%20Windows-lightgrey.svg)](#platform-support)\n\nAthena Code is a memory-focused fork of\n[OpenCode](https://github.com/anomalyco/opencode). It gives an AI coding agent\nlocal, durable memory; freezes relevant context for a session; recalls related\nfacts for each turn; and indexes prior conversations for later search.\n\n\u003e **Project status:** early development. Native release builds are produced for\n\u003e Linux, macOS, and Windows on x64 and ARM64. macOS and Windows binaries are not\n\u003e yet code-signed.\n\n## Demo\n\nA short look at the Athena Code terminal UI:\n\nhttps://github.com/user-attachments/assets/1a889b43-f227-42fe-b236-1df80665ab39\n\n## Why Athena Code?\n\nMost coding agents start each session without durable knowledge of your\npreferences, architecture decisions, or previous work. Athena Code adds a\nlocal-first memory layer directly to the agent loop:\n\n- **Persistent AI memory:** save stable facts, preferences, decisions, and\n  workflow notes for future sessions.\n- **Automatic contextual recall:** retrieve relevant memories for the current\n  request without sending the entire memory store on every turn.\n- **Cross-session, cross-agent search:** index and search previous\n  conversations with SQLite FTS5 — Athena Code's own, plus local Claude Code,\n  Codex, opencode, and Hermes session stores when present.\n- **Frozen session context:** build one deterministic memory snapshot per\n  session and reuse it across tool calls.\n- **Native memory tools:** expose `memory_write`, `memory_read`, and\n  `session_recall` to the model.\n- **Local agent orchestration:** spawn and coordinate Claude Code, Codex,\n  opencode, and Hermes as subagents (headless or in visible terminals), and take\n  over a recalled session in place — all from agent tools.\n- **Local-first storage:** memory and recall data stay in local files by\n  default; the memory hot path requires no Athena backend service.\n- **Open agent loop:** built on the open-source OpenCode terminal coding agent.\n\n## Quick Start\n\n### Linux and macOS\n\nInstall the latest build for the current operating system and architecture:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/luckeyfaraday/athena-code/main/scripts/install.sh | bash\n```\n\nThe installer verifies the release checksum, copies the executable to\n`~/.local/share/athena-code/bin/athena-code`, and creates\n`~/.local/bin/athena-code`. The installed command does not depend on a cloned\nrepository.\n\nInstall a specific version:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/luckeyfaraday/athena-code/main/scripts/install.sh |\n  bash -s -- --version v0.2.1\n```\n\nSee [GitHub Releases](https://github.com/luckeyfaraday/athena-code/releases)\nfor available versions, archives, checksums, and release notes.\n\n### Windows\n\nRun in PowerShell:\n\n```powershell\nirm https://raw.githubusercontent.com/luckeyfaraday/athena-code/main/scripts/install.ps1 | iex\n```\n\nThe installer verifies the release checksum, installs\n`athena-code.exe` under `%LOCALAPPDATA%\\AthenaCode`, and adds its `bin`\ndirectory to your user `PATH`.\n\n### Updating\n\nInstalled builds update themselves. On startup Athena Code checks the latest\nGitHub release in the background and shows an update prompt inside the app;\naccepting it downloads, verifies, and installs the new version (restart to run\nit). You can also update from the command line at any time:\n\n```bash\nathena-code upgrade            # latest release\nathena-code upgrade v0.2.1     # specific version\n```\n\nSet `\"autoupdate\": false` in the global config to disable the startup check,\nor `\"autoupdate\": \"notify\"` to be notified without ever auto-installing.\n\n### Build from source\n\nRequirements:\n\n- A supported Linux, macOS, or Windows host\n- Git\n- Node.js with `npx`\n- At least 5 GB of free temporary disk space\n- Visual Studio 2022 Build Tools with **Desktop development with C++** on\n  Windows\n\n```bash\ngit clone https://github.com/luckeyfaraday/athena-code.git\ncd athena-code\n./scripts/build.sh\n```\n\nThe build checks out the pinned OpenCode revision, applies Athena Code's patch\nand source overlay, installs dependencies, and writes the executable to\n`runtime-bin/\u003cplatform\u003e-\u003carchitecture\u003e/`.\n\nInstall a local Linux or macOS build by passing its generated path:\n\n```bash\n./scripts/install.sh --from-file ./runtime-bin/linux-x64/athena-code\n```\n\nOn Windows:\n\n```powershell\n.\\scripts\\install.ps1 -FromFile .\\runtime-bin\\windows-x64\\athena-code.exe\n```\n\n## Usage\n\nStart the interactive terminal UI in the current project:\n\n```bash\nathena-code\n```\n\nRun a one-shot coding task:\n\n```bash\nathena-code run \"explain this repository and identify the highest-risk module\"\n```\n\nSave and inspect durable memories:\n\n```bash\nathena-code memory add \"Use pnpm for this organization\"\nathena-code memory list\n```\n\nResume a session:\n\n```bash\nathena-code --session SESSION_ID\n```\n\nUse `athena-code --help` for the complete command reference.\n\n## How Memory Works\n\nAthena Code separates memory by lifecycle so relevant context is available\nwithout rebuilding or resending everything continuously.\n\n| Layer | Purpose | Lifecycle |\n|---|---|---|\n| Global memory | Stable user facts, preferences, and decisions | Persists across projects and sessions |\n| Project memory | Repository-specific facts and context | Stored inside the project |\n| Frozen snapshot | Bounded memory context for one agent session | Built once and reused byte-for-byte |\n| Turn recall | Memories relevant to the current request | Recomputed once per user turn |\n| Session index | Searchable excerpts from previous conversations across local agents (Athena Code, Claude Code, Codex, opencode, Hermes) | Indexed locally with SQLite FTS5, rescanned incrementally in the background |\n\nMemory locations:\n\n- Global memory: `~/.athena-code/memory/entries.jsonl`\n- Project memory: `\u003cproject\u003e/.context-workspace/memory/entries.jsonl`\n- Global cross-project session search index: `~/.athena-code/context/sessions.db`\n\nSet `ATHENA_CODE_HOME` to change the global Athena Code data directory.\n\nAthena Code tells the model to treat recalled text as background data rather\nthan as newer instructions. Do not store passwords, API keys, private keys, or\nother secrets in agent memory.\n\nFor the design rationale, see\n[Athena Turn-Ownership Memory Design](docs/athena-turn-ownership-design.md).\n\n## Agent Tools\n\nBeyond the memory layer, Athena Code exposes a set of native tools to the model\nso it can manage memory, search history, and coordinate other local agents:\n\n| Tool | Purpose |\n|---|---|\n| `memory_write` | Save a durable global memory for future sessions |\n| `memory_read` | Read back stored memories |\n| `session_recall` | Retrieve relevant excerpts from indexed past sessions |\n| `agent_spawn` | Spawn Claude Code, Codex, opencode, or Hermes as a subagent (headless, or in a visible terminal window) |\n| `agent_list` | List local agents spawned by this process |\n| `agent_message` | Send a follow-up message to a spawned agent |\n| `agent_output` | Read captured stdout/stderr from a headless agent |\n| `agent_wait` | Wait for a one-shot agent to finish and return its output |\n| `agent_stop` | Stop a headless agent or close a visible agent's terminal window |\n| `agent_takeover` | Swap the current terminal to drive a spawned agent in place |\n| `session_takeover` | Resume a recalled `{ agent, session_id }` in place, like selecting it from `/find-sessions` |\n\nInside the terminal UI, the `/find-sessions` command opens the cross-agent\nsession search dialog backed by the local session index.\n\n### Permissions\n\nBy default Athena Code runs permissionless: tool-call permission prompts are\nbypassed so the agent loop runs uninterrupted. User-defined permission rules in\nyour config still take precedence, so you can add rules to require approval for\nspecific tools or commands.\n\n## Architecture\n\nThis repository maintains a reproducible fork rather than vendoring the entire\nupstream source tree:\n\n```text\nOpenCode pinned revision\n        +\npatches/opencode-athena.patch\n        +\noverlay/packages/opencode/...\n        =\nruntime-bin/\u003cplatform\u003e-\u003carchitecture\u003e/athena-code\n```\n\nKey directories:\n\n| Path | Contents |\n|---|---|\n| `overlay/` | Athena-owned memory, recall, tools, and TUI source |\n| `patches/` | Integration and branding changes applied to OpenCode |\n| `scripts/build.sh` | Reproducible source build |\n| `scripts/install.sh` | Linux and macOS installer |\n| `scripts/install.ps1` | Windows PowerShell installer |\n| `test/` | Memory, recall, snapshot, and session-index tests |\n| `docs/` | Technical design documentation |\n\n## Development\n\nRun the focused test suite:\n\n```bash\nnpx --yes bun@1.3.14 test test\n```\n\nBuild the complete executable:\n\n```bash\n./scripts/build.sh\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the development workflow and pull\nrequest expectations.\n\n## Platform Support\n\n| Platform | Status |\n|---|---|\n| Linux x64 | Native release build |\n| Linux ARM64 | Native release build |\n| macOS Apple Silicon | Native release build; unsigned |\n| macOS Intel | Native release build; unsigned |\n| Windows x64 | Native release build; unsigned |\n| Windows ARM64 | Native release build; unsigned |\n\nPlatform support describes Athena Code packaging, not every platform supported\nby upstream OpenCode.\n\nUnsigned macOS builds may require confirmation in **System Settings \u003e Privacy \u0026\nSecurity** on first launch. Windows SmartScreen may also warn about an\nunrecognized publisher. Code signing and macOS notarization are planned release\nhardening work.\n\n## FAQ\n\n### Is Athena Code the same as OpenCode?\n\nNo. Athena Code is an independent, memory-focused fork built from a pinned\nOpenCode revision. It retains OpenCode's terminal coding-agent foundation and\nadds Athena-owned persistent memory, context snapshots, recall, session search,\ntools, branding, tests, and release packaging.\n\n### Does Athena Code require the Athena desktop application?\n\nNo. Athena Code builds and runs as a standalone terminal application. It can\nalso be launched by Athena or another terminal workspace manager.\n\n### Is memory uploaded to a server?\n\nAthena Code's native memory store, snapshots, and session index are local by\ndefault. Model requests still go to whichever AI provider you configure through\nthe underlying OpenCode provider system.\n\n### Can Athena Code remember information across repositories?\n\nYes. Global memories under `~/.athena-code` are available across folders.\nProject memories and indexed session history remain scoped to their project.\n\n### How is this different from adding instructions to `AGENTS.md`?\n\n`AGENTS.md` is best for repository instructions that should always be loaded.\nAthena Code memory is designed for durable facts and selective retrieval:\nrelevant entries are recalled for a request while unrelated entries remain out\nof the prompt.\n\n## Project Policies\n\n- [Contributing](CONTRIBUTING.md)\n- [Security policy](SECURITY.md)\n- [Support](SUPPORT.md)\n- [Code of conduct](CODE_OF_CONDUCT.md)\n- [License](LICENSE)\n- [Third-party notices](THIRD_PARTY_NOTICES.md)\n\n## License and Attribution\n\nAthena Code is available under the [MIT License](LICENSE). It is derived from\n[OpenCode](https://github.com/anomalyco/opencode), which is also MIT licensed.\nSee [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for upstream attribution.\n\nAthena Code is an independent project and is not affiliated with or endorsed by\nthe OpenCode maintainers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluckeyfaraday%2Fathena-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluckeyfaraday%2Fathena-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluckeyfaraday%2Fathena-code/lists"}