Thank you for your interest in contributing to Termly CLI! We welcome contributions from the community.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Testing
- Submitting a Pull Request
- Adding AI Tool Support
- Documentation
- Community
This project follows a simple code of conduct: be respectful and constructive. We're all here to make Termly better.
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/termly-cli.git cd termly-cli -
Add upstream remote:
git remote add upstream https://github.com/termly-dev/termly-cli.git
-
Install dependencies:
npm install
Read CLAUDE.md for a complete overview of the project structure and architecture.
Key directories:
bin/- CLI entry pointslib/commands/- Command implementationslib/session/- Session and PTY managementlib/network/- WebSocket and reconnection logiclib/crypto/- End-to-end encryptionlib/ai-tools/- AI tool registry and detectiondocs/- Architecture documentation
# Run production mode
node bin/cli.js start
# Run development mode (connects to dev server)
node bin/cli-dev.js start
# Run with local server
TERMLY_ENV=local node bin/cli.js start
# Enable debug logging
DEBUG=1 node bin/cli.js start --debug# macOS/Linux
tail -f ~/.termly/logs/cli.log
# Windows
Get-Content $env:USERPROFILE\.termly\logs\cli.log -Wait -Tail 50Use descriptive branch names:
feature/add-ollama-support- New featuresfix/windows-path-issue- Bug fixesdocs/update-readme- Documentationrefactor/session-manager- Code refactoring
Write clear, descriptive commit messages:
Fix Windows PATH issue - add npm global bin to PTY environment
- Add npm global bin paths to Windows PTY environment
- Handle both npm prefix and global bin directory
- Fixes #123
Format:
- First line: Brief summary (50-72 chars)
- Blank line
- Detailed explanation (if needed)
- Reference issues with
Fixes #123orCloses #123
- Use CommonJS (
require/module.exports) - ESM migration planned for v2.0 - Follow existing code patterns
- Add comments for complex logic
- Keep functions focused and testable
- Use descriptive variable names
Before submitting a PR, test your changes:
-
Test on your platform:
node bin/cli.js start --debug
-
Test with multiple AI tools (if applicable)
-
Test session management:
node bin/cli.js status node bin/cli.js list node bin/cli.js stop [session-id]
-
Check for errors in logs:
cat ~/.termly/logs/cli.log
If possible, test on multiple platforms:
- macOS (Intel and Apple Silicon)
- Linux (Ubuntu, Fedora, etc.)
- Windows (PowerShell and CMD)
Don't worry if you can't test everywhere - we'll help with CI/CD.
If adding AI tool support, verify:
- Tool installs correctly
- Tool runs interactively in terminal
- Tool works with Termly CLI
- Auto-detection finds the tool
- Manual selection works (
--ai <tool>)
-
Create a feature branch:
git checkout -b feature/my-feature
-
Make your changes and commit:
git add . git commit -m "Add my feature"
-
Keep your branch updated:
git fetch upstream git rebase upstream/main
-
Push to your fork:
git push origin feature/my-feature
-
Open a Pull Request on GitHub
-
Fill out the PR template completely
-
Respond to review feedback promptly
- Maintainers will review your PR
- You may be asked to make changes
- Once approved, your PR will be merged
- Your contribution will be credited in the release notes
Want to add support for a new AI tool? Great!
The AI tool must:
- Run interactively in a terminal (stdin/stdout)
- Support PTY/TTY mode
- Be installable via standard package managers
- Have a stable CLI interface
-
Test the tool manually:
# Example: testing a new tool mytool --interactive -
Add to registry (
lib/ai-tools/registry.js):'mytool': { key: 'mytool', command: 'mytool', args: ['--interactive'], displayName: 'MyTool', description: 'Description of the tool', website: 'https://mytool.dev', checkInstalled: async () => await commandExists('mytool') }
-
Test detection:
node bin/cli.js tools detect node bin/cli.js start --ai mytool
-
Update documentation:
- Add to README.md "Supported AI Tools" section
- Update CLAUDE.md if needed
-
Submit PR with:
- Registry changes
- Documentation updates
- Screenshots of tool working
If your changes affect:
- User-facing features: Update README.md
- Implementation details: Update CLAUDE.md
- Architecture: Update docs/ARCHITECTURE.md
- Protocol changes: Update COMMUNICATION_PROTOCOL.md
- Crypto changes: Update CRYPTO_SPEC.md
- Be clear and concise
- Include code examples
- Add screenshots when helpful
- Test your instructions
- GitHub Discussions: https://github.com/termly-dev/termly-cli/discussions
- Issues: https://github.com/termly-dev/termly-cli/issues
- Documentation: https://termly.dev/docs
Before reporting:
- Check existing issues
- Try the latest version
- Collect relevant information (OS, Node.js version, logs)
Use issue templates:
- Bug Report
- Feature Request
- AI Tool Support Request
We love feature suggestions! Use the "Feature Request" template and include:
- Clear description
- Use case
- Proposed solution
- Any implementation ideas
Contributors are recognized in:
- GitHub contributors page
- Release notes
- README.md (for significant contributions)
Feel free to ask questions in:
- GitHub Discussions
- Issue comments
- Pull request comments
We're here to help!
Thank you for contributing to Termly CLI! 🎉
Every contribution, no matter how small, makes a difference.