Thank you for your interest in contributing to the Ably CLI!
All code changes, whether features or bug fixes, MUST follow the mandatory workflow outlined in AGENTS.md.
In summary, this involves:
- Build: Run
pnpm prepareto compile and update manifests, thenpnpm exec oclif readmeto regenerate the README. - Lint: Run
pnpm exec eslint .and fix all errors/warnings. - Test: Run relevant tests (
pnpm test:unit,pnpm test:integration,pnpm test:e2e,pnpm test:playwright, or specific files) and ensure they pass. For interactive mode changes, also runpnpm run test:tty(requires a real terminal, not run in CI). Add new tests or update existing ones as needed. - Document: Update all relevant documentation (
docs/,AGENTS.md,README.md) to reflect your changes.
Pull requests will not be merged unless all these steps are completed and verified.
Before starting work, please familiarize yourself with:
- Project Structure: Know where different code components live.
- Testing Strategy: Understand the different types of tests and how to run them.
- AGENTS.md: Development standards, coding conventions, and Ably API/SDK guidance.
Please report bugs or suggest features using GitHub Issues.
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes, ensuring you follow the Mandatory Development Workflow described above.
- Commit your changes with clear messages.
- Push your branch to your fork.
- Create a Pull Request against the
mainbranch of theably/clirepository. - Ensure all CI checks pass.
For Ably engineers working on terminal server features:
- Clone the private
cli-terminal-serverrepository - Run the server locally:
pnpm dev - Set environment variable:
export TERMINAL_SERVER_URL=ws://localhost:8080(adjust the port if your local server runs on a different port) - Run CLI tests:
pnpm test:e2e
This allows testing CLI changes against local server modifications before deployment.
- Make sure all checks are passing on main
- Create a new release branch, in the format
release/<version>where the version is the SemVer version of the release. In that branch:- Update the
package.jsonversion to the new version. - Run
pnpm exec oclif readmeto regenerate the README with updated command documentation. - Update the
CHANGELOG.mdwith any user-affecting changes since the last release. - Review the generated README.md changes to ensure they're correct.
- Stage all changes:
git add package.json README.md CHANGELOG.md - Commit all changes with a message like
chore: prepare release <version>. - Update the
package.jsonforpackages/react-web-cli.
- Update the
- Once the release branch is approved, merge it into main.
- Create a new tag on the merged commit in main, which will run the release workflow:
git tag -a v<version> -m "Release v<version>" git push origin v<version>
- Verify that:
- The GitHub Actions release workflow completes successfully
- A new GitHub release is created
- The new release has been published to NPM