About

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.

v0.4.1Apache-2.0

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.

  • Bun
    CLI runtime and package scripts
  • React + OpenTUI
    Terminal interface
  • AI SDK
    Streaming model calls
  • OpenRouter
    Current BYOK model route
  • Shared tool schemas
    Agent permissions and actions

What it isn't

License

Apache-2.0. Use it, fork it, ship it. The full license is in the repo.