Machine Interface · Zero-Dependency Python CLI & Browser Cloud Shell
One `gridforge` command tree: offline air-gapped, remote HTTPS, or in-browser.
dependencies = []25 free units/moPyPI · comingIdempotency-Key headers on metered calls, exponential `Retry-After` backoff, and RFC 8628 browser device login.1. Install from GitHub Release or Source Checkout
Python ≥ 3.11Install today from verified GitHub Release artefacts (`cli-v0.9.0`) with SHA256SUMS verification, or from a repository checkout. Direct PyPI installation (pipx install gridforge-engine) is coming pending the first Trusted Publisher release.
pip install gridforge or pipx install gridforge — the bare gridforge name on PyPI belongs to an unrelated third-party package. Always use verified release wheels, gridforge.pyz, or the gridforge-engine distribution.# 1. Download verified release wheel, standalone zipapp & checksums (cli-v0.9.0)
curl -fsSLO https://timetopower.ai/releases/cli-v0.9.0/gridforge_engine-0.9.0-py3-none-any.whl
curl -fsSLO https://timetopower.ai/releases/cli-v0.9.0/gridforge.pyz
curl -fsSLO https://timetopower.ai/releases/cli-v0.9.0/SHA256SUMS
sha256sum --ignore-missing -c SHA256SUMS
# (Alternative for GitHub-authenticated collaborators: gh release download cli-v0.9.0 -R iceccarelli/GridForge-AI)
# 2a. Install isolated CLI from verified wheel
pipx install ./gridforge_engine-0.9.0-py3-none-any.whl
# 2b. Or run standalone single-file executable directly (Python 3.11+ stdlib only)
python3 ./gridforge.pyz local verify# From a local clone of iceccarelli/GridForge-AI
pipx install .
# PyPI channel (coming — pending first Trusted Publisher release):
# pipx install gridforge-engine
# Shell completions (bash / zsh / fish)
gridforge completion bash > ~/.local/share/bash-completion/completions/gridforge
gridforge completion zsh > ~/.zfunc/_gridforge
gridforge completion fish > ~/.config/fish/completions/gridforge.fish2. Sign in via RFC 8628 Device Flow & Wire MCP
chmod 0600`gridforge login` opens `/console/cli/activate` with an 8-character code, exchanges it once for a scoped `gfk1` key, and writes `~/.config/gridforge/credentials.json` (`0600`). Telemetry is strictly opt-in (`telemetry_opt_in = false`) and unconditionally disabled when `DO_NOT_TRACK=1` or `CI=true`.
gridforge login
gridforge whoami
gridforge config list
gridforge ops healthgridforge mcp config claude
gridforge mcp config cursor
gridforge mcp config vscode
gridforge mcp config generic --jsonProduct & Engineering Workflows
10 Copyable CLI Recipes
Free 7-input hall qualification
Identify what physical constraint binds first on an existing hall without spending a single metered unit.
gridforge qualify \
--contracted-mw 12 --site-peak-mw 7.4 --it-load-mw 4.9 \
--busway-a 400 --tapoff-a 63 --plant-supply-c 6 --positions 180 \
--remote --jsonPre-flight unit & cost check
Verify exact unit weight, PAYG cost, and remaining monthly allowance before executing a loop.
gridforge estimate /v1/portfolio --hall-count 15 --remote --jsonDensity Screen (local air-gapped or remote API)
Generate Markdown, HTML, and `model_pack.json` locally from an intake file, or call `/v1/screen` remotely with UUIDv7 idempotency.
gridforge init -o intake.json
gridforge gaps intake.json
gridforge screen intake.json -o out/screen
gridforge screen intake.json --remote --jsonCapacity & Density Envelope Study
Solve all cooling architectures, build the costed headroom ladder, run one-at-a-time sensitivity, and emit `board_summary.html`.
gridforge study intake.json --objective max_compute --csv -o out/studyGrid vs Behind-the-Meter Time-to-Power comparison
Compare scenarios side-by-side, stating energisation dates only where declared equipment lead times support them.
gridforge compare intake.json --objective fastest -o out/comparePower Readiness & BTM Deployment Assessment
Size rack headroom against target compute and test BTM generation + BESS architectures under contingency.
gridforge power assess intake.json --target-racks 120 -o readiness.json
gridforge power deploy-assess btm_request.json -o btm_assessment.jsonMulti-hall Portfolio ranking
Rank up to 50 halls per API request under one identical constraint library, flagging non-comparable halls explicitly.
gridforge portfolio halls/*.json --client "EU Estate" --objective max_compute -o out/portfolioTender Procurement Specification & Bid Normalisation
Derive a site-condition equipment specification and rank returned supplier response schedules in racks, weeks, and euros.
gridforge spec intake.json --list
gridforge spec intake.json --constraint busway_ampacity -o out/spec
gridforge bids intake.json supplier_a.json supplier_b.json --ingestHall Watch state diffing & MCP agent wiring
Attribute capacity or date changes between two intakes to exact input drivers, or emit ready-to-paste MCP configs for Claude, Cursor, or VS Code.
gridforge diff q3_intake.json q4_intake.json -o out/diff
gridforge mcp config claude
gridforge mcp config vscodeMetered usage, prepaid credits & monthly spend caps
Inspect live endpoint usage, check prepaid credit balances, list halls & invoices, and enforce hard-stop monthly spend caps.
gridforge catalogue
gridforge halls list
gridforge usage --json
gridforge credits balance
gridforge cap set 100Continuous Diligence
GitHub Actions Capacity Gate
Store a scoped `gfk1` key in `GRIDFORGE_API_KEY`. Every metered `POST` carries an automatic RFC 9562 UUIDv7 `Idempotency-Key` so network retries never double-bill, and any HTTP `402` spend-cap stop exits with code `4` and prints the exact `/console/usage` recovery link. Reusable templates ship in actions/gridforge-screen/action.yml (GitHub Actions) and .gitlab/ci/gridforge-screen.yml (GitLab CI/CD).
name: hall-capacity-gate
on:
pull_request:
paths:
- "halls/*.json"
jobs:
screen:
runs-on: ubuntu-latest
env:
DO_NOT_TRACK: "1"
GRIDFORGE_API_KEY: ${{ secrets.GRIDFORGE_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Download & verify zero-dependency GridForge CLI (cli-v0.9.0)
run: |
curl -fsSLO https://timetopower.ai/releases/cli-v0.9.0/gridforge.pyz
curl -fsSLO https://timetopower.ai/releases/cli-v0.9.0/SHA256SUMS
sha256sum --ignore-missing -c SHA256SUMS
chmod +x ./gridforge.pyz
- name: Check metered unit cost before running
run: ./gridforge.pyz estimate /v1/screen --remote --json
- name: Run deterministic Density Screen
run: ./gridforge.pyz screen halls/dh02.json --remote --json > screen-result.jsonDeterministic Automation Contract
Exit Codes (`0` / `2`–`6`)
Scripts and agents can branch reliably on process exit status without scraping prose.
| Exit | Constant | Meaning & Next Action |
|---|---|---|
| 0 | OK | Command succeeded (`--json` emits a single JSON document on stdout). Consume stdout JSON or inspect generated report artefacts. |
| 2 | USAGE_OR_INPUT_ERROR | Invalid CLI flags, schema validation refusal, or missing intake file. Run `gridforge <cmd> --help` or `gridforge init > intake.json`. |
| 3 | AUTH_OR_PERMISSION_ERROR | Unauthenticated, expired/revoked `gfk1` key, or insufficient RBAC scope. Run `gridforge login` or rotate keys in `/console/api-keys`. |
| 4 | QUOTA_OR_SPEND_CAP_EXCEEDED | HTTP 402 monthly spend cap tripped, allowance used, or prepaid credits exhausted. Top up credits or adjust spend cap at `/console/usage`. |
| 5 | UPSTREAM_OR_NETWORK_ERROR | Unreachable engine API or exponential retries exhausted on 429/502/503/504. Check `/status` and retry with the same `Idempotency-Key`. |
| 6 | INTERNAL_ERROR | Unexpected client or engine fault. Open a diagnostic case at `/support`. |