- TypeScript - Static typing
- pnpm - Package management
- Bun - Runtime and build tool
- Ink - CLI UI with React
- OpenAI SDK - LLM integration
- Vitest - Testing framework
- Zod - Runtime type validation
- Commander - CLI framework
- Tool Pattern: All tools implement
Tool<Input, Output>interface - Concurrency: Readonly tools execute concurrently, writing tools sequentially
- Streaming: LLM responses stream progressively
- Permissions: Project-level + Session-level control
- Dual Mode: Interactive UI and non-interactive execution
- Tools (
src/tools/): Tool system with concurrency control - Permissions (
src/permissions/): Two-layer permission system - LLM (
src/llm/): Streaming client and tool integration - UI (
src/ui/): Ink-based CLI interface - Config (
src/config/): Multi-layer configuration system - Agent (
src/agent/): Core agent logic and session management
pnpm run dev # Development mode with file watching
pnpm run build # Build with Bun (output to dist/index.mjs)
pnpm run test # Run tests with Vitest
pnpm run lint # Type check with TypeScript
pnpm run format # Format code with Prettier- Node.js built-in libraries (
fs,path,os,crypto) - Third-party libraries (
react,ink,chalk,zod,openai) - Relative file imports (
./types,../utils)
Each section separated by a blank line, alphabetically sorted within sections.
- Use
pnpm run formatto format all TypeScript/TSX and Markdown files - Ensure all generated code follows import organization rules
- Run format command before committing changes
All comments must be in English for consistency.
- Dual Mode Support: Interactive UI and non-interactive execution
- Flexible LLM Support: DeepSeek, OpenAI, and custom API providers
- Fine-grained Permissions: Project-level and session-level control
- Streaming Responses: Real-time output during execution
- Configuration Management: Multi-layer config with CLI commands
Manual Release Process:
# 1. Update version number in package.json
# 2. Publish to NPM (automatically runs build and test)
pnpm publish
# The postpublish script will automatically:
# - Create git tag with version number
# - Push tags to remote repository