Skip to main content

Enterprise SSO tokens on demand — for developers, scripts, and AI agents

Project description

sso-cli

PyPI version Downloads

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

  • terminal-to-here — VS Code extension for quickly navigating terminals to the current file's directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sso_cli-1.4.5.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sso_cli-1.4.5-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file sso_cli-1.4.5.tar.gz.

File metadata

  • Download URL: sso_cli-1.4.5.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sso_cli-1.4.5.tar.gz
Algorithm Hash digest
SHA256 b62e526f1092fe30c62950023d5d4d1626e1034d823b2c97196b1f191879090f
MD5 dc0c8accb631516db22836e4ef198fe9
BLAKE2b-256 26e154aa1afff22748fc29874e49da57e7810150db53f1b4d3931d79c47a5fd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for sso_cli-1.4.5.tar.gz:

Publisher: bump_and_release.yml on caetanominuzzo/sso-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sso_cli-1.4.5-py3-none-any.whl.

File metadata

  • Download URL: sso_cli-1.4.5-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sso_cli-1.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8e0f2e4ede81c523b1c5222fb29caeb5f547d637cc22542a964bd697382653f8
MD5 0459512865a5a6d892b2f116c4c3c436
BLAKE2b-256 256f2d3c9676c05192ddd39aa88d60a5ad31850d3521769df9e585cea0ffe4ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for sso_cli-1.4.5-py3-none-any.whl:

Publisher: bump_and_release.yml on caetanominuzzo/sso-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page