Installation
Install the Osmosis CLI from PyPI:Python 3.12 or later is required, and Python 3.12, 3.13, and 3.14 are supported. The package registers three equivalent CLI aliases:
osmosis, osmosis-ai, and osmosis_ai.Upgrading
The CLI can upgrade itself in-place. It auto-detects your install method (pip, pipx, or uv tool) and runs the appropriate upgrade command:
Version Compatibility
The CLI sends its version to the platform on every request so the platform can signal when an upgrade is recommended or required:- Deprecation warning. If your installed version is approaching end of support, the CLI prints a one-time yellow
⚠warning to stderr. Commands continue to run normally — schedule an upgrade at your convenience. - Upgrade required. If your version is below the minimum supported version, platform requests fail with an
Upgrade requirederror and the command exits. Runosmosis upgrade(or the equivalent for your install method) to continue.
Authentication
Login
uv run. Running auth login again safely replaces the saved login; the command no longer accepts --force.
Credential Storage Backends
By default (OSMOSIS_TOKEN_STORE=auto), the CLI tries to save your token in the operating-system keyring. If the keyring cannot be used, it falls back to ~/.config/osmosis/credentials.json and prints a KEYRING_UNAVAILABLE warning. The file is written atomically with owner-only permissions (0600 inside a 0700 directory). Run osmosis auth whoami to see the effective credential source and the backend of any persistent login.
Set OSMOSIS_TOKEN_STORE to choose storage for new logins:
Any other value fails with
VALIDATION. This setting selects storage for new logins; it does not migrate existing credentials, which are read from their recorded backend. Use keyring when tokens must be stored in the system keyring. Use file (or leave the default) on hosts without a usable keyring. If a previous keyring login cannot be read during replacement, the CLI warns that its token could not be revoked.
Logout
OSMOSIS_TOKEN is still set, the CLI continues using it until you unset the variable.
Who Am I
keyring or file) holds the persistent token, and whether a persistent login also exists.
Environment Tokens for CI/CD
SetOSMOSIS_TOKEN to authenticate non-interactive processes. When the active platform is not the default production platform, bind the token to that platform with OSMOSIS_TOKEN_PLATFORM_URL:
ENV_TOKEN_PLATFORM_REQUIRED; a different normalized URL fails with ENV_TOKEN_PLATFORM_MISMATCH. Production automation against the default platform remains compatible without the binding.
Loading Credentials from .env
The CLI automatically loads the nearest .env file, walking upward from the current directory. Non-empty process variables win over dotenv values.
- Pass
--env-file <path>or setOSMOSIS_ENV_FILEto select a specific file. - Pass
--platform <url>to overrideOSMOSIS_PLATFORM_URLfor one invocation. - Keep
OSMOSIS_TOKEN,OSMOSIS_TOKEN_PLATFORM_URL, andOSMOSIS_PLATFORM_URLtogether so the token cannot be sent to a platform selected independently. - Non-HTTPS, non-loopback platform URLs are refused unless
OSMOSIS_ALLOW_INSECURE_PLATFORM_URL=1is set.
Workspace Context
Most platform commands are scoped through the workspace repository you are currently inside. If you are setting up Osmosis for the first time, complete Onboarding before running workspace-scoped commands. For details on how the CLI reads GitHuborigin and maps local commands to a platform workspace, see Workspace Repository.
Next Steps
Onboarding
Set up a workspace repository and local CLI context.
Command Reference
Full reference for every CLI command and its options.