Utopic CLI

Sign in with Google, manage your Utopic inference API keys, and buy API credits.
Requires Python 3.12 or newer. The client uses HTTPS; it runs no model or server.

Install:
  uv tool install utopic
  utopic login
  utopic keys create
  utopic keys list
  utopic keys revoke <key-id>
  utopic account
  utopic add-credit 10
  uv tool upgrade utopic

If uv reports that its executable directory is not on PATH:
  uv tool update-shell

Alternatively, use uv pip or pip within an activated virtual environment:
  uv pip install utopic
  python -m pip install utopic

No version or Python flags are needed in the standard install command. Runtime
dependencies, including transitive dependencies, are pinned in the package
metadata. Development Python is pinned in .python-version; build and quality
tool versions are pinned in pyproject.toml and uv.lock.

For an unpublished build, pass the wheel filename to either installer:
  uv tool install /path/to/utopic-0.3.0-py3-none-any.whl
  python -m pip install /path/to/utopic-0.3.0-py3-none-any.whl

Hosted login opens Google directly, prints a verification code, and polls the
gateway over HTTPS. Authorize only when the browser code matches the terminal.
Use utopic login --no-browser to print the link without opening a browser.
No localhost callback or Google client secret is needed on the user's machine.

The gateway defaults to https://utopicrt-gateway.fly.dev for compatibility with
existing sessions. Use utopic --gateway https://api.utopic.company login for the
custom domain. Credentials are isolated per gateway origin.

The existing ~/.local/state/utopic-mcp location is retained only for credential
compatibility. This distribution includes no MCP server, dependencies or commands.
--state-dir overrides the directory. On macOS and Linux, credential files are
owner-only. Windows credential storage has not been qualified.

keys create prints the secret once to stdout; save it privately. Never paste it
into support logs. Keys list emits metadata, not secrets. Creation is never
automatically retried; after a connection failure, inspect keys list first.

API credit and balance

  utopic account
  utopic account --json
  utopic add-credit 7.50
  utopic add-credit 25 --use business
  utopic add-credit 5 --no-browser

account reads your live account status and available/reserved balances. add-credit
uses your saved Google management session to call the billing API and opens its
Stripe Checkout link. Enter any USD amount from $5 to $999999.99 in cent increments;
tax is added at checkout and provider payment limits apply. Personal use is the
default; select --use business for business purchases. No card details or Stripe
secrets are collected by the CLI. No MCP installation is required.

The URL is also printed to stdout; --no-browser only prints it. Complete payment
on Stripe. The backend adds credit after verifying Stripe's signed payment event;
creating/opening a link does not add credit. Run utopic account after payment.

A purchase ID and exact Retry command are printed before the checkout request.
If the request fails, reuse that command with the same amount, use, gateway, and
ID. --purchase-id <uuid> resumes an existing purchase. The CLI never retries a
purchase automatically. A new add-credit invocation without --purchase-id creates
a new purchase; do not use it to retry an uncertain previous attempt.

Run utopic --help, utopic add-credit --help, or utopic --version for usage and version.
python -m utopic_cli invokes the same interface.

When migrating an old checkout launcher, move that executable to a backup before
installing the tool in the same location. Preserve the private credential folder.

Migration from utopic 0.1.x

Version 0.2.0 replaces the native-runtime package manager with this API-only CLI.
The old setup, run, models, chat, bridge, server, MCP and ACP commands are removed.
Existing model downloads are not removed. Keep a separate environment pinned to
utopic==0.1.7 if you still need the old runtime commands. Upgrade the API CLI with:
  uv tool upgrade utopic

The published package is utopic, maintained by adavyas. The Python import namespace
is utopic_cli. An existing Google session from the API CLI is reused when the
gateway origin and private state directory are unchanged.
