- 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
1.2 KiB
1.2 KiB
Publishing Kode to NPM
Architecture Overview
This package uses an elegant hybrid approach:
- Bun for development and building
- Direct source execution without bundling (avoiding complex build issues)
- Automatic runtime detection (bun > tsx > npx tsx)
- Full TypeScript/JSX support out of the box
Build System
The build process (scripts/build.ts) creates:
cli.js- Smart wrapper that detects and uses the best available runtime.npmrc- Ensures proper dependency resolution
Pre-publish Checklist
- Update version in package.json
- Run build:
bun run build - Test locally:
./cli.js --help - Run checks:
node scripts/prepublish-check.js
Publishing Steps
# 1. Clean and build
bun run clean
bun run build
# 2. Test the CLI
./cli.js --help
# 3. Publish to npm
npm publish --access public
Post-publish Verification
# Install globally
npm install -g @shareai-lab/kode
# Test
kode --help
Key Features
- ✅ No complex bundling - runs TypeScript directly
- ✅ Works with both Bun and Node.js environments
- ✅ Minimal dependencies bundled
- ✅ Fast startup time
- ✅ Source maps for debugging