Dock CLI

The Dock CLI, capy dock, is Capy without the desktop app. It turns a Linux, macOS, or Windows machine into a device that threads run on, so a build server, a cloud VM, or a spare Mac can host your threads with the tools, credentials, and services already on it. You start and follow those threads from any browser, the same way as threads on the desktop app.

Install⁠

Install the Dock CLI as the user that should run threads, because threads run commands with that user's permissions. The installer picks the build for the machine and checks its checksum. On macOS and Windows it also checks the binary's signature. Run the installer again to update.

SystemSupported
macOSApple Silicon and Intel
Linuxx64 and arm64, with glibc. Alpine and other musl distributions aren't supported.
Windowsx64 and arm64, on Windows 10 version 1809 or later.

macOS and Linux⁠

  1. Run the installer in a terminal. It refuses to run as root.

    Terminal
    curl -fsSL https://downloads.capy.ai/stable/dock/install.sh | sh
  2. The installer puts the capy command in ~/.capy/bin, linked to the version it installed under ~/.capy/dock-install. If ~/.capy/bin isn't on your PATH, add this line to your shell profile, such as ~/.zshrc or ~/.bashrc, then open a new terminal:

    Terminal
    export PATH="$HOME/.capy/bin:$PATH"
  3. Run capy dock to sign in and pair the machine.

Windows⁠

  1. Install Git for Windows. Threads run commands in Git Bash.

  2. Run the installer in PowerShell, not Command Prompt. It refuses to run in a PowerShell started with Run as administrator.

    powershell
    irm https://downloads.capy.ai/stable/dock/install.ps1 | iex
  3. The installer puts capy.exe in ~\.capy\dock-install\current\bin. If that folder isn't on your PATH, run this to add it for your user, then open a new terminal:

    powershell
    [Environment]::SetEnvironmentVariable('Path', "$HOME\.capy\dock-install\current\bin;" + [Environment]::GetEnvironmentVariable('Path', 'User'), 'User')
  4. Run capy dock to sign in and pair the machine.

Pair the machine⁠

Run capy dock in a terminal. On the first run it shows a link, a QR code, and a pairing code:

  1. Open the link or scan the QR code, or open Pair a device in device settings and type the code.
  2. Check the hostname and system, pick the organization, and name the device.
  3. Select This code is on a machine I am setting up right now, then select Approve.
  4. Back in the terminal, confirm that the organization and device name are yours.

Never approve a code someone sent you. The first run needs an interactive terminal, so the pairing code never ends up in a log.

Run threads⁠

While capy dock runs, the machine is online. Pick it in Machine when you start a thread or a Captain, like any other device. Threads on the machine work in git worktrees under ~/.capy/worktrees and have no machine-time charge.

To link the folders where your repositories are cloned, pass --dir when you start the dock, or use capy dock dirs while it's stopped:

Terminal
capy dock --dir ~/src/api --dir ~/src/web
capy dock dirs add ~/src/mobile

capy dock runs in the foreground. When it stops, the machine goes offline, and its threads wait until it runs again or move to the cloud, as described in Sleep and offline. After the first run it needs no terminal, so you can keep it running under tmux or a service manager such as systemd or launchd.

Commands⁠

CommandWhat it does
capy dockRuns the dock in the foreground, and pairs the machine on the first run.
capy dock statusShows whether the dock is running and which organization the machine is paired with.
capy dock doctorChecks the machine, the install, the pairing, git and gh (and Git Bash on Windows), and whether Capy is reachable.
capy dock dirsLists linked folders. add <path> and remove <path> change them.
capy dock verifyChecks the installed files against the list signed into the binary.
capy dock versionPrints the version.

Add --verbose to capy dock to print its logs.

Good to know⁠

  • One user on a machine runs one Capy device. Quit the desktop app before you start capy dock as the same user.
  • Threads can read and change anything that user can. On a shared server, create a dedicated account for the dock.
  • To unpair a machine, open it in device settings and choose Revoke device. The next capy dock run asks to pair again.
Open in Capy