Thank you for your interest in contributing to UptimeKit! We welcome contributions from the community.
- Node.js 16 or higher
- npm or yarn
- Git
-
Fork the repository
# Click the "Fork" button on GitHub -
Clone your fork
git clone https://github.com/YOUR_USERNAME/UptimeKit-CLI.git cd UptimeKit-CLI -
Install dependencies
npm install
-
Build the project
npm run build
-
Link for local testing
npm link
-
Test your changes
upkit start upkit add https://google.com -t http -i 30 upkit st
uptimekit-cli/
├── src/
│ ├── commands/ # CLI command implementations
│ ├── core/ # Database and shared logic
│ ├── daemon/ # Background worker process
│ └── ui/ # Terminal UI components (Ink/React)
├── dist/ # Compiled output (generated)
└── README.md
-
Create a new branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the existing code style
- Keep changes focused and atomic
- Write clear, descriptive commit messages
-
Build and test
npm run build upkit start # Test your changes -
Commit your changes
git add . git commit -m "feat: add new feature"
We follow the Conventional Commits specification:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
Examples:
feat: add support for TCP port monitoring
fix: resolve daemon crash on Windows
docs: update installation instructions
-
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Go to the original repository on GitHub
- Click "New Pull Request"
- Select your fork and branch
- Fill in the PR template with details about your changes
-
PR Guidelines
- Provide a clear description of the changes
- Reference any related issues
- Ensure all checks pass
- Be responsive to feedback
- Use ES6+ syntax
- Use 2 spaces for indentation
- Use meaningful variable names
- Add comments for complex logic only
- Keep functions small and focused
- Update
src/daemon/worker.jswith the new monitor logic - Update
src/commands/add.jsto accept the new type - Update documentation in README files
- Create a new file in
src/commands/ - Export a
register{Command}Commandfunction - Register it in
src/index.js - Update documentation
UptimeKit uses Jest for testing with 180+ tests including unit tests and TUI snapshot tests.
# Run all tests
npm test
# Run tests in watch mode (useful during development)
npm run test:watch
# Run tests with coverage report
npm run test:coverage
# Update snapshots after intentional UI changes
npm run test:update-snapshotstests/
├── setup.js # Test setup and cleanup
├── commands/ # Command tests
│ └── commands.test.js
├── core/ # Core module tests
│ ├── db.test.js
│ └── notifier.test.js
├── ui/ # UI snapshot tests
│ ├── snapshot.test.js
│ └── __snapshots__/
└── utils/ # Helper function tests
└── helpers.test.js
- Unit tests: Test individual functions in isolation using mocks
- Snapshot tests: Capture TUI output to detect unintended UI changes
- Run
npm testbefore submitting PRs - Update snapshots only for intentional UI changes
- Add tests for new functionality
- Run
npm testto ensure all tests pass - Test on multiple platforms if possible
- Verify daemon behavior
- Check UI rendering
We use Changesets for releases.
npm run changesetPick the version type:
- patch (1.2.26 → 1.2.27) - bug fixes
- minor (1.2.26 → 1.3.0) - new features
- major (1.2.26 → 2.0.0) - breaking changes
Write a quick summary, commit the generated file with your PR.
Add a changeset if your PR has:
- ✅ Bug fixes
- ✅ New features
- ✅ Breaking changes
Don't add a changeset if your PR only has:
- ❌ Documentation updates
- ❌ Test changes
- ❌ CI/workflow changes
- ❌ Typo fixes
For minor fixes like docs or typos, skip the changeset. No need to run anything extra!
When reporting bugs, please include:
- UptimeKit version (
upkit -v) - Node.js version (
node -v) - Operating system
- Steps to reproduce
- Expected vs actual behavior
- Error messages or logs
When requesting features:
- Describe the use case
- Explain why it would be valuable
- Provide examples if possible
- Open an issue for questions
- Check existing issues and PRs first
- Be respectful and constructive
By contributing to UptimeKit, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to UptimeKit! 🚀