- Update project branding from claude-cli to Kode - Reorganize documentation with new development guides - Add CONTRIBUTING.md and Chinese README - Remove worktree_merge command and relocate system-design.md - Update dependencies and package configuration - Improve custom commands service with better error handling - Clean up storage utilities and debug logging
79 lines
2.3 KiB
Markdown
79 lines
2.3 KiB
Markdown
# Kode Project Structure
|
|
|
|
## Overview
|
|
Clean, modern TypeScript CLI project using Bun for development and building.
|
|
|
|
## Build System
|
|
- **Runtime**: Bun (preferred) with Node.js fallback
|
|
- **Build Tool**: Custom build.ts using Bun
|
|
- **Package Manager**: Bun (with npm publish compatibility)
|
|
- **TypeScript Execution**: Direct source execution (no bundling)
|
|
|
|
## Key Files
|
|
```
|
|
.
|
|
├── cli.js # Smart CLI wrapper (generated)
|
|
├── build.ts # Build script
|
|
├── package.json # Package configuration
|
|
├── tsconfig.json # TypeScript configuration
|
|
├── yoga.wasm # Required WASM file for Ink
|
|
├── .npmrc # NPM configuration (generated)
|
|
├── .gitignore # Git ignore rules
|
|
├── .prettierrc # Code formatting config
|
|
│
|
|
├── src/ # Source code
|
|
│ ├── entrypoints/
|
|
│ │ ├── cli.tsx # Main CLI entry point
|
|
│ │ └── mcp.ts # MCP server entry
|
|
│ ├── commands/ # Command implementations
|
|
│ ├── components/ # React/Ink components
|
|
│ ├── tools/ # AI tool implementations
|
|
│ ├── services/ # Core services
|
|
│ ├── hooks/ # React hooks
|
|
│ ├── utils/ # Utility functions
|
|
│ └── constants/ # Constants and configurations
|
|
│
|
|
├── docs/ # Documentation
|
|
│ └── custom-commands.md
|
|
│
|
|
├── scripts/ # Build and utility scripts
|
|
│ └── prepublish-check.js
|
|
│
|
|
├── test/ # Test files
|
|
│ └── customCommands.test.ts
|
|
│
|
|
├── README.md # English documentation
|
|
├── README.zh-CN.md # Chinese documentation
|
|
├── PUBLISH.md # Publishing guide
|
|
├── KODE.md # Project context (generated)
|
|
└── system-design.md # System architecture doc (Chinese)
|
|
```
|
|
|
|
## Build & Run
|
|
|
|
### Development
|
|
```bash
|
|
bun run dev
|
|
```
|
|
|
|
### Build
|
|
```bash
|
|
bun run build
|
|
```
|
|
|
|
### Test CLI
|
|
```bash
|
|
./cli.js --help
|
|
```
|
|
|
|
### Publish
|
|
```bash
|
|
npm publish --access public
|
|
```
|
|
|
|
## Clean Architecture
|
|
- No build artifacts in source control
|
|
- Single lock file (bun.lock)
|
|
- Generated files properly ignored
|
|
- Clear separation of concerns
|
|
- Minimal dependencies bundled |