Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Modal CLI

$ modal Official High Risk
Modal Labs · Cloud & Infra · Apache-2.0 · macos / linux / windows

Modal CLI (modal) runs, deploys, and inspects serverless Python and GPU workloads on Modal, offering --json on app list, volume ls, secret list, and profile list, --env workspace isolation, and MODAL_TOKEN_ID / MODAL_TOKEN_SECRET auth.

FCRS-1.0 Score
81 /100
Good
Medium Confidence
Zero-Friction Install
pip install modal
CLI vs MCP Decision CLI Preferred vs MCP

modal executes and mounts local Python modules directly onto remote GPU containers, which cannot be done cleanly via MCP.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Inspection commands (app, volume, secret, profile) support --json, while modal run and modal deploy stream container logs.

  • Supports --json on inspection commands and --env isolation
Trust & Safety 18 / 25

--env isolation and ephemeral modal run lifecycle reduce lingering infra, though GPU runs can incur rapid billing.

  • Ephemeral modal run vs persistent modal deploy; --env isolation
Setup & Portability 13 / 15

Simple pip install modal or uvx --from modal modal across platforms.

  • PyPI modal package and uvx compatibility
Utility & Efficiency 13 / 15

Zero-YAML serverless Python/GPU execution directly from local files.

  • Mounts local Python code into cloud containers seamlessly
Maintenance & Lineage 9 / 10

Official modal-labs/modal-client updated frequently by Modal Labs.

  • Official modal-labs/modal-client under Apache-2.0
Docs & Verifiability 8 / 10

Well-documented CLI reference at modal.com/docs/reference/cli.

  • Official Modal CLI reference

Security, Auth & Guardrails

Auth Modes
Config File Env API Key OAuth Browser
Credential Storage

Stores profiles in ~/.modal.toml, or reads MODAL_TOKEN_ID and MODAL_TOKEN_SECRET from the environment.

Side Effects
Read-Only Remote Write Destructive Billing Impact
Cost & Quotas

CLI is free (Apache-2.0); Modal GPU/CPU compute bills per second of execution.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Modal CLI Agent Rules
- Check `modal profile current` and pin `--env` explicitly before running or deploying.
- Pass `--json` on `app list`, `volume list`, `secret list`, and `dict list`.
- Prefer `modal run` (ephemeral) during testing; avoid GPU-heavy deploys without budget approval.

Agent-Ready Command Recipes

Safe Read-Only Queries

List deployed Modal apps as JSON
modal app list --json

Lists running, stopped, and deployed Modal apps in structured JSON.

Inspect Modal volumes in JSON
modal volume list --json

Lists persistent volumes and creation timestamps as JSON.

Controlled Writes & Previews

Run an ephemeral Modal function in a staging --env
modal run --env dev train.py

Executes an ephemeral job that tears down automatically after completion inside dev.

Strengths for Agents

  • + --json available across app, volume, secret, and profile listing commands.
  • + --env isolates dev/staging/prod apps, secrets, and volumes cleanly.
  • + Fast uvx or pip setup with MODAL_TOKEN_ID / MODAL_TOKEN_SECRET env auth.

Caveats & Pitfalls

  • ! GPU workloads can rack up significant charges quickly if left running or looped.
  • ! Lacks a dry-run preview mode for modal deploy.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI