Commands
The complete optixlog command tree with one-line summaries and the canonical login → init → generate developer flow.
The optixlog CLI exposes four commands. Shell completion is disabled.
Command tree
| Command | Summary |
|---|---|
login | Authenticate with an API key and persist the credential to ~/.optixlog/credentials.toml. |
init | Select projects and write optixlog.toml into the current directory (idempotent). |
generate | Fetch project schemas and emit a byte-deterministic typed Python module. |
whoami | Show the saved login for a credential profile (key masked, read-only). |
Canonical flow
Every new machine or CI environment runs through three commands in order:
Authenticate
Store your API key in ~/.optixlog/credentials.toml. You only need to do this once per machine (or profile):
optixlog loginIf you are running in CI without interactive prompts, pass flags explicitly:
optixlog login --api-key "$OPTIXLOG_API_KEY" --no-inputSelect projects
Write optixlog.toml into your repository root. This file is committed — it records which projects you generate types for, the output path, and the module style:
optixlog initFor a fully non-interactive run (CI or scripting):
optixlog init --all --output optixlog_gen.py --no-inputGenerate typed bindings
Fetch the latest schema from each selected project and write the typed module:
optixlog generateIn CI, use --check to detect drift without writing:
optixlog generate --checkOffline variant
All three commands run fully offline when you pass --fixture (or set OPTIXLOG_FIXTURE). This is the recommended approach for testing and local development without a live server:
optixlog login --fixture tests/fixtures/schema.sample.json \
--api-key sk-opt-test --base-url http://x
optixlog init --fixture tests/fixtures/schema.sample.json --all \
--output optixlog_gen.py
optixlog generate --fixture tests/fixtures/schema.sample.jsonOr export the fixture path once:
export OPTIXLOG_FIXTURE=tests/fixtures/schema.sample.json
optixlog login --api-key sk-opt-test --base-url http://x
optixlog init --all --output optixlog_gen.py
optixlog generateSee Offline Fixture Workflow for the full guide.