co create
Scaffold a new ConnectOnion agent project with intelligent defaults — identity, API keys, and a runnable agent in one command.
Quick Start: Run co create — picks a template, sets up your global identity, and writes a runnable agent.
Command Flow
co create behaves differently the first time you run it versus every time after.
First-Time User
No ~/.co/ yet. The CLI generates a master keypair, your agent address, and an email — all written to ~/.co/keys.env.
Returning User
Reuses your global identity and copies any saved API keys from ~/.co/keys.env straight into the new project's .env.
First-Time Run
Returning Run
What Gets Created
Global Configuration (first time only)
Lives in your home directory and is shared across every project on this machine.
Files created:
Project Structure
Files created:
Projects use the global address/email by default — no per-project keypair, no duplicate identity.
Configuration Files
Global Identity — ~/.co/keys.env
Single source of truth for your address, email, and any third-party API keys. Loaded as environment variables.
Project Config — .co/host.yaml
Tiny YAML file that tells the runtime which file to launch and where to read environment variables from.
Project API Keys — .env
Auto-copied from ~/.co/keys.env at create time. Edit per-project as needed.
Note: There is no global host.yaml. Identity lives in ~/.co/keys.env as environment variables. The only YAML is per-project, at .co/host.yaml.
API Key Handling
co create resolves API keys in this order:
| Priority | Source | When used |
|---|---|---|
| 1 | --key <value> | Explicit override on the command line |
| 2 | ~/.co/keys.env | Reused from previous projects |
| 3 | interactive prompt | Pasted at the prompt and saved globally |
| 4 | skip | Add to .env later |
Auto-Detection
Pasted keys are recognized by prefix — no need to specify the provider:
Templates
minimal
Basic agent with simple tools — the smallest runnable starting point.
web-research
Web scraping + research tools, ready to crawl and summarize.
playwright
Browser automation with Playwright wired into the agent.
custom
AI generates the agent based on a free-form description.
Selecting a Template
Command Reference
co create [name] [options]| Option | Short | Description |
|---|---|---|
| [name] | — | Project name (positional, prompts if omitted) |
| --template | -t | Template: minimal / web-research / playwright / custom |
| --description | -d | Description used by the custom template |
| --no-ai | — | Disable AI features (not recommended) |
| --key | — | API key to use (overrides global) |
| --yes | -y | Accept all defaults non-interactively |
Examples
Quick Start
Custom Template
Override the API Key
Identity Flow
co create generates your global address/email and writes them to ~/.co/keys.env.keys.env into each project's .env.co status any time to see your current address and email.
ConnectOnion