CLI Reference

This is a reference page, not a quickstart. Use it when you need exact commands, flags, or common workflows.

Installation

No install needed. Run via npx :

terminal
$ npx @teamrc/cli <command>

Or install globally:

terminal
$ npm install -g teamrc

Global flags

These flags work with any command:

-j, --json Output as JSON (for scripting)
-y, --yes Skip confirmation prompts
--no-color Disable colored output
-v, --verbose Show detailed output

Core setup commands

init Create a new team
teamrc init

Generates an ed25519 keypair (stored in ~/.teamrc/key), writes .teamrc.yaml to your project, and applies config to detected platforms. In interactive mode, you'll be asked whether to connect to teamrc.ai for cross-machine sync. Use --local to skip the prompt and create a local-only team. Use --relay to skip the prompt and connect immediately. The interactive wizard lets you pick a catalog template or build a custom team. If a .teamrc.yaml already exists without a team ID (e.g. from clone), init adopts it and no template selection is needed. When using --global, init also checks the current directory for a .teamrc.yaml to offer as the global team definition.

Options

--relay <url> Relay server URL
--local Create a local-only team (skip relay connection)
--platform <platform> Target platform(s), comma-separated
--global Create as global team (applies to all projects)
--name <name> Team name
--team <id> Start from a catalog template (e.g. fullstack, backend)
join Join an existing team
teamrc join <invite-code>

Connects this machine to an existing team using an invite code. Fetches the team definition from the relay, writes .teamrc.yaml, and applies config to all detected platforms. Each machine gets its own keypair. No shared credentials.

Options

--relay <url> Relay server URL
--platform <platform> Target platform(s)
--global Join as global team
clone Copy a team locally without joining the relay
teamrc clone <invite-code>

Like join, but doesn't register this machine with the relay. You get a local copy of the team definition. Cloned teams support read-only pull (to fetch updates from the original) but not push or sync. To fork a cloned team into your own, run teamrc init, which will adopt the existing definition, create a new team on the relay, and give you full ownership.

Options

--relay <url> Relay server URL
--platform <platform> Target platform(s)
--name <name> Override team name
--global Apply as global team

Sync commands

sync Two-way sync with the relay
teamrc sync

The primary command. Pushes local changes (including knowledge updates) to the relay, pulls the latest team definition, and regenerates all platform config files. Run this after making changes in the web UI, or after another machine has pushed updates.

Options

--platform <platform> Target platform(s)
--scope <scope> project or global
--global Shorthand for --scope global
pull Pull from relay and apply locally
teamrc pull

One-way: fetches the latest team definition from the relay and writes it to local platform config files. Does not push any local changes. Use when you only want to receive updates.

Options

--platform <platform> Target platform(s)
--scope <scope> project or global
--global Shorthand for --scope global
push Push local state to the relay
teamrc push

One-way: reads your .teamrc.yaml and knowledge file, and sends them to the relay. Does not pull or apply anything. Use after manually editing .teamrc.yaml. If the team is local-only (not yet connected to a relay), push will register it on teamrc.ai first and then push. This is how you connect a local team.

apply Regenerate platform config files from .teamrc.yaml
teamrc apply

Offline operation. Does not talk to the relay. Reads .teamrc.yaml and writes platform config files. Useful after editing the YAML directly, or to regenerate files for a newly installed platform.

Options

--platform <platform> Target platform(s)
--scope <scope> project or global
--global Shorthand for --scope global
export Export team from relay to .teamrc.yaml
teamrc export

Fetches the team definition from the relay and writes it to .teamrc.yaml without applying to any platforms. Use when you want to inspect or backup the remote state.

diff Compare local state with relay
teamrc diff

Shows what's different between your local .teamrc.yaml and the relay. Lists added, removed, and modified members. Helpful before pushing changes or debugging sync issues.

Options

--json Output as JSON

Team management

dashboard Open the current team in your browser
teamrc dashboard

Creates a temporary invite code under the hood and builds a dashboard URL from it, so the link grants join access to the team. Opens the URL in your browser. Use this to manage the team in the web UI. Use invite instead when you want to share access with another machine or teammate.

Options

--ttl <hours> Dashboard link expiry in hours (default: 24)
invite Generate an invite code
teamrc invite

Creates a time-limited invite code (trc_inv_...) that can be used with join. Share it with collaborators, use it on a VM, or connect another project to the same team. For opening your own browser session, use dashboard instead.

Options

--ttl <hours> Expiry in hours (default: 24)
status Show current configuration
teamrc status

Displays your token, relay server, current team info (from .teamrc.yaml), and platform bindings. Quick way to see what's configured.

Options

--json Output as JSON
import Import existing platform config
teamrc import <platform>

Reads existing agent configuration from a platform's native files and converts them into a .teamrc.yaml. Supported platforms: claude-code, cursor, codex, gemini, openclaw. Useful when migrating agents you've already set up manually.

add-member Add a member to the current team
teamrc add-member

Adds a new AI agent to the team. Without flags, launches an interactive wizard that lets you pick from the catalog or create a custom member. The new member is added to .teamrc.yaml and pushed to the relay.

Options

--name <name> Member name
--role <role> Member role description
--template <id> Start from a catalog agent template
share Toggle public sharing for a team
teamrc share

Makes the current team publicly visible. Anyone with the share link can view the team composition and clone it. Requires a linked account (run teamrc login first) and team ownership. Run with --off to make the team private again.

Options

--off Make the team private again

Catalog

list-templates List available team templates
teamrc list-templates

Displays all available team templates from the catalog. Each template includes a name, description, and the agents and skills it contains. Use a template ID with teamrc init --team to start from a template.

Options

--json Output as JSON
list-agents List available agent templates
teamrc list-agents

Displays all available agent templates from the catalog. Each template includes a name, role, category, and pre-configured instructions and skills. Use a template ID with teamrc add-member --template to add a catalog agent.

Options

--json Output as JSON
--category <category> Filter by category (e.g. development, infrastructure, quality)

Account & machine management

login Link this machine to an account
teamrc login

Optional. Opens a browser-based device authorization flow (similar to gh auth login). Once confirmed, this machine is linked to your account for recovery and management via the web dashboard. You can use teamrc without logging in. It's only needed for the dashboard.

Options

--name <name> Machine name (defaults to hostname)
whoami Show identity and config
teamrc whoami

Displays your token, linked account email (if any), machine name, relay server, and current team. Like status but focused on identity.

Options

--json Output as JSON
doctor Diagnose setup issues
teamrc doctor

Validates your entire setup: checks the keypair exists, config is valid, relay is reachable, and platforms are detected. Run this when something isn't working.

claim Claim ownership of a team
teamrc claim <secret>

Associates your account as the owner of a team created via the CLI. The ownership token (trc_ocs_...) is displayed once during teamrc init. Save it like a recovery code. Requires a linked account (run teamrc login first). Once claimed, the token is invalidated and cannot be reused.

delete Remove teamrc from this machine
teamrc delete

Removes all teamrc-generated files from all platforms, deletes .teamrc.yaml, and cleans up config. This is destructive and fully uninstalls teamrc from the current project.

Options

-y, --yes Skip confirmation

Background sync

daemon Start background knowledge sync process
teamrc daemon

Runs a background process that keeps the team knowledge file in sync across machines in real-time via WebSocket. Watches the local knowledge file for changes and pushes updates to the relay. Receives remote changes and merges them locally. Does not sync team config (members, skills). Use teamrc sync for that.

Options

--scope <scope> project or global (default: project)
--rest-only Force REST polling mode (no WebSocket)
--poll-interval <seconds> REST fallback poll interval (default: 120, min: 5)

Common workflows

Set up a new project with a template

terminal
$ npx @teamrc/cli init --team fullstack
$ npx @teamrc/cli dashboard # opens the team in your browser

That takes you straight to the team dashboard in the browser. If you need to connect another machine, create a separate invite with teamrc invite .

Open the web UI from the CLI

Without an account: run teamrc dashboard . It creates a short-lived browser link and opens the team directly.

With an account: run teamrc login , then sign in at the relay URL. Your dashboard at /dashboard shows all your teams and machines.

Connect another machine, VM, or project

terminal
$ npx @teamrc/cli invite # run on the first machine
$ npx @teamrc/cli join trc_inv_abc123... # run on the second machine

Edit in the web UI, then apply locally

Make your changes in the browser, then pull them down:

terminal
$ npx @teamrc/cli pull # fetch latest from relay

Edit .teamrc.yaml directly, then push

terminal
$ vim .teamrc.yaml # make your changes
$ npx @teamrc/cli push # send to relay
$ npx @teamrc/cli apply # regenerate local files

Check what's different before syncing

terminal
$ npx @teamrc/cli diff # compare local vs relay
$ npx @teamrc/cli sync # if it looks good