Skip to content
Docsv0.7.2

denvig services

The services command manages background services defined in your projects. Services are long-running processes such as web servers, databases, or workers. Denvig supervises them with launchctl, keeps their logs, and can route them through the gateway on a custom domain.

Terminal window
denvig services <subcommand>
Option Description
--project The project slug to run against. Defaults to the current directory.
--json Output in JSON format.

List the current project’s services, with each worktree’s services nested beneath it:

Terminal window
denvig services list
Option Description
--all List services across all projects and global services.
--no-worktrees Only show the current project’s services, hiding nested worktree services.
--global List only global services.
--worktree <branch> List services for a sibling worktree by branch name (use main for the primary checkout).
--status <status> Filter by runtime status. Accepts a single value or a comma-separated list: running, stopped, error.
Terminal window
# Only running services across every project
denvig services list --all --status running
# Services in the `feature/x` worktree of another project
denvig services list --project marcqualie/denvig --worktree feature/x

Start a service:

Terminal window
denvig services start <name>

The name can be a bare service name (api) or a cross-project path (marcqualie/denvig/hello).

Option Description
--worktree <branch> Start the service in a sibling worktree by branch name (use main for the primary checkout).
--port <port> Port to start on, or random to allocate a free dev port. Defaults to the configured port, falling back to a random one when it’s busy.
--domains <list> Comma-separated domains to route to this start, replacing the configured ones and claiming them from any current owner (handed back on stop).
--no-domains Start without claiming any domain — run on the port only and leave any existing route owner in place. Takes precedence over --domains.
Terminal window
# Claim api.local for the feature worktree's copy of the service
denvig services start api --worktree feature/x --domains api.local
# Run a throwaway instance on a random port without touching the gateway
denvig services start api --port random --no-domains

Stop a running service. Any domains it claimed via --domains are handed back to their previous owner:

Terminal window
denvig services stop <name>

Restart a service:

Terminal window
denvig services restart <name>

Show the status of a specific service, including recent log lines:

Terminal window
denvig services status <name>

Show logs for a service:

Terminal window
denvig services logs <name>

Stop all of the project’s services and remove them from launchctl:

Terminal window
denvig services teardown

You can also tear down all services on your machine at once as a hard reset:

Terminal window
denvig services teardown --global