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-4o, co/claude-3-5-sonnet, or co/gemini-1.5-pro — 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
Connects your Google account for Gmail Send and Calendar Read
Opens your browser for OAuth authorization
Saves credentials to .env for your agents to use
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-4o
  • co/gpt-4o-mini

Anthropic

  • co/claude-3-5-sonnet
  • co/claude-3-5-haiku

Google

  • co/gemini-1.5-pro
  • co/gemini-1.5-flash

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.