Alpha v0.4.1

Agentic coding,
|

KnightCode is an early, npm-installed coding app with a React/OpenTUI terminal interface, repo-aware agents, approval-based tools, and a bring-your-own-key model setup.

View on GitHub
macOSLinuxWindows
npm
Install path
BYOK
Model access
Alpha
Product stage
Apache-2.0
Open source
01Terminal App

A coding agent that lives where you already work.

KnightCode runs as an interactive OpenTUI and React app in your terminal. Start sessions from a repository, keep project context nearby, and drive the agent without switching into a hosted web app.

  • Keyboard-driven React/OpenTUI terminal interface
  • Session views built around local workspace context
  • Themeable ANSI colors and responsive terminal layout
  • Direct integration with local shells and repo tools
02Tool Approval

Review the work instead of trusting a black box.

Agent actions are shown in the terminal flow. Inspect proposed file changes, shell commands, and task progress before letting KnightCode move forward.

  • Inline views for agent file operations and diffs
  • Confirm or reject tool use as the agent works
  • Keep edits and commands explicit in the session
  • Fast terminal UI designed for keyboard use
03Repo Workflows

Let the agent read, search, edit, and run checks in context.

KnightCode is built around real repositories, not isolated prompts. It can inspect files, search code, run commands, and use durable task state while you keep control of the terminal session.

  • Repo-aware tools for search, edits, and shell commands
  • Approval-based command execution through local shells
  • Review and security-oriented prompts through agent workflows
  • Use git status, diffs, logs, and checks from the session
04Agent Suite

Subagents, checklists, and durable tasks for larger work.

For more than one-shot edits, KnightCode supports agent delegation, in-session todos, and persistent task files under .knightcode so longer work can stay organized.

  • Ephemeral checklists and durable task tracking
  • Project rules, memories, and local context files
  • Composable workflow snippets and skill support
  • OpenRouter key onboarding with model selection
  • Diagnostic doctor audits to verify environment
05Customization & Control

Stay in control of context, cost, and behavior.

Pick models, tune reasoning behavior, configure guardrails, and compact long conversations so the agent stays useful across extended sessions.

  • Compact conversation history for longer sessions
  • Control reasoning behavior from the terminal UI
  • Tool-use hooks for project-specific guardrails
  • Allow rules for repeated trusted command patterns
06Themes

A terminal interface you can live in.

Tune the interface for long sessions with bundled themes, terminal-friendly palettes, and keyboard-first dialogs.

  • Bundled themes including nord, tokyo-night, and catppuccin
  • Custom theme presets and JSON settings
  • Flexible sizing and scroll settings for terminal windows
  • Keyboard-based theme selector dialog
05 - Toolkit

Practical pieces for real repo work.

Interactive TUI

Run the coding assistant directly inside your terminal with React/OpenTUI screens and keyboard navigation.

BYOK Model Routing

Use your own model key during onboarding and keep provider costs tied to the account you already control.

Agentic Workflows

Multi-step agents can read files, edit code, search codebases, and run shell commands with approval.

Project Context

Keep rules, skills, memories, and task state close to the repository instead of isolated in a hosted chat.

Durable Task Suite

Track longer work through in-session todos and persistent .knightcode task files.

TUI Customization

Adjust theme palettes (nord, tokyo-night, catppuccin, rose-pine) and export settings as JSON presets.

Lifecycle Hooks

Configure tool-use hooks to audit, block, or shape agent actions around your project rules.

Git-aware Sessions

Ask the agent to inspect status, diffs, logs, and checks through the same shell tools you use manually.

Diagnostics Suite

Built-in /doctor command to audit your auth status, local server connection, and git repository setup.

Visible Tool Calls

Review proposed edits, command output, and permission prompts as the agent works.

Context Compaction

Summarize long chat logs to keep extended coding sessions inside the model context window.

CLI Control

Control reasoning levels (/reasoning) and configure execution guardrails with allowed commands (/allow).

06 - Install - Alpha v0.4.1

Install the CLI. Open your repo. Start a session.

KnightCode is npm-first. No account is required: install the command, connect your model key during onboarding, and run the agent close to your local workspace.

Quick Start
Install globally:
npm i -g @knightcodeai/cli
Then launch it from any repository:
knightcode
Install from npm

A single global install exposes the knightcode command on macOS, Linux, and Windows.

Bring your own model key

Current onboarding is BYOK-first, with OpenRouter-backed model routing in the CLI.

Approve tool use

Agent file edits, shell commands, and subagent work stay visible in the terminal flow.

Follow development

Releases are still alpha. Use GitHub for issues, source, and implementation details.

GitHub
FAQ

Questions, answered.

Still curious? Open an issue on GitHub and include your OS, command, and model configuration.