CLIco auth
DocsCLIco auth

co auth

One-time setup for managed models — no provider keys needed. Authenticates your agent with OpenOnion and unlocks the co/ model prefix across providers.

Quick Start: Run co auth once and start using co/gpt-5, co/claude-sonnet-4-5, or co/gemini-3.7-flash — no API keys to manage.

Quick Start

Two commands cover the full setup:

code
# Authenticate with OpenOnion (required first) co auth # Optional: Connect your Google account for Gmail & Calendar co auth google

co auth is required before you can use any co/ models. co auth google is optional — only needed for Gmail/Calendar tools.

What co auth does

code
co auth
output
Authenticating with OpenOnion...
✓ Token saved to ~/.co/keys.env
✓ AGENT_EMAIL set
✓ IS_EMAIL_ACTIVE=true
 
You can now use co/ prefixed models.

Behind the scenes

1.Authenticates your agent and saves a secure token
2.Token is saved to ~/.co/keys.env as OPENONION_API_KEY
3.If your project has a .env, it's updated too
4.~/.co/keys.env gains AGENT_EMAIL and IS_EMAIL_ACTIVE=true

After running, your ~/.co/keys.env looks like:

OPENONION_API_KEY=oo_live_abcd1234...
AGENT_EMAIL=0x7a9f3b2c@mail.openonion.ai
IS_EMAIL_ACTIVE=true

What co auth google does

Connect a Google account so your agents can send Gmail and read Calendar:

Terminalbash
$co auth google
The 1.8.3 candidate requests Gmail, Drive, Calendar and YouTube; use --scopes to restrict consent
Opens your browser for OAuth authorization
Saves credentials only locally in ~/.co/keys.env and an existing project .env
Running again will switch to a different Google account
See Google Integration for details

Use Managed Models (co/ prefix)

Once authenticated, use any co/ model — no provider API keys required:

main.py
from connectonion import llm_do response = llm_do("Hello", model="co/gpt-4o")

Works across providers:

OpenAI

  • co/gpt-5
  • co/gpt-5-mini
  • co/o4-mini

Anthropic

  • co/claude-opus-4-5
  • co/claude-sonnet-4-5
  • co/claude-haiku-4-5

Google

  • co/gemini-3.7-flash (default)
  • co/gemini-3-pro-preview

Troubleshooting

Missing token?

Run co auth again — it will refresh your OPENONION_API_KEY in ~/.co/keys.env.

Network issue?

Try again or check your connection. co auth needs to reach oo.openonion.ai.

Global vs project

co auth prefers a local .co directory if keys exist there, otherwise falls back to ~/.co.

Star us on GitHub

If ConnectOnion saves you time, a ⭐ goes a long way — and earns you a coffee chat with our founder.