dev-cli is a local workspace orchestration tool for multi-service projects.
It starts services through a detached supervisor process, keeps live state on disk, exposes a terminal UI for manual control, and lets you inspect logs and basic git status from a single place.
- Starts a full local environment from a declarative
.devrc.yml. - Expands service dependencies during the initial startup plan.
- Keeps a long-lived supervisor process per project so commands share the same runtime state.
- Opens a terminal UI to start, stop, restart, install, inspect, and manage services individually.
- Shows live workspace CPU/RAM metrics, per-service CPU/RAM usage, and git branch information when a service directory is a git repository.
- Stores per-service logs and opens them in the native terminal viewer from the UI.
- Opens a service directory in your editor or in an embedded terminal from the UI.
- Node.js
>= 20.14.0 - A Unix-like environment is recommended
Current process management relies on
psand POSIX signals. gitis only required for the branch-related UI actions (pullandcheckout).
For local development, install dependencies, build the CLI, and link the dev command globally:
nvm use
yarn install
yarn build
npm linkAfter that, the command is available in your shell:
dev --helpIf you change the CLI source code, run yarn build again to refresh dist.
When you run dev up <project> or dev ui <project>, the CLI ensures a local supervisor process is running for that project. Commands such as status, ui, up, and down talk to that supervisor over a local socket and read the persisted state file when needed.
This keeps the UI responsive and allows service control commands to operate on the same source of truth.
Use dev init to create a .devrc.yml through an interactive wizard.
dev initThe wizard asks for the project name, groups, services, startup options, and service dependencies, then shows the final YAML before writing it.
Create a .devrc.yml or .devrc.yaml in the workspace root:
project: amigo-workspace
session: amigo-workspace
hooks:
beforeUp: echo "Preparing workspace"
afterUp:
- echo "Workspace requested"
beforeDown: echo "Stopping workspace"
editor: code
groups:
infra:
services: [redis]
api:
services: [api]
services:
redis:
cwd: .
command: docker run --rm -p 6379:6379 redis
group: infra
api:
cwd: ./api
command: nvm use && yarn start:dev
installCommand: yarn
group: api
dependsOn: [redis]
env:
NODE_ENV: developmentproject: project identifier used by CLI commands.session: optional session name. If omitted, the project name is used.hooks.beforeUp: command or list of commands executed beforeup.hooks.afterUp: command or list of commands executed afterup.hooks.beforeDown: command or list of commands executed beforedown.editor: optional editor command used by the UI editor action. Defaults tocode.groups: named collections of services. These names can be used with--only.
cwd: working directory for the service command.command: command used to run the service.installCommand: optional command used by the UI install action.group: group name the service belongs to.autostart: optional boolean, defaults totrue.env: optional environment variables merged into the child process.dependsOn: optional list of service names required for the initialupplan.
- Config files are discovered only in the current workspace root as
.devrc.ymlor.devrc.yaml. projectin the config must match the<project>argument passed to the CLI.- Relative
cwdvalues are resolved from the directory that contains the config file. ~/and absolutecwdvalues are supported.- Every service must belong to an existing group and must be listed in that group's
servicesarray. dependsOnis only used duringdev up.dev upstarts services in dependency phases.- After one dependency phase is started, the next dependent phase waits 5 seconds before starting.
- Services in the same dependency phase start together after that shared delay.
--onlyaccepts group names or service names.- Group
layoutmetadata is still accepted in the config for compatibility, but the built-in UI does not currently use it. - Hooks run in the workspace root using the current shell environment.
- Service commands and install commands run through the current shell from each service
cwd.
Starts the selected project environment through the supervisor and opens the terminal UI by default.
Examples:
dev up amigo-workspace
dev up amigo-workspace --only infra,api
dev up amigo-workspace --no-uiOptions:
--only <targets>: comma-separated groups or service names.--no-ui: start the environment without opening the TUI.
Behavior:
- If no
--onlyvalue is provided, all services withautostart: trueare targeted. - Dependencies are expanded for the initial startup plan.
- A fixed 5-second buffer is applied between dependency phases during
dev up. beforeUpandafterUphooks run around theupflow.
Ensures the supervisor is running and opens the terminal UI without starting services automatically.
dev ui amigo-workspacePrints a short service summary and the current service table.
dev status amigo-workspaceBehavior:
- If the supervisor is running, status is read from live supervisor state.
- Live status includes PID, uptime, memory, CPU, and log size columns.
- If the supervisor is not running, a config-based table is printed with services marked as stopped.
Stops all services managed by the supervisor and shuts the supervisor down.
dev down amigo-workspaceBehavior:
- Runs the
beforeDownhook before shutdown. - Stops every managed service and removes the active supervisor state.
Creates a .devrc.yml in the current directory through an interactive setup flow.
dev initBehavior:
- Prompts for groups, services, commands, install commands, dependencies, and editor settings.
- Writes
.devrc.ymlwhen the flow is confirmed.
The built-in UI lets you manage services individually after the supervisor is running.
The header shows the project name, running service count, and live CPU/RAM usage. The service list shows the current git branch for service directories that are git repositories, plus per-service memory and CPU usage when the terminal is wide enough. On wider terminals, the table also shows a TERM column when a service has an active embedded terminal session.
↑/↓: move between servicesPageUp/PageDown: scroll logsHome/End: jump to top or bottom of the visible log paneqorEsc: exit the UI
sorEnter: start the selected stopped servicei: open a confirmation modal forinstallCommandon the selected stopped, failed, or running servicek: kill the selected running servicer: restart the selected running service, or recover a failed service by starting it againc: clear logs for the selected service when logs existv: open the full service log in the native terminal viewere: open the selected service directory in the configured editort: open a full-screen embedded terminal for the selected service directoryx: kill the embedded terminal for the selected service?: open a shortcut help modal with the full list of available keysEscinside the embedded terminal: hide it and return to the UI; presstagain to resume the same session for that service
The embedded terminal takes over the full TUI while it is visible. Hiding it restores the services and logs panes exactly where you left them.
If you try to exit the UI while one or more embedded terminal sessions are still running, the UI asks for confirmation before killing them.
p: open a confirmation modal forgit pull --rebased: open a confirmation modal with a branch input field and rungit checkout
install, pull, and checkout clear the selected service log before running. When those actions target a running service, the supervisor stops the service first, runs the action, and restarts it after success without clearing the log again, so the command output remains visible in the log pane.
start always clears the selected service log before launching the service. restart stops the service, clears the log, and then starts it again.
dev up amigo-workspace
dev status amigo-workspace
dev ui amigo-workspace
dev down amigo-workspaceCommon flow:
- Define the workspace in
.devrc.yml. - Run
dev up <project>to start the environment. - Use the UI to inspect logs and control individual services.
- Use
dev status <project>when you want a quick non-interactive snapshot. - Run
dev down <project>to stop everything cleanly.
yarn install
yarn build
yarn testyarn test builds the CLI and runs the Node test suite in test/*.test.mjs.
This project is focused on local development workflows, not production orchestration. It is designed for projects where a lightweight local supervisor and a terminal-first UI are enough to manage a multi-service workspace.