env

A command that starts, checks, or stops a local development environment for a project. It uses containers—isolated processes commonly used to run services such as databases—and can keep the environment available for later checks.

In plain words
What is it for?
Use it to provision or attach to an environment, view its status, rebuild or recreate it, or shut it down after development and testing.
Why use it?
It avoids repeatedly setting up the same local services before testing an application. It is limited to local development and does not deploy to production, the cloud, or Kubernetes.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/higoralves/orc/env
Clone the repo
git clone --depth 1 https://github.com/HigorAlves/orc
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,472 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00034 $0.01472
Opus 5 $0.00017 $0.00736
Sonnet 5 $0.00007 $0.00294
Haiku 4.5 $0.00003 $0.00147

Measured 2d ago against content hash b02ec73d446a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

env scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

orc/commands/env.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/orc:env

Give the current project (or workspace) a running dev environment — the same one /orc:qa and /orc:flow boot before browser QA. Standalone uses: "I want to poke at the app", pre-warming the env before a QA run, checking what's up, tearing down.

When NOT to use

Production deploys, remote/cloud environments, Kubernetes — out of scope by design (see orc:docker-best-practices's hand-off list). This command provisions local dev environments only.

Arguments

  • up (default) — provision or attach. Honors the full detection ladder from orc:env-provisioning.
  • status — read-only: state file + live docker compose ps verification + orphan sweep.
  • down — tear down the current branch's environment. Destructive; previews and confirms first.
  • --containerize-app — force a full app container when nothing exists (default is hybrid: services in Docker, app on host).
  • --rebuild — force --build on boot regardless of buildInputsHash.
  • --fresh — ignore reusable state: down first, then re-provision from scratch.
  • --down-volumes — with down: also remove named volumes (default keeps them so the next boot reuses DB data).
  • --wait-timeout <s> — healthcheck wait budget (default 120).
  • --repos a,b / --repo a / --all-repos / --this-repo — workspace-mode targeting. See orc:workspace-mode.

Workflow

Phase 0 — Detect context

!orc-workspace-detect --banner

Context is injected above (ORC_* vars are exported for any Bash you run — do not re-run detection). loose context → surface and stop (no state dir to write). In workspace mode, resolve target repos from flags or AskUserQuestion — iron rule: no silent broadcast.

Phase 1 — Resolve the verb + state path

$verb is the first argument (up when empty). State file: orc-docker-env state-path "$ORC_STATE_DIR" <sanitized-branch> — in workspace mode the workspace-level state dir; single-repo mode the repo's.

Phase 2 — up

  1. Invoke the orc:env-provisioning skill (announce it). Quick attach check first: orc-docker-env is-ready <state-file>ready → echo the reuse line (project, services, appUrl, "reused") and skip to step 3.
  2. Dispatch orc-env-provisioner via Task. Pass: repoPath (worktree), stateDir, sessionId (sanitized branch per orc:state-protocol), the flags, and — workspace mode — repos[]/repoPaths, webSurfaceRepo (from the plan's "Repo touchpoints" when present), plan path for dependency order. On failed verdict: re-print the agent's 🛑 callout and AskUserQuestion — retry / --fresh retry / abort. On fallback: re-print the ⚠️ callout and continue.
  3. Register the session. If .orc/orc.json has an in-progress session for this branch, append docker_env_status: <status> (…) to its checkpoint. Otherwise register a lightweight entry (command: "env", status: "in_progress", branch, startedAt) so /orc:status shows the running environment and /orc:cleanup can find it.
  4. Echo: state path, appUrl + serviceEndpoints, boot seconds, reused flag.

Read the full file on GitHub · 102 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 102 lines · 34 tokens per session scan A b02ec73d446a

Subscribe to this mod's changes

env is a command published in the GitHub repository HigorAlves/orc (6 stars, last pushed 6d ago), licensed MIT. It adds 34 tokens to every session and 1,472 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.