Skip to main content

Dev Environment

SABLE is four JavaScript workspaces under one repository, plus a repository-root developer tooling layer that ties them together. This page is the map of what runs where.

Node engine

The repository root pins "engines": { "node": ">=22 <23" }. Use nvm use before anything else — npm run bootstrap and CI both assume Node 22.

The four workspaces

WorkspacePathWhat it isTest command
Trigger foundationsable-agents-demo/Trigger.dev tasks, agent source, prompts, skills, docsnpm test (from sable-agents-demo/)
Web appsable-agents-demo/web/Static HTML/JS pages plus Vercel serverless functions in api/*.jsnpm test (native Node test runner over tests/*.mjs and tests/security/*.test.mjs)
Supabase backendsable-agents-demo/supabase/Migrations, Edge Functions, seeds, backend helper testsnpm test
Docs sitesable-agents-demo/docs-site/This Docusaurus sitenpm run build

Each workspace has its own package.json and lockfile. npm run bootstrap (repository root) installs all four from their committed lockfiles in one pass; it does not touch secrets or link a cloud project.

Repository-root developer commands

These live in scripts/developer/ and are invoked from the repository root:

CommandPurpose
npm run bootstrapInstall every SABLE workspace from lockfiles.
npm run doctorCheck runtime, repository state, dependencies, CLIs, and GitHub/Supabase/Vercel access.
npm run doctor -- --offlineThe same checks, skipping calls to cloud services.
npm run doctor -- --strictTreat missing optional service access as a failure (useful in CI-like verification).
npm run setup:gitnexusBuild or refresh the local GitNexus code-intelligence index. Root-only — it does not run from inside sable-agents-demo/.
npm run doctor:claudeValidate Claude Code, the repo-local skills, MCP configuration, and the destructive-command safety hook.
npm run doctor:claude -- --offlineThe same validation without checking sign-in.
npm run dev:sableStart static pages and web/api/*.js together via vercel dev.
npm run checkThe local equivalent of SABLE CI: manifests, tests, typecheck, and docs build.
npm testTests the developer tooling itself (scripts/developer/*.test.mjs).

You can also run a workspace's own scripts directly without the root wrapper:

npm --prefix sable-agents-demo/web test
npm --prefix sable-agents-demo test
npm --prefix sable-agents-demo/supabase test
npm --prefix sable-agents-demo/docs-site run build

Environment-manager commands

Run from inside sable-agents-demo/ — see Env Manager for the full picture of what they check:

CommandPurpose
npm run env:validateValidate every env-manifests/*.json file against the manifest schema.
npm run env:driftCompare manifests against what each platform actually has configured.
npm run env:drift:strictThe same check, failing the run on any drift.
npm run env:drift:portfolioDrift check scoped to the portfolio/lead-to-cash apps.
npm run env:bundleBundle manifests for distribution/reference.
npm run env:checkenv:validate followed by env:drift:strict — this is what CI's env-manifests job runs.

Trigger.dev commands

Also from sable-agents-demo/:

CommandPurpose
npm run trigger:devtrigger dev start — runs the Trigger.dev dev server against your tasks.
npm run trigger:deploytrigger deploy — deploys tasks (production deploys still go through CI/CD, not a workstation).
npm run trigger:skillstrigger skills --target codex -y — generates Trigger.dev's Codex-targeted skill files.
npm run parity:checkRuns scripts/parity/check-parity.mjs, the Cowork-vs-enterprise behavioral parity comparator (needs ANTHROPIC_API_KEY).

Claude Code sessions

Open sable-agents-demo/ as the project root for an AI-assisted session — that is where .mcp.json, .claude/settings.json, and CLAUDE.md live together. .mcp.json configures a Supabase MCP server against project fvngkfrmienkltuwtoxa (hosted, OAuth once) and a GitNexus server; approve both with /mcp the first time. Opening the repository root or sable-agents-demo/web/ alone loses this configuration — the root has no .mcp.json at all, and web/ alone loses the parent directory's safety hook.

CI, for comparison

.github/workflows/sable-ci.yml runs on every PR and every push to main, with jobs that mirror the local commands above: env-manifests (npm run env:check), web-tests (npm test in sable-agents-demo/web), and trigger-foundation (npm test in sable-agents-demo), plus the Supabase helper tests and the docs build. npm run check at the repository root is the closest local approximation of the whole set; running it before opening a PR catches most CI failures before they cost a round trip.

Where the code lives

  • package.json (repository root) — engines, and the developer-tooling script entries.
  • scripts/developer/bootstrap.mjs, doctor.mjs, doctor-claude.mjs, dev-sable.mjs, check.mjs.
  • sable-agents-demo/package.json — Trigger commands and env:* scripts.
  • sable-agents-demo/web/package.json, sable-agents-demo/supabase/package.json, sable-agents-demo/docs-site/package.json.
  • sable-agents-demo/.mcp.json, sable-agents-demo/.claude/settings.json, sable-agents-demo/.claude/hooks/guard.py.
  • .github/workflows/sable-ci.yml.