Command Reference
crib up
Section titled “crib up”Build the container image (if needed) and start the workspace. On first run, this builds the image, creates the container, syncs UID/GID, probes the user environment, and runs all lifecycle hooks. On subsequent runs, it starts the existing container and runs only the resume hooks (postStartCommand, postAttachCommand).
crib up # standard runcrib up --disable-plugin ssh # skip a bundled plugin for this runcrib up --disable-plugin ssh,dotfiles # repeatable or comma-separatedSee Disabling plugins for per-project and global alternatives.
crib down
Section titled “crib down”Stop and remove the workspace container. This clears lifecycle hook markers, so the next crib up runs all hooks from scratch. Use this when you want a clean restart.
crib remove
Section titled “crib remove”Remove the workspace container, all associated images, and stored state. Shows a preview of what will be deleted and prompts for confirmation before proceeding.
crib remove # preview + confirmcrib remove --force # skip confirmation (useful in scripts)crib remove -f # shorthandcrib shell
Section titled “crib shell”Open an interactive shell inside the container. crib detects the user’s shell (zsh, bash, or sh) and uses the environment captured during crib up (including tools installed by version managers like mise, nvm, rbenv).
crib run
Section titled “crib run”Run a command inside the container through a login shell. This sources shell init files (.zshrc, .bashrc, .profile) before running your command, making tools installed by version managers (mise, asdf, nvm, rbenv) available on PATH.
crib run -- ruby -vcrib run -- bundle installcrib run -- npm testcrib exec
Section titled “crib exec”Run a command directly inside the container (raw docker exec). Does not source shell init files, so tools installed by version managers may not be on PATH. Use crib run instead if the command depends on shell init.
crib exec -- /usr/bin/envcrib exec -- bash -c "echo hello"Both run and exec inherit the probed environment (remoteEnv) from crib up.
crib restart
Section titled “crib restart”Restart the workspace, detecting what changed since the last crib up. See Smart Restart for details on how change detection works. Accepts --disable-plugin like crib up.
crib rebuild
Section titled “crib rebuild”Full rebuild: runs down followed by up. Use this when the image needs to be rebuilt (changed Dockerfile, base image, or features). Clears any snapshot image so the build starts from scratch. Accepts --disable-plugin like crib up.
crib logs
Section titled “crib logs”Show container logs. Defaults to the last 50 lines. For compose workspaces, shows logs from all services.
crib logs # last 50 linescrib logs -f # follow (stream) all logscrib logs --tail 100 # last 100 linescrib logs -a # show all logs (no tail limit)crib doctor
Section titled “crib doctor”Check workspace health and diagnose issues. Detects orphaned workspaces (source directory deleted), dangling containers (crib label but no workspace state), and stale plugin data. Use --fix to auto-clean.
crib doctor # check for issuescrib doctor --fix # auto-fix found issuescrib cache
Section titled “crib cache”Manage package cache volumes created by the package cache plugin.
crib cache list
Section titled “crib cache list”List cache volumes for the current workspace. Shows volume name, provider, and disk usage.
crib cache list # current workspace onlycrib cache list --all # all workspacescrib cache clean
Section titled “crib cache clean”Remove cache volumes. Without arguments, removes all cache volumes for the current workspace. Pass provider names to remove specific ones.
crib cache clean # remove all for current workspacecrib cache clean npm go # remove specific providers onlycrib cache clean --all # remove all crib cache volumescrib prune
Section titled “crib prune”Remove stale and orphan workspace images. Shows a dry-run preview with sizes before prompting for confirmation.
- Stale: labeled images for an active workspace that are no longer the active build image or snapshot.
- Orphan: labeled images for a workspace that no longer exists in
~/.crib/workspaces/.
crib prune # stale images for current workspace + confirmcrib prune --all # all workspaces including orphanscrib prune --force # skip confirmationcrib list
Section titled “crib list”List all known workspaces and their container status.
crib status
Section titled “crib status”Show the status of the current workspace’s container, including published ports. For compose workspaces, shows all service statuses with their ports.