Thank you for your interest in contributing to perp-cli! This guide will help you get started.
- Node.js >= 20
- pnpm >= 10
git clone https://github.com/hypurrquant/perp-cli.git
cd perp-cli
pnpm install
pnpm run build# CLI
node dist/index.js status
# MCP server
node dist/mcp-server.js# Unit tests (required before submitting a PR)
pnpm test
# Integration tests (optional — requires exchange API keys)
pnpm run test:integration- Search existing issues to avoid duplicating work
- Open an issue first for large changes or new features — let's discuss before you code
- Small PRs are preferred — easier to review and merge
- Fork the repository
- Create a branch from
main(git checkout -b feat/my-feature) - Make your changes
- Run
pnpm testand ensure all tests pass - Run
pnpm run buildand ensure it compiles - Commit with a clear message (e.g.
feat: add market depth command) - Push to your fork and open a Pull Request
We follow a lightweight Conventional Commits style:
feat:— new featurefix:— bug fixrefactor:— code change that neither fixes a bug nor adds a featuredocs:— documentation onlytest:— adding or updating testschore:— maintenance (deps, CI, etc.)
| Test type | Required for PR? | Notes |
|---|---|---|
Unit tests (pnpm test) |
Yes | Must pass |
| Integration — read-only | Optional | Maintainers will re-run if needed |
| Integration — live/mainnet | No | Never required from contributors |
Note: Integration tests hit live exchanges and may require API keys. Contributors are NOT expected to run them. Maintainers will verify these separately.
If your PR changes any of the following, please update the relevant docs:
- CLI commands or flags → update
README.md --jsonoutput shape → updateAPI_RESPONSE_SPEC.md- MCP tool name or schema → update
README.md(AI Agent section)
- TypeScript with strict mode
- ESM modules (
import/export) - Avoid
anytypes where possible - Keep functions focused and small
- Never commit API keys, private keys, or secrets
- If you find a security vulnerability, do NOT open a public issue — see SECURITY.md
- Be careful with exchange API calls that can modify positions or move funds
Open a Discussion or comment on the relevant issue.