minder — a small command-line client over a Minder instance's api-gateway
(auth, health, plugins, RAG, models, AI chat, plus billing, organizations, and
knowledge-graph correlations). Open-source companion to the platform, alongside
plugin-sdk. Scope + roadmap: #1.
Full docs: minderhq.github.io/docs/cli — the command reference, plus the wider Minder documentation.
pip install "git+https://github.com/minderhq/cli"minder login --api-url http://localhost:8000 # prompts, caches a JWT
minder health # api-gateway /health
minder status # every service's health
minder plugins list # list registered plugins
minder plugins config crypto # show a plugin's config
minder plugins config crypto --set K=V # update config (JWT)
minder rag kbs # list knowledge bases
minder rag create-kb "My Docs" "my documents" # create one
minder rag query <pipeline_id> "what is X?" # ask a pipeline (--top-k N)
minder models list # list Ollama models
minder models pull llama3.2:latest # pull one (admin)
minder ai tools # the LLM's callable tools
minder ai chat "summarise RAG" --tools # one-shot chat (JWT)
minder billing subscription # the org's current plan
minder billing checkout pro # start a hosted checkout for a tier
minder billing portal # customer-portal URL
minder org list # the orgs you belong to
minder org switch <organization_id> # switch active org (re-mints + caches JWT)
minder graph correlations "Acme Corp" --limit 5 # an entity's correlated entities/signalsGlobal flags (--api-url, --token, --json) go after the subcommand (git/docker style), e.g. minder health --json.
Config resolves as flag → env (MINDER_API_URL / MINDER_TOKEN) → ~/.config/minder/config.json → default (http://localhost:8000). minder login caches the token + url there so later commands need no flags.
Access tokens are short-lived (15 minutes by default, the gateway's JWT_EXPIRATION_MINUTES). The CLI renews them transparently through POST /v1/auth/refresh: shortly before the token expires, or once after a 401. A refreshed token is written back to the same config file; a --token / MINDER_TOKEN override is refreshed for that run only. The gateway accepts a recently expired token for refresh within JWT_REFRESH_GRACE_MINUTES (12 h by default), up to an absolute session cap counted from sign-in, JWT_SESSION_MAX_HOURS (24 h by default). After the cap, or when the session was revoked (password change or reset, role demotion, deactivation), the CLI prints please run `minder login` again.
Output is a compact human view by default (a bulleted list for collections, key: value for objects, plain text for a chat reply); pass --json for raw JSON to pipe into jq.
pip install -e ".[dev]"
black --check . && flake8 --max-line-length=100 --extend-ignore=E203,W503 . && mypy minder_cli && pytest -qtests/test_api_contract.py checks that every (method, path) the CLI calls
(each self.request("METHOD", "/path") in minder_cli) exists in the API
Gateway's OpenAPI spec published on the docs site, so a call to a route the
gateway doesn't serve fails CI. CI fetches the live spec by setting
MINDER_OPENAPI_URL; local runs without it use the committed fallback
tests/fixtures/openapi/api-gateway.json. Refresh the fallback when the gateway
changes (the test warns when it's stale):
curl -fsSL https://raw.githubusercontent.com/minderhq/docs/main/docs/api/openapi/api-gateway.json \
-o tests/fixtures/openapi/api-gateway.jsonApache-2.0.