Command-line interface for the Open Concept Lab (OCL) API.
cd /Users/jonathanpayne/projects/ocl/ocl-cli
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"src/ocl_cli/api_client.py— Sync HTTP client with all high-level API methods. Business logic lives here (not in Click commands) so it can be reused by a future MCP server wrapper.src/ocl_cli/config.py— Server registry and auth token resolution. Config stored at~/.ocl/config.json.src/ocl_cli/output.py— JSON and human-readable table formatters.src/ocl_cli/main.py— Click root group, global options, command registration.src/ocl_cli/commands/— Thin Click command wrappers that parse args → call client → format output.
- Click commands are thin wrappers. All API logic goes in
api_client.py. - Default
owner_typeis"orgs"for targeted operations,"all"for search/list. - Default
repo_typeis"all"for search/list, required for targeted operations. --json/-jglobal flag outputs raw API JSON (unmodified) for agent consumption.--debug/-dglobal flag shows HTTP requests on stderr.--show-requestglobal flag shows server URL and API request paths on stderr (cleaner than--debug).--verboseper-command flag on search/list commands passes?verbose=trueto the OCL API, which returns full details (names, descriptions, extras) instead of summary. Default is summary (no verbose).- Version parameters are type-specific:
--repo-versionfor sources/repos,--collection-versionfor collections,--concept-versionfor concept versions. Never use a bare--versionfor these. - Exit codes: 0=success, 1=client error (4xx), 2=server error (5xx), 3=auth error.
- When changing command arguments or flags, always update
README.mdanddocs/demos/to match.
ocl --help
ocl whoami --token YOUR_TOKEN
ocl concept search malaria --owner CIEL --source CIELpytestocl-mcp— MCP server for AI assistants (async, different interface)ocl-docs— API documentation at docs.openconceptlab.orgoclapi2— The OCL API backend
- Issues for
ocl-cliare tracked in the cross-repo trackerOpenConceptLab/ocl_issueson GitHub (not in this repo, and not on Gitea). UseghCLI. - Contribution conventions are org-wide. All OCL repos inherit
OpenConceptLab/.github/CONTRIBUTING.md— ticket-first, PR template,type/labels, no direct pushes tomain. In short: every PR links an issue — usecloses OpenConceptLab/ocl_issues#Non the resolving commit (bare#Nfor partial work). Heads-up for agents: the org PR template only auto-fills in the GitHub web UI, so when opening PRs viagh, add theCloses #Nline to the PR body yourself. - Code lives at
OpenConceptLab/ocl-clion GitHub. Changes go via feature branch + PR — never commit directly tomain. - A pre-2026-05 archive of issues exists at
gitea.lab.jpayne.me/ocl/ocl-cli(read-only / closed); do not file new tickets there.