Thank you for your interest in contributing to codesession-cli! We welcome contributions from the community.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples - include command outputs, screenshots, or code snippets
- Describe the behavior you observed and what you expected to see
- Include your environment details: OS, Node.js version, npm version, codesession-cli version
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
- Use a clear and descriptive title
- Provide a detailed description of the suggested enhancement
- Include examples of how the enhancement would be used
- Explain why this enhancement would be useful to most users
- Fill in the required pull request template
- Follow the coding style used throughout the project
- Include tests when adding new features
- Update documentation for any changed functionality
- End all files with a newline
-
Fork and clone the repository
git clone https://github.com/YOUR-USERNAME/codesession-cli.git cd codesession-cli -
Install dependencies
npm install
-
Build the project
npm run build
-
Run in development mode
npm run dev
-
Build the dashboard
npm run build:dashboard
codesession-cli/
├── src/ # Core CLI source code
│ ├── index.ts # Main CLI entry point (thin orchestrator)
│ ├── commands/ # CLI command handlers (start, end, run, etc.)
│ ├── db/ # Database layer (sessions, analytics, pricing, etc.)
│ ├── formatters.ts # Output formatting utilities
│ ├── watcher.ts # File watcher
│ ├── git.ts # Git polling and diff utilities
│ ├── agents.ts # Programmatic agent API
│ ├── proxy.ts # Local API proxy
│ ├── today.ts # Multi-project context (cs today)
│ ├── mcp-server.ts # MCP server implementation
│ └── __tests__/ # Vitest test suites
├── dashboard/ # Web dashboard (React + Vite)
│ └── src/
│ ├── App.tsx # Main dashboard app with routing
│ └── components/ # Dashboard UI (Overview, Sessions, Help, etc.)
├── scripts/ # Build and utility scripts
└── docs/ # Documentation
- Use TypeScript for all new code
- Maintain type safety - avoid
anywhen possible - Use interfaces for object shapes
- Export types that may be used by consumers
- Use 2 spaces for indentation
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused
- Use clear and meaningful commit messages
- Follow conventional commits format when possible:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesrefactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
Example: feat: add support for new AI agent pricing
Run tests before submitting a pull request:
npm testIf you're adding new functionality, please include appropriate tests.
- Update the README.md if you change functionality
- Add JSDoc comments for public APIs
- Update CHANGELOG.md with your changes
Releases are handled by project maintainers. The process includes:
- Version bump in package.json
- Update CHANGELOG.md
- Create GitHub release
- Publish to npm
- Check the README for basic usage
- Review existing Issues
- Join discussions in GitHub Discussions
Contributors will be recognized in:
- GitHub contributors page
- CHANGELOG.md for significant contributions
- Project documentation
By contributing, you agree that your contributions will be licensed under the MIT License.
Don't hesitate to ask questions by opening an issue with the "question" label.
Thank you for contributing! 🎉