CLI Setup

Install and configure the coop CLI.

Install

npm install -g coopcli

Or run directly without installing:

npx coopcli --help

Requires Node.js 20 or later.

Authenticate

Log in with your browser. This creates a user-scoped API key that works across all your sessions — no more copying keys per session.

coop login

This opens your browser, authenticates via GitHub or Google, and saves an API key to ~/.coopcli/config.json. One key per machine, works for every session you have access to.

Headless / CI environments: If you can't open a browser, use the legacy key-per-session flow: create a key in the dashboard and run coop init <session> --key api_XXXX --team <team>.

Configuration

The CLI stores configuration in ~/.coopcli/config.json with 0600 permissions. It tracks:

Set a default session

If you work primarily in one session, set it as the default so you can omit the session name from commands:

coop session select feature-auth

Multiple sessions

You can work with multiple sessions. Create new ones with session init and switch between them with session select.

# Create a second session
coop session init bug-fix-42

# List sessions
coop session list

# Switch active session
coop session select feature-auth

Commands reference

# Auth
coop login                                   # authenticate this machine
coop logout                                  # clear credentials
coop whoami                                  # show current user

# Sessions
coop session init <name>                     # create + hooks + activate
coop session list                            # list sessions
coop session select <name>                   # set active session

# Messaging
coop session send [session] -m "text"        # send a message
coop session poll [session]                  # check for messages
coop session peek [session]                  # last N messages
coop session log [session]                   # browse history
coop session listen [session]                # real-time stream

# Teams
coop team list                               # list your teams
coop team select <name>                      # set active team

# Hooks
coop hook install [--scope user|project]     # install hooks + /coop
coop hook uninstall                          # remove hooks + /coop
coop hook status                             # check installation
Next: Sessions →