Development Setup
Development Setup
Prerequisites
- Node.js ≥ 20 (
node --version) - npm (comes with Node.js)
- git
- Claude Code installed and authenticated (for integration testing)
Clone and Install
git clone https://github.com/lespaceman/athena-flow-cli.git
cd athena-flow-cli
npm installBuild
Compile TypeScript to the dist/ directory:
npm run buildWatch Mode
For active development, run the watcher. It rebuilds automatically on file changes:
npm run devRun Locally
After building, link the package globally so athena resolves to your local build:
npm link
athena --versionType Checking
npm run typecheckRuns tsc --noEmit. Run this before submitting a PR.
Tests
npm testRuns the full Vitest suite. Watch mode during development:
npm run test:watchFor a specific test file:
npx vitest run src/path/to/file.test.tsLinting & Formatting
npm run lint # prettier --check + eslint
npm run format # prettier --writeDead Code Check
npm run lint:deadRuns Knip to detect unused exports, files, and dependencies. Run occasionally to keep the codebase clean.
Performance Profiling
npm run perf:tui -- -- --sessions # Full: CPU + trace + app instrumentation
npm run perf:cpu -- -- --sessions # CPU profile only
npm run perf:trace -- -- --sessions # Node trace events only
npm run perf:heap -- -- --sessions # Heap profiling onlySee Performance Profiling for details.
Environment Notes
.nvmrcpins the Node.js version. Runnvm useto switch to it if you use nvm..editorconfigand.prettierignoreconfigure editor and formatter behavior.- The
.claude/directory contains Claude Code project instructions for AI-assisted development on the repo itself. - Set
ATHENA_DEBUG=1to enable debug logging from the hook registration and socket server.