
Insforge Cli
Operate InsForge BaaS from the terminal—schema, RLS, functions, storage, deploys, branches, and Stripe—without global CLI installs.
Overview
InsForge CLI is an agent skill for the Build phase that guides npx-based InsForge infrastructure operations including migrations, RLS, deploys, and backend branches.
Install
npx skills add https://github.com/insforge/agent-skills --skill insforge-cliWhat is this skill?
- Mandatory npx @insforge/cli workflow—no global npm install
- Session start: whoami and current project link checks before destructive commands
- Covers SQL, migrations, RLS, functions, storage, compute, secrets, AI keys, and Stripe catalog/webhooks
- Declarative auth redirect URLs via insforge.toml and config apply
- Backend branch create/merge flows for testing schema and RLS before prod
- Skill metadata version 1.5.0 (May 2026)
- Explicit rule: never npm install -g @insforge/cli—always npx @insforge/cli
Adoption & trust: 12.7k installs on skills.sh; 27 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need to change InsForge schema, auth, or payments safely but lack a repeatable CLI ritual agents can follow without broken global installs or wrong project context.
Who is it for?
Indie builders on InsForge who want agents to run migrations, RLS, Stripe setup, and branch merges with npx-only discipline.
Skip if: In-app SDK integration work—use the insforge skill instead—or teams that never use InsForge BaaS.
When should I use this skill?
Managing InsForge infrastructure with the CLI: projects, SQL, migrations, RLS, functions, storage, deployments, secrets, Stripe, schedules, logs, config apply, or backend branches.
What do I get? / Deliverables
After the skill runs, agents use npx @insforge/cli with verified auth and project link, apply infra changes, and use branches or config apply for redirects before touching prod.
- Executed CLI command sequences for migrations, RLS, or deploys
- Branch-backed schema experiments and merge resolutions
- Applied insforge.toml auth redirect configuration
Recommended Skills
Journey fit
InsForge CLI is catalogued under Build integrations because it wires backend infrastructure, auth config, and deployments while you are assembling the product stack. The skill is CLI-driven platform integration (SQL, migrations, secrets, frontend deploys, branch merge workflows), not app SDK coding—that is the separate insforge skill.
How it compares
Platform CLI procedural skill for InsForge ops, not a generic PostgreSQL tutorial or the SDK-focused insforge application skill.
Common Questions / FAQ
Who is insforge-cli for?
Solo developers managing InsForge projects who want terminal-driven SQL, migrations, RLS, deployments, secrets, Stripe, and branch workflows under agent guidance.
When should I use insforge-cli?
Use it during Build when linking a project, applying migrations, configuring auth redirects in insforge.toml, deploying frontends, or testing risky schema on a backend branch.
Is insforge-cli safe to install?
Treat CLI skills as high-trust: review Security Audits on this page and restrict agent access to production credentials before running login, merge, or config apply commands.
Workflow Chain
Then invoke: insforge
SKILL.md
READMESKILL.md - Insforge Cli
# InsForge CLI Command-line tool for managing InsForge Backend-as-a-Service projects. ## Critical: Always Use npx (No Global Install) **NEVER** install the CLI globally (`npm install -g @insforge/cli`). **Always** run commands via `npx`: ```bash npx @insforge/cli <command> ``` This ensures the latest version is always used without global install issues (permissions, PATH, node version mismatches). **Session start** — verify authentication and project: ```bash npx @insforge/cli whoami # verify authentication npx @insforge/cli current # verify linked project ``` If not authenticated: `npx @insforge/cli login` If no project linked: `npx @insforge/cli create` (new — for non-interactive agent use, pass `--json` with `--name`, `--template`, `--org-id`, `--region` to skip all prompts; `-y` alone is NOT enough) or `npx @insforge/cli link` (existing) > **Important:** In InsForge, API keys are full-access admin keys, equivalent to service role keys on other platforms. Treat them as server-only secrets and never expose them in frontend code or public env vars. ## Global Options | Flag | Description | |------|-------------| | `--json` | Structured JSON output AND skip value-collection prompts (text / select). Errors out if any required param is missing. **Combine with `-y` for destructive commands** so Y/N confirmations are skipped too. | | `-y, --yes` | Auto-accept Y/N confirmation prompts (delete? overwrite? etc.). Does NOT skip value-collection prompts — use `--json` for that. | > All examples below use `npx @insforge/cli`. **Never** call `insforge` directly. ## Exit Codes | Code | Meaning | |------|---------| | 0 | Success | | 1 | General error (e.g., HTTP 400+ from function invoke) | | 2 | Not authenticated | | 3 | Project not linked | | 4 | Resource not found | | 5 | Permission denied | ## Environment Variables | Variable | Description | |----------|-------------| | `INSFORGE_ACCESS_TOKEN` | Override stored access token | | `INSFORGE_PROJECT_ID` | Override linked project ID | | `INSFORGE_EMAIL` | Email for non-interactive login | | `INSFORGE_PASSWORD` | Password for non-interactive login | --- ## Commands ### Authentication - `npx @insforge/cli login` — OAuth (browser) or `--email` for password login. See [references/login.md](references/login.md) - `npx @insforge/cli logout` — clear stored credentials - `npx @insforge/cli whoami` — show current user ### Project Management - `npx @insforge/cli create` — create new project. See [references/create.md](references/create.md) - `npx @insforge/cli link` — link directory to existing project - `npx @insforge/cli current` — show current user + linked project - `npx @insforge/cli list` — list all orgs and projects - `npx @insforge/cli metadata` — show backend metadata (auth config, database tables, storage buckets, edge functions, AI models, realtime channels). Use `--json` for structured output. **Run this first** to discover what's configured before building features. ### Database — `npx @insforge/cli db` - `npx @insforge/cli db query <sql>` — execute raw SQL. See [references/db-query.md](references/db-query.md) - `npx @insforge/cli db tables / indexes / policies / triggers / functions` — inspect schema