Skip to content
PortBay

The whole app, scriptable from your terminal

The portbay CLI is a thin layer over the same Rust core as the app: the same registry, the same supervisor, the same board. If the UI can do it, your shell probably can too.

The short answer

How do I manage local dev sites from the terminal?

A dev-environment CLI is only worth using if it reads and writes the same state as the app's UI. A parallel hand-rolled setup — php -S localhost:8000 on a port the app knows nothing about, no domain, no certificate — drifts from what the tool believes within a day. PortBay's CLI installs alongside the app (brew install --cask portbay) and talks to the same Rust core and registry, so nothing diverges. portbay list, status, start, stop --all, restart, logs --limit and open cover the everyday loop; portbay doctor diagnoses runtimes, ports, registry and certificate state; portbay export plus a portbay.yml config-as-code file make a project reproducible with portbay add. The board, sandbox, databases, certificates, DNS and import each have subcommands, and every command takes --json, which makes the CLI a scripting surface for agents. It expects the PortBay daemon to be running.

Verified against the product, 2026-07-10.

In the app

Add, start, open: the terminal loop

zsh — acme-shop
$ portbay add ~/Sites/acme-shop

The same registry the app uses, driven from a shell: add a folder, start it, and the .test URL is live.

How it works

The commands that carry the day

  1. Install once, get both
  2. Run the everyday loop
  3. Diagnose with doctor
  4. Commit the setup
  5. Script it, or let agents

Install once, get both

The Homebrew cask installs PortBay.app and the bundled portbay CLI together. Uninstalling through Homebrew removes them together too.

brew tap portbay-app/portbay && brew install --cask portbay

Run the everyday loop

List projects with live status, start and stop them, tail logs, open the project's URL in the browser. The daemon (the app) does the work; the CLI is the remote.

portbay start blog && portbay open blog

Diagnose with doctor

One command checks the runtime, ports, registry and certificate state and says what is wrong, before you start reading logs.

portbay doctor

Commit the setup

portbay export writes .portbay.json, and portbay.yml captures hostname, runtime, HTTPS, env and linked databases as config-as-code. A teammate runs portbay add and gets an identical setup.

Script it, or let agents

Every command takes --json. Shell completions generate for your shell, and the board's own subcommands mean a script or an agent can file and move cards without the UI.

portbay --json status
Spec

The CLI, tier by tier

CapabilityCommunityPro
Project lifecycle (list, start, stop, logs, open)IncludedIncluded
doctor diagnosticsIncludedIncluded
Config-as-code (.portbay.json, portbay.yml)IncludedIncluded
Board, sandbox, databases, certs subcommandsIncludedIncluded
--json output + shell completionsIncludedIncluded
Projects under managementUp to 6Unlimited

The CLI expects the PortBay daemon to be running; in the current build that means the app is open.

Without PortBay

Scripting a GUI-only dev tool

When the tool has no CLI, automation means AppleScript, screenshots in CI, or keeping a parallel shell setup that drifts from what the app believes.

One core, two faces: the CLI reads and writes the same registry as the app, so scripts and clicks never disagree.

Questions

Asked before downloading

How do I install the CLI?

PortBay's CLI ships with the app: brew tap portbay-app/portbay, then brew install --cask portbay installs PortBay.app and the bundled portbay command together. The DMG install includes it too.

Does the CLI work without the app open?

The CLI needs the PortBay daemon, which in the current build means the app should be open (the menu-bar mode counts). The CLI then reads the registry and drives the same Process Compose supervisor the app uses.

Can I script PortBay from the terminal?

Yes. Every command accepts --json for machine-readable output, completions generate for your shell, and --registry points at an isolated registry file for testing. The board subcommands make it a scripting surface for agents as well as humans.

What is portbay doctor?

A diagnostic pass over the runtime, ports, registry and certificate state that names what is wrong instead of leaving you to correlate logs. It is the first command to run when a project will not start.

What is portbay-agent?

The bundled agent engine. It powers local-model dispatch from the task board (an Ollama card launches it in a terminal with the model selected on the card) and agent-specific flags and subcommands proxy through to it from the portbay CLI.

PortBay mascot — a friendly blue tugboat

Give your projects and your agents a real local home.

Download for macOS

Free & open source · macOS 11+ on Apple Silicon · Pro from $10/mo