Room Service CLI

Your developer Mac from the command line: scan, sweep, ports, clean.

Mac disk cleanup from the command line, plus Git sweeps, dev ports, Docker, and Health Check, all from the same engine as the app. Most commands print JSON and return exit codes you can script.

Mac disk cleanup from the command line, plus Git sweeps, dev ports, Docker, and Health Check, all from the same engine as the app. Most commands print JSON and return exit codes you can script.

Mac disk cleanup from the command line, plus Git sweeps, dev ports, Docker, and Health Check, all from the same engine as the app. Most commands print JSON and return exit codes you can script.

Room ServiceTerminal
Xcode
38 items
24.62 GB
Node Modules
214 items
19.31 GB
Docker
12 items
15.84 GB
~ %
Scan Results
[Xcode] 24.62 GB • 38 item(s)
[Node Modules] 19.31 GB • 214 item(s)
[Docker] 15.84 GB • 12 item(s)

You want to know what is eating the disk, whether any repo still has unpushed commits, and which process is sitting on port 3000, and you want to ask from a terminal, pipe the answer through jq, and put it in a shell hook. Most Mac cleaners are desktop only, and a script built from du, lsof, and git status loops does not know what a DerivedData folder is.

roomservice is the command line for Room Service. Same scan engine, same reports, same cleanup history, 16 commands, and nothing deleted unless you say so twice.

Projects, ports, and Mac disk cleanup from the command line

Scan and read reports. roomservice scan runs the scan the app runs and saves the report where the app reads it. scan --dev limits it to developer categories, report shows the latest, scan-diff compares the last two, and inspect lists one category with the same Safe, Review, and Risky levels as the Clean screen. --json prints English output whatever the app language, with a schemaVersion and a risk on every item.

Find unpushed work. roomservice sweep ~/Code walks repositories up to four levels deep and lists uncommitted changes, unpushed branches, and stashes. It is read-only and runs Git with --no-optional-locks, so a sweep leaves no trace.

See and stop dev ports. roomservice ports prints port, process, project, and directory for every local dev server, --all adds system and app listeners, and roomservice ports --kill 3000 asks Stop node (PID 812) on :3000? [y/N] before sending a stop. --yes skips the prompt.

Preview cleanup, then run it. clean is a dry run by default. --safe picks only Safe rows in cache, log, editor, design app, package manager, and Dev Clean Pack categories; --all adds Review rows such as node_modules and Xcode data; --category xcode_junk targets one category. Real cleanup needs both --no-dry-run and --confirm, moves to Trash unless you pass --permanent, and refuses a saved scan older than 24 hours.

Prune Docker through the Docker CLI. roomservice docker preview reports reclaimable images, stopped containers, and build cache for the current context, whether that is Docker Desktop, OrbStack, Colima, Rancher Desktop, or Podman. docker clean takes --images, --containers, --build-cache, or --all, always with --confirm.

Projects, health, and the Ops Feed. projects and project print what the Projects workspace knows: size, health warnings, Git state, and live ports. health prints the Health Check score and findings, and roomservice feed --since 24h lists what changed on this Mac.

How to set it up and script it

  1. Link the binary. The CLI ships inside the app bundle. Link it once with the command below, or pick Actions > Terminal in the app (Cmd+Shift+T) for a Terminal window with roomservice on its PATH.

    sudo ln -sf "/Applications/Room Service.app/Contents/MacOS/roomservice-cli" /usr/local/bin/roomservice
  2. Scan or read. roomservice scan writes ~/.room-service-swift/last-scan.json, the same file the desktop app uses. If the app finished a newer scan while yours ran, the CLI keeps the app’s and says so on stderr.

  3. Put it in a script. Exit codes are opt-in and separate “found something” from “failed”: 0 nothing, 1 error, 2 findings.

    roomservice sweep ~/Code --exit-code >/dev/null; [ $? -eq 2 ] && echo "push before you go"
    roomservice clean --dry-run --exit-code >/dev/null; [ $? -eq 2 ] && echo "there is something to clean"
  4. Add completions. roomservice completions zsh, bash, or fish prints a script generated from the CLI itself, so every command, flag, and --category value stays current.

    roomservice completions zsh > "${fpath[1]}/_roomservice"

What the CLI will and will not do

  • clean previews unless you pass --no-dry-run --confirm. Before deleting, every row is rechecked: a path created or changed since the scan is skipped, and so is a row whose app is running, such as Xcode or Docker Desktop.

  • No flag deletes Risky items, cloud copies, runtime versions, or AI conversations; the command prints how many rows it left for the app.

  • sweep, report, inspect, feed, health, projects, and history never modify anything.

  • ports --kill sends one SIGTERM to the PID it showed you and prints Stopped. It does not recheck the port with lsof and never escalates to a force quit; the app’s Stop button does both.

  • docker clean prunes through the docker CLI, never the filesystem scanner, and stops at a tcp:// or ssh:// context unless you pass --allow-remote-context.

  • roomservice mcp relays an AI agent’s stdio to the app over an owner-only Unix socket and holds no logic of its own. While the app’s MCP switch is off, every request gets an error that says so.

  • Pro commands read a license mirror the app writes, with no key inside. Nothing in the CLI talks to the network.

Free vs Pro

Free: scan, scan-diff, report, inspect, feed, health, ports listing, sweep, clean --dry-run, docker preview, history, export-history, completions, and mcp.

Pro: real cleanup (clean --no-dry-run --confirm, the interactive clean menu, and docker clean, under CLI Cleanup), ports --kill (Dev Port Control), and projects and project (Projects, the same gate as in the app). The CLI reads the license the app saved; if it cannot see it, or the app has not refreshed it in 30 days, open Room Service once.

Frequently Asked Questions

How do I clean up disk space on a Mac from the command line?

How do I find unpushed Git repos with a script?

How do I kill a process on a port from the Mac terminal?

Does the Mac cleaner CLI output JSON?

Is there a Homebrew formula?

Can my AI coding agent use the CLI?

Explore more of Room Service