Reference

Commands

Every Rift command, grouped by what it acts on. Commands that act on a project use the checkout of the directory you run them in.

CommandWhat it does
rift initCreate a rift.yaml for this project.
rift setupWrite this checkout's .env and bring it up.
rift upStart this checkout and serve it at its own HTTPS domain.
rift downStop this checkout and remove its route.
rift statusList everything the router is serving right now.
rift dashWatch every project and worktree on this machine in one live view.
rift doctorDiagnose this machine's Rift setup.
rift trustTrust the shared router's certificate authority.
rift router:startStart the shared router.
rift router:stopStop the shared router.
rift router:restartRestart the shared router.

Project commands

rift init

Create a rift.yaml for this project. Rift asks for the project name, base domain and app service, suggesting defaults from your environment and Docker Compose files, and detects the configurable ports your Compose file publishes.

OptionWhat it does
--forceOverwrite an existing rift.yaml.

See Project configuration.

rift setup

Write this checkout's .env, then run rift up. Use it for a new worktree, or after changing settings that need to be written to .env.

See Worktrees and .env.

rift up

Start this checkout and serve it at its own HTTPS domain. Use it for a copy that is already set up. In order, it:

  1. checks that the router's ports are free, and stops with the conflict if not,
  2. trusts the router's certificate authority if it is not trusted yet, asking for your system password up front,
  3. starts the shared router if it is not running, and issues the certificates for this copy's domains,
  4. runs the before_up hooks, then starts the containers,
  5. checks that the app container joined the router network, showing the Docker Compose change to make if not,
  6. registers the copy's route, runs the after_up hooks, and prints its URLs.

rift down

Stop this checkout and remove its route, running the before_down and after_down hooks. Every other copy, and the shared router, keep running.


Machine commands

rift status

List everything the router is serving right now. A route can show:

MarkerMeaning
(down)The app container is not running.
(unreachable)The container is running but has not joined the router network.

rift dash

Watch every project and worktree on this machine in one live view, and act on any of them. Outside a terminal, it prints rift status instead.

See The dashboard.

rift doctor

Diagnose this machine's Rift setup, and the current project's when run inside one. Each failed check shows how to fix it.

AreaWhat it checks
DockerDocker is running.
Projectrift.yaml is valid, .env carries every variable Docker Compose interpolates, and the app container is on the router network.
NetworkThe project's domain resolves to the router, and the bind address, when set, is assigned to this machine.
RouterThe router is running on its configured ports, its admin API answers, its certificate authority is trusted, and no other router runs the same image.

rift trust

Trust the shared router's certificate authority, adding it to your system trust store. This usually asks for your system password. rift up does it for you when the certificate authority is not trusted yet.


Router commands

rift router:start

Start the shared router. If its bind address is not assigned to your machine, it stops and shows the command to add it.

rift router:stop

Stop the shared router. Every copy stops being served until it starts again.

rift router:restart

Restart the shared router, recreating its container when its ports or address have changed in the machine-wide settings. Its certificates are kept. Run rift up afterwards in each copy you want served.


Global options

Every command accepts these options:

OptionWhat it does
-v, -vv, -vvvShow the output of the commands Rift runs, such as Docker, as it happens.
-h, --helpShow help for the command.
-q, --quietOnly show errors.
--silentShow nothing.
-n, --no-interactionNever ask a question.
--ansi, --no-ansiForce or disable coloured output.
-V, --versionShow Rift's version.

Run rift list to see every command, or rift <command> --help for one.

Previous
Running alongside Valet, Herd or Lerd