Skip to main content

Platform Commands

Platform mode connects the CLI to codewire.sh for workspace management, org administration, and remote access. All platform commands require authentication via cw setup or cw login.

Setup

setup

Interactive wizard that configures platform mode. Walks you through server URL, login, org selection, resource selection, and GitHub connection.
cw setup
Run this once to get started. Your configuration is saved to ~/.codewire/platform.json.

Authentication

login

Authenticate with the Codewire platform.
cw login

logout

Sign out and clear stored credentials.
cw logout

whoami

Show the currently authenticated user.
cw whoami

Organizations

orgs list

List all organizations you belong to.
cw orgs list

orgs create

Create a new organization.
cw orgs create <name> --slug <slug>

orgs delete

Delete an organization (owner only).
cw orgs delete <slug>

orgs invite

Invite a member to an organization.
cw orgs invite <email> [--org <slug>] [--role <role>]

Resources

resources list

List resources in the current organization.
cw resources list [--org <slug>]

resources get

Show details for a specific resource.
cw resources get <slug> [--org <slug>]

resources create

Create a new resource.
cw resources create <slug> --type <coder|relay> --plan <plan> [--org <slug>]

resources delete

Delete a resource (owner or admin only).
cw resources delete <slug> [--org <slug>]

Workspaces

launch

Create a workspace from a repository URL. AI analyzes the repo to detect language, framework, Docker configuration, and services.
cw launch <repo-url|.> [--branch <branch>] [--resource <slug>] [--org <slug>]
Pass . to use the current directory’s remote URL.
cw launch github.com/your-org/your-repo
cw launch . --branch feature/new-api

workspaces

List workspaces across your resources.
cw workspaces [--org <slug>] [--resource <slug>]

open

Open a workspace in your browser or connect via SSH.
cw open [workspace]

start / stop

Start or stop a workspace.
cw start [workspace]
cw stop [workspace]

Running Commands

run (platform mode)

In platform mode, cw run SSHs into a workspace and runs a command in a persistent session.
cw run [name] -- <command> [args...]
cw run -- claude "fix the tests"
cw run worker --tag build -- make test
In standalone mode, cw run creates a local PTY session. In platform mode, it connects to a workspace first. See Sessions for standalone session management.

Secrets

secrets

Manage organization secrets from the CLI.
cw secrets [--org <slug>]

Billing & Cost

cost

View resource usage and cost estimates.
cw cost [--org <slug>]

billing

Open the billing portal.
cw billing [--org <slug>]

GitHub

github login

Authenticate with GitHub for private repo access.
cw github login

github logout

Remove stored GitHub credentials.
cw github logout

github status

Check GitHub authentication status.
cw github status

Utilities

update

Update the CLI to the latest version.
cw update

completion

Generate shell completions.
cw completion <bash|zsh|fish>
# Add to your shell profile
eval "$(cw completion zsh)"