CodeN Documentation
CodeN is a coding agent built around pluggable tool plugins. Its core execution path stays small and inspectable: the model sees tool contracts and decides when to call them; CodeN validates, authorizes, executes, records, and returns results to the next model request. You can observe and reshape this path.
These docs are for readers who want to understand an agent rather than merely copy commands. Build a model of the runtime and its security boundaries first, then choose Plugins, Skills, Hooks, or project instructions to extend it; use the protocol reference for exact fields. Every behavioral claim is grounded in the current source, tests, and published artifact.
CodeN is a coding agent built around pluggable tool plugins. It drives provider-native tool calling to read, modify, and execute commands locally; its small, inspectable core does not depend on an agent framework or server-side code execution.
Shortest path to a first task
Section titled “Shortest path to a first task”bun add -g @twinklerg/coden # or npm install -g @twinklerg/codenexport CODEN_OPENAI_API_KEY=... # or CODEN_ANTHROPIC_API_KEYcoden "fix the failing tests in this project"Install, configure, and finish a first task in three commands. CodeN starts in the CLI/REPL by default and treats the working directory as its workspace.
Workflow
Section titled “Workflow”| Step | Task | Page |
|---|---|---|
| 1 | Confirm the runtime environment | Requirements |
| 2 | Install CodeN | Install CodeN |
| 3 | Configure your first provider | Configure Your First Provider |
| 4 | Understand the interface modes | Launch the CLI / TUI |
| 5 | Complete your first task | Complete Your First Task |
Documentation map
Section titled “Documentation map”- Core Concepts: agent loop, workspace, tools and risk levels, approval modes, sessions, context and thinking levels.
- Interfaces: CLI/REPL, full-screen TUI, print mode, slash commands, CLI options.
- Configuration: precedence, scopes, environment variables, OpenAI/Anthropic setup, language and thinking levels, field reference, credential and data security.
- Skills: discovery, creating a skill, installation and debugging.
- Plugins: local TypeScript plugins, npm plugin management, author protocol, trust and security boundaries, marketplace.
- Agent Hooks: events, matchers, I/O protocol, decisions and permissions, execution and timeouts, trust and security, examples.
- Advanced: Smart Approval, outside-workspace access, session storage, custom base URL, automation.
- Reference: CLI reference, configuration reference, troubleshooting, FAQ, security model.
Boundaries to keep in mind
Section titled “Boundaries to keep in mind”- Every command, configuration key, and behavior in these docs is verified against the current source code.
- CodeN does not read the system locale; the default interface language is Chinese.
bashand plugins run with the current user’s process permissions. This is not a general-purpose sandbox; risk classification is a heuristic guard against mistakes.- Session JSONL and trace files may contain sensitive content; do not share them without review.