Enterprise SSO tokens on demand — for developers, scripts, and AI agents
Project description
sso-cli
sso-cli has evolved into dev-vault -- a full developer secret vault with OIDC token support, secret injection, and AI-agent integration. sso-cli will continue to work, but all new features go into dev-vault. Migrate with:
pip install dev-vault && dv migrate sso-cli
Enterprise SSO tokens in one command.
For developers, scripts, and AI agents.
pip install sso-cli
$ sso prod user@example.com
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
No .env files. No multi-step flows. Fresh tokens, fetched on demand from the system keyring.
Three ways to use it
For developers
Test any protected endpoint without leaving the terminal:
curl https://api.dev.example.com/orders \
-H "Authorization: Bearer $(sso dev test@dev.com)"
For scripts and pipelines
Drop it into any automation — the token is always fresh:
BEARER=$(sso prod service-account)
curl -H "Authorization: Bearer $BEARER" https://api.example.com/data
For AI agents
Give Cursor, Claude Code, Copilot, or any agent access to SSO-protected APIs:
Test this endpoint using the bearer token from $(sso dev test@dev.com)
Works with any agent that can run shell commands.
Why sso-cli?
Getting a token from enterprise SSO is always a multi-step process — browser flows, OAuth parameters, token endpoints. That friction adds up fast when you're writing scripts, testing APIs, or building with AI agents.
sso-cli turns it into a one-liner. It handles OIDC/OAuth2, token refresh, and credential storage so you don't have to.
Install
pip install sso-cli
If the sso command is not found after installation:
sso-setup-path
source ~/.zshrc # or ~/.bashrc, or restart your terminal on Windows
Usage
# Get a token
sso prod user@example.com
# Prefix matching — type less
sso p u # → sso prod user@example.com (if unique)
# List roles (JWT + UserInfo/Introspection)
sso prod user@example.com -r # users: JWT + UserInfo
sso prod api-client -r # clients: JWT + Introspection
# List/Remove environments and users
sso -l env
sso -l user
sso -d env prod
sso -d user prod user@example.com
# Interactive mode
sso
Config
Configuration is stored in ~/sso_config.yaml (auto-created on first use). All setup is done through the interactive flow — no manual YAML editing required.
Example structure (for reference):
environments:
prod:
sso_url: https://sso.example.com
realm: Production
client_id: my-client-id # optional, prompted if needed
users:
prod:
user@example.com:
auth_type: password
email: user@example.com
api-client:
auth_type: client_credentials
client_id: api-client
Secrets (passwords and client secrets) are stored securely in the system keyring — never written to disk.
PyPI package: https://pypi.org/project/sso-cli/
See Also
- dev-vault — Developer secret vault + OIDC token provider (the evolution of sso-cli).
- Agent State — an open toolbox that gives AI agents persistent memory, tools, and organizational context across sessions via a shared Git repository.
- terminal-to-here — VS Code extension for quickly navigating terminals to the current file's directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sso_cli-1.4.4.tar.gz.
File metadata
- Download URL: sso_cli-1.4.4.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14ad2fd08877c30e683166c975a66c9b08402a47d5b18cf72d3836553408afe2
|
|
| MD5 |
052a9ea35f31d85df7ff90e7f0a259fc
|
|
| BLAKE2b-256 |
95bd7610dc28ba2e98f5bca4a78e65f44f348fc0dcf782031201a6d22afd7a04
|
Provenance
The following attestation bundles were made for sso_cli-1.4.4.tar.gz:
Publisher:
bump_and_release.yml on caetanominuzzo/sso-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sso_cli-1.4.4.tar.gz -
Subject digest:
14ad2fd08877c30e683166c975a66c9b08402a47d5b18cf72d3836553408afe2 - Sigstore transparency entry: 1229479270
- Sigstore integration time:
-
Permalink:
caetanominuzzo/sso-cli@f2a9cca9bbaa984fe220e42017c14e7fa1aa92e0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/caetanominuzzo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
bump_and_release.yml@f2a9cca9bbaa984fe220e42017c14e7fa1aa92e0 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sso_cli-1.4.4-py3-none-any.whl.
File metadata
- Download URL: sso_cli-1.4.4-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff70412f4856ad1d1359ce2dbdc97178832ed9d0533e4d0728e5dfbce76d5d09
|
|
| MD5 |
d805edb196724e44648cc48799674a1a
|
|
| BLAKE2b-256 |
ce44b2f474f5a803cad6e71bdbf65f1e81b4ab2fc3988b6d061069b2b4ace6a1
|
Provenance
The following attestation bundles were made for sso_cli-1.4.4-py3-none-any.whl:
Publisher:
bump_and_release.yml on caetanominuzzo/sso-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sso_cli-1.4.4-py3-none-any.whl -
Subject digest:
ff70412f4856ad1d1359ce2dbdc97178832ed9d0533e4d0728e5dfbce76d5d09 - Sigstore transparency entry: 1229479273
- Sigstore integration time:
-
Permalink:
caetanominuzzo/sso-cli@f2a9cca9bbaa984fe220e42017c14e7fa1aa92e0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/caetanominuzzo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
bump_and_release.yml@f2a9cca9bbaa984fe220e42017c14e7fa1aa92e0 -
Trigger Event:
workflow_dispatch
-
Statement type: