About KnightCode
An alpha-stage terminal coding app built with Bun, React, and OpenTUI. Install it from npm, bring your own model key, and run it inside the repo you are working on.
What it is
KnightCode is a terminal-first AI coding app for developers who want agentic workflows without moving into a hosted web interface. It runs as a CLI, renders an interactive terminal UI, and gives the agent access to repo-aware tools such as file reads, edits, search, shell commands, todos, tasks, and subagents.
The current alpha is BYOK-first. Onboarding is built around your own OpenRouter key and model choice, so KnightCode does not bundle model usage or require a KnightCode account.
Who builds it
Mostly me - Raghav. KnightCode started as a side project because I wanted a free to use coding agent that felt native to the terminal instead of pasted beside it. It's still early, but the direction is clear: repo context, explicit tool use, and practical workflows.
Contributions, bug reports, and feature requests are welcome on GitHub.
How it's built
Bun runs the CLI package and scripts. React drives the terminal interface through OpenTUI. The shared package defines model metadata and agent tools, while the CLI handles onboarding, streaming model calls, permissions, task state, and terminal interaction.
- BunCLI runtime and package scripts
- React + OpenTUITerminal interface
- AI SDKStreaming model calls
- OpenRouterCurrent BYOK model route
- Shared tool schemasAgent permissions and actions
What it isn't
- It isn't a hosted service. There's no KnightCode account.
- It isn't a bundled AI subscription. Provider usage is handled through your own key.
- It isn't a replacement for your core shell. KnightCode is an additive coding workflow that can run commands with your approval.
License
Apache-2.0. Use it, fork it, ship it. The full license is in the repo.