Thanks for thinking about contributing. site2cli is MIT-licensed and built in the open. Even one-line doc fixes get merged.
git clone https://github.com/lonexreb/site2cli.git
cd site2cli
pip install -e ".[dev]"
pytest # 553 offline tests, should finish in <8s
pytest -m live # 6 live tests (hits jsonplaceholder + httpbin)
ruff check src/ tests/Pick whichever fits your background.
| Area | Examples |
|---|---|
| Discovery adapters | HAR file ingest in src/site2cli/discovery/trace.py; Bruno / Postman collection exporters from OpenAPI |
| Code generators | TypeScript client (mirror js_client_generator.py); Go client; curl snippets per endpoint |
| RAG | Token-based chunking (tiktoken), sliding-window sentence chunker, code-block-aware splitter in src/site2cli/content/chunker.py |
| Search backends | Brave Search, SearXNG, Bing Web Search adapters next to src/site2cli/search/engine.py |
| Browser | Firefox profile import (Chrome already supported), Safari cookie import in src/site2cli/auth/profiles.py |
| Docs | Recipe cookbook in docs/, more demo GIFs in assets/, walkthroughs for popular SaaS APIs |
Before opening a PR:
-
pytestpasses locally -
ruff check src/ tests/is clean - New behavior has a test (we keep coverage tight — currently 559 tests)
- Public functions have type annotations
- No new top-level dependencies without discussion — add to
pyproject.tomloptional extras instead - README updated when you add a new CLI command or flag
Please include:
- site2cli version (
site2cli --version) - Python version (
python --version) - OS and architecture
- The exact command you ran
- The full output (use
--no-headlessfor browser issues, redact secrets) - The site you were targeting if it's public
Pattern (mirroring chunk, search, discover):
- Implement the core logic under
src/site2cli/<feature>/as plain Python — no Typer imports. - Wire a Typer entry in
src/site2cli/cli.py. - Add tests under
tests/test_<feature>.py. - Add a section to
README.mdunder the relevant family (extraction / discovery / RAG / etc). - Tick the roadmap item in
README.md.
The generator pipeline lives in src/site2cli/discovery/. Each output is one file:
spec_generator.py— OpenAPI 3.1 (.json/.yaml)client_generator.py— Python clientjs_client_generator.py— JavaScript ES modulecoverage_report.py— HTML report
Add a sibling module (e.g. ts_client_generator.py), wire it into the discover command in cli.py, and add a test in tests/test_browser_to_api.py.
rufffor lint (config inpyproject.toml)- Type hints on all public functions
- Pydantic v2 for data models
- Prefer many small files to few large ones; soft target 200–400 lines, hard ceiling 800
By contributing, you agree your contributions are licensed under MIT.