OptixLog Docs
CLICommands

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

CommandSummary
loginAuthenticate with an API key and persist the credential to ~/.optixlog/credentials.toml.
initSelect projects and write optixlog.toml into the current directory (idempotent).
generateFetch project schemas and emit a byte-deterministic typed Python module.
whoamiShow 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 login

If you are running in CI without interactive prompts, pass flags explicitly:

optixlog login --api-key "$OPTIXLOG_API_KEY" --no-input

Select 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 init

For a fully non-interactive run (CI or scripting):

optixlog init --all --output optixlog_gen.py --no-input

Generate typed bindings

Fetch the latest schema from each selected project and write the typed module:

optixlog generate

In CI, use --check to detect drift without writing:

optixlog generate --check

Offline 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.json

Or 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 generate

See Offline Fixture Workflow for the full guide.

On this page