ConnectOnion Create Command
The co create command creates new ConnectOnion projects with intelligent defaults and automatic setup.
Overview
co create [name] [options]
Creates a new agent project with:
- AI features enabled by default (agents need LLMs)
- API keys copied from global config (if available)
- Global address and email used for all projects
- Complete agent implementation ready to run
Command Flow
First-Time User
When ~/.co/ doesn't exist, co create automatically sets up global configuration:
$ co create my-first-agent
๐ Welcome to ConnectOnion!
โจ Setting up global configuration...
โ Creating ~/.co/ directory
โ Generating master keypair
โ Your address: 0x7a9f3b2c8d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a
โ Your email: 0x7a9f3b2c@mail.openonion.ai
โ Creating ~/.co/keys.env (ready for your API keys)
๐ง
ConnectOnion Project Creator
========================================
โ Choose a template:
โฏ Minimal - Simple starting point
Browser - Browser automation
Hosted Browser - Hosted browser sessions
Coder - Coding agent
Co-AI - AI assistant with web UI
Web Research - Data scraping & analysis
Custom - AI generates based on needs
โ Paste your API key (or Enter to skip): โบ sk-proj-xxx
โ Detected OpenAI API key
โ Saved to ~/.co/keys.env for future projects
โ Project name: โบ my-first-agent
โ
Project created successfully!
๐ Created: my-first-agent
๐ฆ Template: Minimal
โจ AI Features: Enabled
๐ง Agent email: 0x7a9f3b2c@mail.openonion.ai (global)
๐ Agent address: 0x7a9f3b2c8d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a (global)
๐ Next steps:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1๏ธโฃ cd my-first-agent
2๏ธโฃ pip install python-dotenv
3๏ธโฃ python agent.py
Returning User
When ~/.co/ already exists:
$ co create another-agent
๐ง
ConnectOnion Project Creator
========================================
โ Using global identity: 0x7a9f3b2c8d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a
โ Using global email: 0x7a9f3b2c@mail.openonion.ai
โ Choose a template: โบ Web Research
โ Found API keys in ~/.co/keys.env
โ OpenAI key will be copied to project
โ Project name: โบ research-bot
โ
Project created successfully!
๐ Created: research-bot
๐ฆ Template: Web Research
โจ AI Features: Enabled
๐ง Agent email: 0x7a9f3b2c@mail.openonion.ai (global)
๐ Agent address: 0x7a9f3b2c8d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a (global)
๐ API keys: Copied from global config
๐ก Using global email/address. Run 'co status' to view.
๐ Next steps:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1๏ธโฃ cd research-bot
2๏ธโฃ pip install -r requirements.txt
3๏ธโฃ python agent.py
What Gets Created
Global Configuration (First Time Only)
~/.co/
โโโ keys.env # Shared API keys and identity
โโโ keys/ # Master identity
โ โโโ agent.key # Private key (for signing)
โ โโโ recovery.txt # Recovery phrase
โโโ logs/
โโโ cli.log # Command history
Project Structure
my-agent/
โโโ agent.py # Main agent implementation
โโโ .env # API keys (from ~/.co/keys.env)
โโโ .co/
โ โโโ host.yaml # Project config (uses global address/email)
โ โโโ control-center/ # Full Web app source
โ โ โโโ index.html
โ โ โโโ control-center.js
โ โ โโโ CONTROL_CENTER.md
โ โโโ docs/ # Framework documentation
โ โโโ co-vibe-coding-all-in-one.md
โ โโโ connectonion.md
โโโ README.md # Project documentation
โโโ .gitignore # Excludes .env and sensitive files
Note: Projects use global address/email by default.
Address and Email Management
All projects use the global identity (address + email) from ~/.co. Run co status to view your address and email.
Templates
Available Templates
- co-ai (default) - the same agent as
co ai, hosted. Files, shell, browser, todos, sub-agents. Specialise it with skills in.co/skills/rather than by picking a different starting point. - custom - an LLM writes
agent.pyfrom your--description.
minimal, coder, browser, hosted-browser, and web-research were
retired; passing one exits 1 and says so.
5. custom - AI-generated based on your description
Template Selection
# Interactive selection
$ co create
โ Choose a template: โบ
# Direct specification
$ co create my-bot --template co-ai
# Custom with description
$ co create assistant --template custom --description "Slack integration bot"
Command Options
co create [name] [options]
Options:
[name] Project name (optional, will prompt)
--template, -t Template to use (co-ai/custom)
--description Description for custom template
--key API key to use (overrides global)
--yes, -y Accept all defaults
API Key Management
Priority Order
- Command line (
--keyflag) - Global config (
~/.co/keys.env) - Interactive prompt (if not found)
- Skip (user adds to .env later)
Auto-Detection
The CLI automatically detects API key providers:
sk-proj-...โ OpenAIsk-ant-...โ AnthropicAIza...โ Googlegsk_...โ Groq
Special Features
Global Identity Reuse
By default, all projects share:
- Same address (from global config)
- Same email (from global config)
- Same API keys (from global config)
This keeps things simple - one identity for all your agents.
Examples
Quick Start
# Simplest form - uses global identity
$ co create
# With name - uses global identity
$ co create my-bot
# With template - uses global identity
$ co create my-bot --template co-ai
# Accept all defaults
$ co create quickbot -y
Custom Template
# Interactive
$ co create --template custom
# With description
$ co create slack-bot -t custom -d "Slack bot for answering questions"
Identity Flow Summary
- First
co create: Generates global address/email - All projects: Use same global address/email
- API keys: Copied from global
keys.env
This keeps things simple - one identity for all your agents (like using same email for all repos).
Troubleshooting
Check Your Address
$ co status
Permission Errors
# Fix global permissions
$ chmod 700 ~/.co
$ chmod 600 ~/.co/keys.env
# Fix project permissions
$ chmod 700 my-agent/.co
Workflow Summary
- First time: Creates global address/email
- Every project: Uses same global address/email
- API keys: Copied from global to each project
- Ready to run: Complete agent with identity
Simple and consistent - one identity for all your agents.
ConnectOnion