CLIco create

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

  1. 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.
  2. custom - an LLM writes agent.py from 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

  1. Command line (--key flag)
  2. Global config (~/.co/keys.env)
  3. Interactive prompt (if not found)
  4. Skip (user adds to .env later)

Auto-Detection

The CLI automatically detects API key providers:

  • sk-proj-... โ†’ OpenAI
  • sk-ant-... โ†’ Anthropic
  • AIza... โ†’ Google
  • gsk_... โ†’ 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

  1. First co create: Generates global address/email
  2. All projects: Use same global address/email
  3. 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

  1. First time: Creates global address/email
  2. Every project: Uses same global address/email
  3. API keys: Copied from global to each project
  4. Ready to run: Complete agent with identity

Simple and consistent - one identity for all your agents.

Star us on GitHub

If ConnectOnion saves you time, a โญ goes a long way โ€” and earns you a coffee chat with our founder.