Thanks for your interest in contributing! This guide covers everything you need to get started.
- Node.js 18 or later
- pnpm >= 9
# Clone the repo
git clone https://github.com/melagiri/code-insights.git
cd code-insights
# Install dependencies (workspace root)
pnpm install
# Build all packages
pnpm build
# Link CLI for local testing
cd cli && npm linkcode-insights/
├── cli/ # Node.js CLI — parses sessions, syncs to SQLite
│ └── src/
│ ├── commands/ # CLI commands (init, sync, status, stats, dashboard, config, reset)
│ ├── providers/# Source tool providers (claude-code, cursor, codex, copilot-cli)
│ ├── parser/ # JSONL parsing and session title generation
│ ├── db/ # SQLite schema, migrations, queries
│ ├── utils/ # Config, device, paths
│ ├── types.ts # TypeScript type definitions
│ └── index.ts # CLI entry point
├── dashboard/ # Vite + React SPA (embedded local dashboard)
├── server/ # Hono API server (serves dashboard + REST API)
└── docs/ # Product docs, plans, architecture
git checkout -b feature/your-feature-name
# or: fix/description, chore/descriptionBranch naming conventions:
feature/*— New featuresfix/*— Bug fixeschore/*— Maintenance, dependencies, config
# Watch mode for the CLI
cd cli && pnpm dev
# Watch mode for the dashboard
cd dashboard && pnpm dev
# Watch mode for the server
cd server && pnpm dev# From the workspace root — builds all 3 packages
pnpm build# Primary testing path — syncs sessions and opens the dashboard
code-insights
# Test individual commands
code-insights sync --dry-run
code-insights stats
code-insights dashboard- Keep PRs focused — one feature or fix per PR
- Write a clear description of what changed and why
- Reference any related issues
- TypeScript with strict mode enabled
- ES Modules (
import/export, notrequire) - Match the existing style in surrounding code
- Use
chalkfor colored terminal output,orafor spinners
- Check open issues for bugs and feature requests
- Issues labeled
good first issueare a great starting point - If you want to work on something not listed, open an issue first to discuss
When filing a bug report, include:
- What you expected to happen
- What actually happened
- Steps to reproduce
- Node.js version (
node --version) - OS and version
Open an issue with:
- The problem you're trying to solve
- Your proposed solution
- Any alternatives you considered
Follow the existing convention:
type(scope): short description
# Examples:
feat(cli): add export command for session data
fix(parser): handle empty JSONL files gracefully
docs: update CLI README with troubleshooting section
chore(cli): update better-sqlite3 dependency
Types: feat, fix, docs, chore, refactor, test
By contributing, you agree that your contributions will be licensed under the MIT License.