Thank you for your interest in contributing to Uni-CLI! This guide covers the three main types of contributions.
Adding a new adapter is the fastest way to contribute. Most adapters are just 20-40 lines of YAML.
YAML adapter (preferred for simple cases):
- Create a directory:
src/adapters/<site>/ - Add YAML files for each command:
<command>.yaml - Test:
npm run dev -- <site> <command> - Add tests:
tests/adapter/<site>.test.ts - Update
registry.jsonif you want it listed on the Hub
TypeScript adapter (for complex logic):
- Create
src/adapters/<site>/<command>.ts - Use the
cli()registration helper fromregistry.ts - Follow existing patterns in
src/adapters/
- Open an issue first to discuss the feature
- Follow existing code patterns
- Include tests for any new functionality
- Run
npm run verifybefore submitting
- Reference the related issue in your PR
- Include a test that reproduces the bug
- Ensure all existing tests still pass
| Type | Use When |
|---|---|
web-api |
Target has a REST API (public or authenticated) |
desktop |
Target is a local desktop application |
browser |
Requires full browser automation |
bridge |
Wrapping an existing CLI tool |
service |
Target is an HTTP service (local or remote) |
git clone https://github.com/olo-dot-io/Uni-CLI.git
cd Uni-CLI
npm install
npm run dev -- list # Verify setup
npm run dev -- hackernews top # Test a built-in adapter- TypeScript strict mode — no
anyunless unavoidable - All commands support
--format jsonfor machine-readable output - YAML adapters preferred over TypeScript for simple API calls
- Exit codes follow sysexits.h conventions
npm run test # Unit tests
npm run test:adapter # Adapter integration tests
npm run verify # Full verification (format + tsc + lint + test + build)Use conventional commits. Local commits and PR titles are both checked, because squash/merge subjects come from the PR title:
feat: add Bilibili video search adapter
fix: resolve cookie extraction on macOS Chrome
docs: add desktop adapter guide
test: add unit tests for YAML pipeline runner
Allowed types: feat, fix, docs, test, refactor, perf, build,
ci, chore, release, revert.
PR titles must follow the same shape. Do not use free-form titles like
Add Office control adapters; use feat(office): add control adapters.
Keep the documentation set small and contractual.
Maintained public entry points are:
README.md/README.zh-CN.md— product overview and install pathAGENTS.md— compact agent command contractdocs/index.md— public landing page for the VitePress docs sitedocs/guide/getting-started.mdanddocs/guide/integrations.md— first-run and agent setup guidesdocs/ADAPTER-FORMAT.mdanddocs/reference/pipeline.md— adapter authoring contractdocs/reference/release.mdanddocs/reference/maintenance.md— release and maintenance contractscontributing/COPY.mdanddocs/ROADMAP.md— copy rules and current public postureCHANGELOG.md— release history generated by changesets
Generated files such as stats.json, docs/adapters-catalog.json, and STATS
markers in docs are script-owned. Update them with the existing build/release
commands, not by hand.
Before adding a new standalone doc, first try to update one of the maintained entry points. Add a new doc only when it has a stable audience, a stable owner, and would make an existing maintained doc too large.
By submitting a pull request or otherwise contributing to this project, you agree to the terms of our Contributor License Agreement. This agreement grants the project maintainer the necessary rights to distribute and sublicense your contributions as part of the project.
Please review the CLA before submitting your first contribution.
- Fork the repo and create a feature branch from
main - Make changes following the guidelines above
- Run
npm run verify— all checks must pass - Push and open a PR against
main
Open a Discussion or an issue tagged question.