Skip to main content

Workspace Storage Guard

Workspace Storage Guard is a local MCP server and command-line tool for software developers on macOS and Linux. It reports free space, ranks workspace directories by size, and reclaims allowlisted build output such as Cargo debug artifacts, Next.js caches, and node_modules. Optional cleanup covers developer caches and unused container resources on Rancher Desktop, Colima, Docker Desktop, Podman, and Kiri.

How it helps

  • See what's taking space. Check free space on your workspace volume and find large directories from your agent or terminal.
  • Reclaim space for development. Clean configured, eligible build outputs when space runs low. You can also opt in to developer cache and container cleanup.
  • Keep an eye on storage. Configure agent hooks or a macOS LaunchAgent to check in the background and optionally notify you.
  • Choose the cleanup scope. Workspace cleanup uses your local allowlists and checks whether paths are safe to clean. Generated files may need to be rebuilt afterward.

How it works

flowchart LR
    A[Agent via MCP<br/>or terminal] --> B[Check or scan storage]
    A --> C[Request cleanup]
    D[Configured hooks<br/>or LaunchAgent] --> C
    C --> E{Free space below<br/>the minimum?}
    E -- Yes --> F[Clean eligible<br/>allowlisted output]
    F --> G[Optionally clean caches<br/>and container resources]
    G --> H[Aim for the<br/>free-space target]
    E -- No --> I[No normal cleanup needed]

The minimum triggers normal cleanup, and the target controls when it stops trying new candidates. Cleanup can finish below the target if there is nothing else eligible or it runs out of time. Forced cleanup can process eligible workspace output regardless of free space. See the cleanup flow

Install from PyPI

Install uv and create your local config. Then run the published MCP server with uvx in Hermes Agent, Claude Code, GitHub Copilot CLI, or Codex. Setup guide

For example, register it in Codex using the package from PyPI.

codex mcp add workspace-storage-guard -- "$(command -v uvx)" \
	--default-index https://pypi.org/simple workspace-storage-guard@0.5.6

Start a fresh agent session and ask it to call storage_status.

For terminal commands, hooks, or the macOS LaunchAgent, install a persistent copy with uv tool install. Install the CLI

Check and reclaim space

  • storage_status reports free space and cleanup thresholds, with optional memory and container usage.
  • scan_storage ranks the largest directories in your workspace.
  • scan_caches reports disk usage of known developer caches, including outside the workspace.
  • restore_storage starts configured cleanup when free space drops below your minimum and lists what it cleaned or skipped. Pass {"dry_run": true} to preview eligible targets and skip reasons without deleting files, or {"force": true} to clean every eligible workspace output regardless of free space.

Your workspace path and allowlists live in a per-user local config. Scan results include local paths and may be shared with your agent’s model provider. Usage guide

Automate checks

Run Storage Guard from the terminal, add advisory hooks to your agents, or schedule checks with a macOS LaunchAgent. The example LaunchAgent runs at sign-in and every five minutes. Advisory hooks can report recovery results to the agent; desktop notifications can also report results or warn about low disk space and high memory use. Hook and LaunchAgent setup

Publish a release to PyPI

Contributing and running checks

Metadata

Release files for workspace-storage-guard 0.5.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for workspace-storage-guard 0.5.6
File Size Uploaded Provenance Actions
workspace_storage_guard-0.5.6.tar.gz 44.8 kB Without provenance Details for workspace_storage_guard-0.5.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for workspace-storage-guard 0.5.6
File Interpreter ABI Platform Actions
workspace_storage_guard-0.5.6-py3-none-any.whl Python 3 none any Details for workspace_storage_guard-0.5.6-py3-none-any.whl

Total release size: 66.0 kB

Release files / workspace_storage_guard-0.5.6.tar.gz

Download URL workspace_storage_guard-0.5.6.tar.gz
Size 44.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2a4057899432f58f6bf0c0704ca5e7e5d25e2e0085e9e10d4c6d2ccfa4aea7bd
BLAKE2b-256 checksum
How to use checksums
ea06612d2c80fea3467a8c71999bcbc1a8233d68b4e8aa6eab6992b8cae3007a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.13 {"installer":{"name":"uv","version":"0.13.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / workspace_storage_guard-0.5.6-py3-none-any.whl

Download URL workspace_storage_guard-0.5.6-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
925ea1e5d49654106315035c27c0dcee05f02e5854f49a068d34e6da682e1202
BLAKE2b-256 checksum
How to use checksums
a737c289fef4e891ba922b067dcc81271114abe292f7683fb639f429d75d0616
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.13 {"installer":{"name":"uv","version":"0.13.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for workspace-storage-guard 0.5.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page