{"id":47633492,"url":"https://github.com/mochow13/keen-code","last_synced_at":"2026-05-08T01:02:30.481Z","repository":{"id":346191584,"uuid":"1158827208","full_name":"mochow13/keen-code","owner":"mochow13","description":"A minimal CLI-based coding agent written in Go","archived":false,"fork":false,"pushed_at":"2026-04-27T23:32:49.000Z","size":54334,"stargazers_count":12,"open_issues_count":13,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-28T01:28:00.118Z","etag":null,"topics":["agentic-ai","ai-agent","ai-assistant","ai-coding-agent","ai-coding-tool","coding-assistant"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mochow13.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-16T00:49:00.000Z","updated_at":"2026-04-27T23:32:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mochow13/keen-code","commit_stats":null,"previous_names":["mochow13/keen-code"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/mochow13/keen-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochow13%2Fkeen-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochow13%2Fkeen-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochow13%2Fkeen-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochow13%2Fkeen-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mochow13","download_url":"https://codeload.github.com/mochow13/keen-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochow13%2Fkeen-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32517232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["agentic-ai","ai-agent","ai-assistant","ai-coding-agent","ai-coding-tool","coding-assistant"],"created_at":"2026-04-01T23:55:21.038Z","updated_at":"2026-05-08T01:02:30.397Z","avatar_url":"https://github.com/mochow13.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"./assets/keen-code.png\" alt=\"Keen Code\" width=\"350\"/\u003e\n\n[![Latest Release](https://img.shields.io/github/v/release/mochow13/keen-code?style=flat-square\u0026logo=github)](https://github.com/mochow13/keen-code/releases/latest)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/mochow13/keen-code/go.yml?branch=main\u0026style=flat-square\u0026logo=githubactions\u0026logoColor=white)](https://github.com/mochow13/keen-code/actions)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/mochow13/keen-code?style=flat-square\u0026logo=go)](https://go.dev/)\n[![License](https://img.shields.io/github/license/mochow13/keen-code?style=flat-square\u0026logo=opensourceinitiative\u0026logoColor=white)](https://github.com/mochow13/keen-code/blob/main/LICENSE)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./assets/keen-demo-2.gif\" alt=\"Keen Code demo\" style=\"width: 100%; height: auto;\"/\u003e\n\u003c/div\u003e\n\n**Keen Code** is a terminal-based AI coding agent like Claude Code or OpenCode. Written in Go, it is simpler, lighter, and avoids feature bloat. It is designed to be a minimalistic but useful coding agent for typical software engineering tasks.\n\nKeen Code is also highly opinionated. It avoids features that are not necessarily needed or useful for a regular software engineer. It tries to avoid unnecessary complexity and attempts to keep the agent harness as simple as possible.\n\nKeen also has higher trust in the models. This is why Keen doesn't have a `plan` mode because SOTA models are very capable of planning tasks without attempting to make edits to the codebase. These models have gone through rigorous post-training which includes effective planning and execution capabilities.\n\nFrom requirements to implementation, Keen Code was engineered using a wide range of coding agents and agentic IDEs like Cursor, Windsurf, Claude Code, OpenCode, Codex CLI, and Kimi CLI. Note that it was always a single agent that was used to develop the project at any given time. No multi-agent orchestration was used.\n\nBy far, AI coding agents are the most ubiquitous use case for AI in the era of AI agents. The goal of the project is to showcase how coding agents can be used to develop the coding agents themselves. This is why most prompts are saved as markdown files in the `.ai-interactions` directory. \n\nKeen Code is an experiment to play with the *new way of working* where engineers work with AI agents to develop software. In this setting, engineers are sometimes referred to as \"orchestrators\".\n\n## Table of Contents\n\n- [Development Philosophy](#development-philosophy)\n- [Development Cycle Example](#development-cycle-example)\n- [Install Keen Code](#install-keen-code)\n  - [Install with script](#install-with-script)\n  - [Install with npm](#install-with-npm)\n- [Run Keen](#run-keen)\n- [Supported Providers](#supported-providers)\n- [Built-in Tools](#built-in-tools)\n- [Context Handling](#context-handling)\n\n## Development Philosophy\n\nDeveloping Keen Code is guided by the following philosophy:\n\n- All the code is written by AI agents, not humans\n- The project is developed iteratively using spec-task-code-review cycle by a human engineer\n- The human engineer has a very strict set of roles:\n  - Specifiy and clarify the requirements\n  - Review design docs and influence design decisions\n  - Review changes made by the agents\n    - Changes can also be reviewed by the agents themselves\n  - Ensure the quality and correctness of the code\n  - Focus on best practices and standards relevant to the programing language (Go in this case)\n  - Thoroughly review and test the product after each iteration\n  - Continously provide feedback to the agents to improve the product\n- Prompts are saved as markdown files in the `.ai-interactions/prompts` directory\n  - Almost all of the prompts are stored to showcase how the project evolved from the initial requirements to the current state\n  - Prompts are pretty much chronologically ordered which demonstrates the thought process and iterative nature of the development\n- All the outputs are saved as markdown files in the `.ai-interactions/outputs` directory\n  - These outputs are basically plans, design docs, and breakdowns of the tasks\n  - These outputs are the \"specs\" that the agents later use to implement the tasks\n\n## Development Cycle Example\n\nAll features follow a **spec → plan → task → review** cycle. Here's a concrete example — the `read_file` tool from Phase 3:\n\n**Spec** — [`prompts/phase-3/prompt-3_read-file-tool.md`](.ai-interactions/prompts/phase-3/prompt-3_read-file-tool.md)\nRequirements defined upfront: ask permission before reading, respect FileGuard path rules, text files only, 1 MB limit, support relative and absolute paths.\n\n**Plan** — [`outputs/phase-3/output-3_read-file-tool.md`](.ai-interactions/outputs/phase-3/output-3_read-file-tool.md)\nDesign doc produced by the agent: how `Guard.CheckPath` maps to the REPL permission prompt, exact struct contracts, permission flow diagram.\n\n**Task** — [`prompts/phase-3/prompt-5_phase-3-tasks.md`](.ai-interactions/prompts/phase-3/prompt-5_phase-3-tasks.md)\nImplementation broken into steps — tool contract, permission bridge, REPL selector, unit tests — each approved before the next began.\n\n**Review** — (inline feedback during implementation)\nThe LLM was rejecting `.go` files because MIME detection flagged them as binary. Review caught this; switched to character-based text validation. The fix landed in the same iteration.\n\n## Install Keen Code\n### Install with script\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/mochow13/keen-code/main/scripts/install.sh | bash\n```\n\nTo pin a specific version:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/mochow13/keen-code/main/scripts/install.sh | bash -s -- -v v0.1.4\n```\n\nInstalls to `/usr/local/bin` if writable, otherwise `$HOME/.local/bin`.\n\n### Install with `npm`\n\nInstall the CLI globally:\n\n```bash\nnpm install -g keen-code\n```\n\nCheck that the install worked:\n\n```bash\nkeen --version\nwhich keen\n```\n\nYou can also run it without a global install:\n\n```bash\nnpx keen-code --version\n```\n\n## Run Keen\n\nStart Keen in your current directory:\n\n```bash\nkeen\n```\n\n## Supported Providers\n\n- Anthropic\n- OpenAI\n- Codex (ChatGPT OAuth)\n- Google AI (Gemini)\n- Moonshot AI (Kimi)\n- DeepSeek\n- Z.ai (GLM)\n- MiniMax\n- OpenCode Go\n\n\u003e Use `/model` to switch providers. The ChatGPT/Codex option opens a browser-based OpenAI sign-in flow and stores OAuth credentials in `~/.keen/auth.json`.\n\nMiniMax uses its Anthropic-compatible API and includes MiniMax M2.7 and M2.5.\nOpenCode Go uses an API key and includes GLM, Kimi, DeepSeek, MiMo, MiniMax, and Qwen models.\n\n## Built-in Tools\n\nKeen Code aims to support minimal set of useful tools for coding. Currently, these tools are built in:\n\n- `read_file` — read a UTF-8 text file\n- `glob` — find files by glob patterns\n- `grep` — search for text patterns in files\n- `write_file` — create or overwrite files\n- `edit_file` — replace specific text in existing files\n- `bash` — run shell commands\n\n## Context Handling\n\nKeen takes a deliberately lean approach to cross-turn context. Within a single assistant turn the model has full access to its tool calls and results, but once the turn completes Keen does **not** carry the raw tool trace forward. Instead, it distills a compact `TurnMemory` summary that records only the outcomes most likely to matter later — currently which files were changed and which bash commands failed.\n\nSubsequent turns therefore receive:\n\n- prior user and assistant messages\n- the compact `TurnMemory` summary from earlier turns\n- any pending state from a turn that failed mid-loop, so the model can resume instead of starting over\n\nThe tradeoff is intentional: smaller context and a better signal-to-noise ratio, at the cost of occasionally re-reading files or re-running searches when older observations are needed again. Read-only facts are cheap to recompute; mutated state and failures are what deserve durable memory.\n\nFor the full rationale, lifecycle, and comparison with other coding agents, see [`docs/turn-memory.md`](docs/turn-memory.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmochow13%2Fkeen-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmochow13%2Fkeen-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmochow13%2Fkeen-code/lists"}