Three Prongs. One Power. All Yours.
TRIDENT is an all-powerful agentic AI coding assistant that runs entirely in your terminal. Inspired by Claude Code, OpenAI Codex CLI, and Qwen Code CLI โ built to surpass them all.
๐ฑ TRIDENT
โโโ โก FORGE โ Agentic coding engine (tool loop, file ops, shell execution)
โโโ ๐ฎ ORACLE โ Project context engine (TRIDENT.md, framework detection, tree scanning)
โโโ ๐ก WARDEN โ Safety & approval layer (risk classification, diffs, session logging)
# Clone or copy this project, then:
npm install
# Make globally available
npm link
# Or run directly:
npx tsx src/index.tsexport ANTHROPIC_API_KEY=sk-ant-...trident doctorcd /your/project
trident init # Generates TRIDENT.md โ the AI memory filetrident # Interactive mode
trident "add input validation" # One-shot task| Command | Description |
|---|---|
trident |
Interactive REPL mode |
trident "task" |
One-shot task execution |
trident init |
Generate TRIDENT.md for current project |
trident config |
Show full configuration |
trident config <key> <value> |
Set a config value |
trident doctor |
Check environment & API keys |
trident review |
Review last session action log |
trident --help |
Show all options |
| Flag | Description |
|---|---|
-m, --model <model> |
Override model (e.g. claude-opus-4-5) |
--mode <mode> |
Approval mode: yolo, review, lockdown |
--max-turns <n> |
Max agent loop iterations (default: 50) |
--budget <usd> |
Max spend in USD for this session |
While in interactive mode:
exitorquitโ Exit TRIDENTinitโ Generate TRIDENT.mdmode yolo|review|lockdownโ Switch approval modemodel <name>โ Switch model
| Mode | Description |
|---|---|
review (default) |
Auto-approve reads; ask for writes, shell, destructive |
yolo |
Auto-approve everything โ fastest, zero interruptions |
lockdown |
Ask for every single action โ maximum safety |
Every tool call is classified before execution:
| Risk | Color | Actions |
|---|---|---|
READ |
๐ข Green | read_file, list_dir, search, web_fetch |
WRITE |
๐ก Yellow | write_file, edit_file |
EXECUTE |
๐ฃ Magenta | run_command |
DESTRUCTIVE |
๐ด Red | delete_file |
TRIDENT reads TRIDENT.md from your project root and injects it into every agent prompt. This gives the AI persistent knowledge about your project.
# TRIDENT Project Context
## Project
- Name, languages, frameworks, package manager
## Commands
- Install, dev, test, build, lint
## Do Not Touch
- Files/dirs TRIDENT should never modify
## Context for AI
- Any conventions, rules, or extra context you want TRIDENT to knowRun trident init to auto-generate it. Edit it freely.
TRIDENT's agent has access to 10 tools:
| Tool | Description |
|---|---|
read_file |
Read file contents |
write_file |
Write/create a file |
edit_file |
Surgical string-replace edits |
delete_file |
Delete a file (DESTRUCTIVE) |
list_dir |
List directory (with recursive option) |
run_command |
Execute shell commands |
search_codebase |
Grep across project files |
web_fetch |
Fetch URLs (docs, APIs) |
ask_user |
Ask you a clarifying question |
final_answer |
Signal task completion |
All tools have a 30-second timeout and full session logging.
trident config # Show all config
trident config model claude-sonnet-4-5 # Switch model
trident config mode yolo # Default to YOLO mode
trident config maxTurns 100 # More iterationsConfig stored at ~/.trident-cli/config.json.
All actions are logged to ~/.trident/logs/<session-id>.jsonl.
Review the latest session:
trident reviewEach log entry contains: timestamp, tool name, input, result, approved/denied, risk level.
TRIDENT uses Anthropic's models by default:
| Model | Best For |
|---|---|
claude-opus-4-5 |
Complex agentic tasks (default) |
claude-sonnet-4-5 |
Balanced speed/quality |
claude-haiku-4-5-20251001 |
Fast, cheap tasks |
trident/
โโโ src/
โ โโโ index.ts โ CLI entry point & interactive REPL
โ โโโ config.ts โ Config management (conf-backed)
โ โโโ agent/
โ โ โโโ loop.ts โ Main agent loop (streaming + tool calling)
โ โ โโโ tools.ts โ Tool definitions + executors
โ โโโ providers/
โ โ โโโ anthropic.ts โ Streaming Anthropic provider
โ โโโ oracle/
โ โ โโโ index.ts โ Project scanner, TRIDENT.md, system prompt
โ โโโ ui/
โ โ โโโ renderer.ts โ Terminal UI (chalk-based)
โ โ โโโ diff.ts โ Colored diff viewer
โ โโโ warden/
โ โโโ index.ts โ Risk classifier, approval, session logger
โโโ package.json
โโโ tsconfig.json
โโโ README.md
- Think before acting โ The agent plans before calling tools
- Minimal blast radius โ Surgical edits preferred over full rewrites
- Verify work โ Tests/linters run after changes when available
- Ask when uncertain โ Clarification over wrong assumptions
- Full transparency โ Every action logged, every risk shown
- Complete tasks โ The agent doesn't stop until it's done
Built with โก TypeScript, Anthropic SDK, Commander, Chalk, Inquirer, Execa