[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75EN9VTQ6QPSAGJMQ5N600F":3,"skill-same:01M75EN9VTQ6QPSAGJMQ5N600F":113},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M75EN9VTQ6QPSAGJMQ5N600F","insforge-cli",null,"Use this skill when managing InsForge infrastructure with the CLI: projects, SQL, migrations, RLS policies, functions, storage buckets, frontend deployments, compute services, secrets\u002Fenv vars, Stripe payment keys\u002Fcatalog\u002Fproducts\u002Fprices\u002Fwebhooks, schedules, logs, diagnostics, import\u002Fexport, **declarative auth redirect URLs via `insforge.toml`** (applied with `config apply`), or **managing backend branches** (creating a branch project to test risky schema\u002Fauth\u002FRLS changes, merging a branch back to prod, resolving merge conflicts). For app code with @insforge\u002Fsdk, use the insforge skill instead.","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: insforge-cli\ndescription: >-\n  Use this skill when managing InsForge infrastructure with the CLI: projects, SQL, migrations, RLS policies, functions, storage buckets, frontend deployments, compute services, secrets\u002Fenv vars, Stripe payment keys\u002Fcatalog\u002Fproducts\u002Fprices\u002Fwebhooks, schedules, logs, diagnostics, import\u002Fexport, **declarative auth redirect URLs via `insforge.toml`** (applied with `config apply`), or **managing backend branches** (creating a branch project to test risky schema\u002Fauth\u002FRLS changes, merging a branch back to prod, resolving merge conflicts). For app code with @insforge\u002Fsdk, use the insforge skill instead.\nlicense: MIT\nmetadata:\n  author: insforge\n  version: \"1.5.0\"\n  organization: InsForge\n  date: May 2026\n---\n\n# InsForge CLI\n\nCommand-line tool for managing InsForge Backend-as-a-Service projects.\n\n## Critical: Always Use npx (No Global Install)\n\n**NEVER** install the CLI globally (`npm install -g @insforge\u002Fcli`). **Always** run commands via `npx`:\n\n```bash\nnpx @insforge\u002Fcli \u003Ccommand>\n```\n\nThis ensures the latest version is always used without global install issues (permissions, PATH, node version mismatches).\n\n**Session start** — verify authentication and project:\n\n```bash\nnpx @insforge\u002Fcli whoami    # verify authentication\nnpx @insforge\u002Fcli current   # verify linked project\n```\n\nIf not authenticated: `npx @insforge\u002Fcli login`\nIf no project linked: `npx @insforge\u002Fcli create` (new) or `npx @insforge\u002Fcli link` (existing)\n\n> **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.\n\n## Global Options\n\n| Flag | Description |\n|------|-------------|\n| `--json` | Structured JSON output (for scripts and agents) |\n| `-y, --yes` | Skip confirmation prompts |\n\n> All examples below use `npx @insforge\u002Fcli`. **Never** call `insforge` directly.\n\n## Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| 0 | Success |\n| 1 | General error (e.g., HTTP 400+ from function invoke) |\n| 2 | Not authenticated |\n| 3 | Project not linked |\n| 4 | Resource not found |\n| 5 | Permission denied |\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `INSFORGE_ACCESS_TOKEN` | Override stored access token |\n| `INSFORGE_PROJECT_ID` | Override linked project ID |\n| `INSFORGE_EMAIL` | Email for non-interactive login |\n| `INSFORGE_PASSWORD` | Password for non-interactive login |\n\n---\n\n## Commands\n\n### Authentication\n- `npx @insforge\u002Fcli login` — OAuth (browser) or `--email` for password login. See [references\u002Flogin.md](references\u002Flogin.md)\n- `npx @insforge\u002Fcli logout` — clear stored credentials\n- `npx @insforge\u002Fcli whoami` — show current user\n\n### Project Management\n- `npx @insforge\u002Fcli create` — create new project. See [references\u002Fcreate.md](references\u002Fcreate.md)\n- `npx @insforge\u002Fcli link` — link directory to existing project\n- `npx @insforge\u002Fcli current` — show current user + linked project\n- `npx @insforge\u002Fcli list` — list all orgs and projects\n- `npx @insforge\u002Fcli 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.\n\n### Database — `npx @insforge\u002Fcli db`\n- `npx @insforge\u002Fcli db query \u003Csql>` — execute raw SQL. See [references\u002Fdb-query.md](references\u002Fdb-query.md)\n- `npx @insforge\u002Fcli db tables \u002F indexes \u002F policies \u002F triggers \u002F functions` — inspect schema\n- `npx @insforge\u002Fcli db migrations list \u002F fetch \u002F new \u002F up` — manage developer migration files. See [references\u002Fdb-migrations.md](references\u002Fdb-migrations.md)\n- `npx @insforge\u002Fcli db rpc \u003Cfn> [--data \u003Cjson>]` — call database function (GET if no data, POST if data)\n- `npx @insforge\u002Fcli db export` — export schema\u002Fdata. See [references\u002Fdb-export.md](references\u002Fdb-export.md)\n- `npx @insforge\u002Fcli db import \u003Cfile>` — import from SQL file. See [references\u002Fdb-import.md](references\u002Fdb-import.md)\n\n> Use `db migrations` for schema changes. Reserve `db query` for inspecting data and for row-level `SELECT \u002F INSERT \u002F UPDATE \u002F DELETE` work.\n\n### Edge Functions — `npx @insforge\u002Fcli functions`\n- `npx @insforge\u002Fcli functions list` — list deployed functions\n- `npx @insforge\u002Fcli functions code \u003Cslug>` — view function source\n- `npx @insforge\u002Fcli functions deploy \u003Cslug>` — deploy or update. See [references\u002Ffunctions-deploy.md](references\u002Ffunctions-deploy.md)\n- `npx @insforge\u002Fcli functions invoke \u003Cslug> [--data \u003Cjson>] [--method GET|POST]` — invoke function\n- `npx @insforge\u002Fcli functions delete \u003Cslug>` — delete an edge function (with confirmation)\n\n### Storage — `npx @insforge\u002Fcli storage`\n- `npx @insforge\u002Fcli storage buckets` — list buckets\n- `npx @insforge\u002Fcli storage create-bucket \u003Cname> [--private]` — create bucket (default: public)\n- `npx @insforge\u002Fcli storage delete-bucket \u003Cname>` — delete bucket and **all its objects** (destructive)\n- `npx @insforge\u002Fcli storage list-objects \u003Cbucket> [--prefix] [--search] [--limit] [--sort]` — list objects\n- `npx @insforge\u002Fcli storage upload \u003Cfile> --bucket \u003Cname> [--key \u003CobjectKey>]` — upload file\n- `npx @insforge\u002Fcli storage download \u003CobjectKey> --bucket \u003Cname> [--output \u003Cpath>]` — download file\n\n### Payments — `npx @insforge\u002Fcli payments`\n- `npx @insforge\u002Fcli payments status` — show Stripe key, account, sync, and webhook status\n- `npx @insforge\u002Fcli payments config \u002F config set \u002F config remove` — manage Stripe test\u002Flive secret keys. See [references\u002Fpayments.md](references\u002Fpayments.md)\n- `npx @insforge\u002Fcli payments sync [--environment test|live|all]` — sync products, prices, customers, and subscriptions from Stripe\n- `npx @insforge\u002Fcli payments webhooks configure \u003Cenvironment>` — create or recreate the managed Stripe webhook endpoint\n- `npx @insforge\u002Fcli payments catalog --environment \u003Cenv>` — inspect mirrored products and prices together\n- `npx @insforge\u002Fcli payments customers --environment \u003Cenv>` — admin\u002Fdebug customer reads\n- `npx @insforge\u002Fcli payments products list\u002Fget\u002Fcreate\u002Fupdate\u002Fdelete` — manage Stripe products\n- `npx @insforge\u002Fcli payments prices list\u002Fget\u002Fcreate\u002Fupdate\u002Farchive` — manage Stripe prices\n- `npx @insforge\u002Fcli payments subscriptions --environment \u003Cenv>` — admin\u002Fdebug subscription reads\n- `npx @insforge\u002Fcli payments history --environment \u003Cenv>` — admin\u002Fdebug payment history reads\n\n> ⚠️ **Private preview.** Payments are a new feature; older backends may not expose `\u002Fapi\u002Fpayments`.\n> **Availability:** If the CLI says `Payments are not available on this backend`, stop and ask the developer\u002Fadmin to enable payments or upgrade the self-hosted InsForge instance. Do not work around this by storing Stripe secret keys with generic secrets or embedding Stripe secret keys in app code.\n> Agents should default to `--environment test` while building. Only use `live` after the developer explicitly approves production Stripe changes.\n\n### Frontend Deployments (Vercel) — `npx @insforge\u002Fcli deployments`\n\nDeploy a frontend application (static site \u002F SPA \u002F Next.js \u002F etc.) to Vercel,\nmanaged through InsForge. For backend container workloads see **Backend Compute\nServices** below.\n\n- `npx @insforge\u002Fcli deployments deploy [dir]` — deploy frontend app from its source directory. See [references\u002Fdeployments-deploy.md](references\u002Fdeployments-deploy.md)\n- `npx @insforge\u002Fcli deployments list` — list deployments\n- `npx @insforge\u002Fcli deployments status \u003Cid> [--sync]` — get deployment status (--sync fetches from Vercel)\n- `npx @insforge\u002Fcli deployments cancel \u003Cid>` — cancel running deployment\n- `npx @insforge\u002Fcli deployments env list` — list all deployment environment variables\n- `npx @insforge\u002Fcli deployments env set \u003Ckey> \u003Cvalue>` — create or update a deployment environment variable\n- `npx @insforge\u002Fcli deployments env delete \u003Cid>` — delete a deployment environment variable by ID\n\n### Backend Compute Services (Fly.io) — `npx @insforge\u002Fcli compute`\n\nDeploy and manage backend containerized services (APIs, workers, microservices).\nEach service runs as a Docker container reachable via a public HTTPS endpoint.\nFor frontend hosting see **Frontend Deployments** above.\n\n> 🔧 **Implementation note (for agents):** InsForge runs compute on **Fly.io**\n> under the hood, but **DO NOT use `flyctl` directly** to deploy or manage\n> these services. The Fly account, org, IP allocation, and machine ownership\n> all live on the InsForge cloud — `flyctl` invoked with the user's own credentials\n> will land in the wrong org and fail with `unauthorized`. Always use\n> `npx @insforge\u002Fcli compute …`. The CLI is just an HTTP client that calls the\n> InsForge backend; the backend talks to Fly. No `flyctl` and no Fly token\n> are needed locally.\n\n> ⚠️ **In progress.** Compute services are still in development; the API and CLI may change.\n>\n> **Availability:** Compute requires the backend to have Fly.io configured. If not enabled, the API returns `COMPUTE_SERVICE_NOT_CONFIGURED` with setup instructions in `nextActions`. Follow those instructions.\n\n- `npx @insforge\u002Fcli compute list` — list all compute services (name, status, image, CPU, memory, endpoint)\n- `npx @insforge\u002Fcli compute get \u003Cid>` — get service details\n- `npx @insforge\u002Fcli compute deploy [dir] --name \u003Cname> [--port] [--cpu] [--memory] [--region] [--env \u003Cjson> | --env-file \u003Cpath>]` — **source mode**: requires `flyctl` on PATH; **no local Docker daemon needed**. CLI shells out to `flyctl deploy --remote-only --build-only` using a short-lived per-app deploy token minted by InsForge cloud (the user never sees a Fly token). Build runs on Fly's remote builder; image is pushed to `registry.fly.io`; cloud launches the machine.\n- `npx @insforge\u002Fcli compute deploy --image \u003Curl> --name \u003Cname> [--port] [--cpu] [--memory] [--region] [--env \u003Cjson> | --env-file \u003Cpath>]` — **image mode**: deploys a pre-built image from any registry. **Nothing needed locally** beyond the InsForge CLI. Best for CI\u002FCD pipelines and off-the-shelf images like `nginx:alpine`. Prefer `--env-file \u003Cpath>` over inline `--env \u003Cjson>` for >1 secret.\n- See [references\u002Fcompute-deploy.md](references\u002Fcompute-deploy.md) for both modes.\n- `npx @insforge\u002Fcli compute update \u003Cid> [--image] [--port] [--cpu] [--memory] [--region] [--env \u003Cjson> | --env-set KEY=VALUE | --env-unset KEY]` — update service config. `--env-set`\u002F`--env-unset` are **repeatable** and merge with existing env — use these to rotate one secret without restating the rest. `--env \u003Cjson>` replaces wholesale and is mutually exclusive with the merge flags.\n- `npx @insforge\u002Fcli compute stop \u003Cid>` — stop a running service\n- `npx @insforge\u002Fcli compute start \u003Cid>` — start a stopped service\n- `npx @insforge\u002Fcli compute events \u003Cid> [--limit 50]` — Fly machine **lifecycle events** (start\u002Fstop\u002Fexit\u002Frestart). Container stdout\u002Fstderr is NOT surfaced in v1 — that's roadmap work and will reuse the freed-up `compute logs` command name when it lands. To debug a crash-looping container today, reproduce locally with the same image.\n- `npx @insforge\u002Fcli compute delete \u003Cid>` — destroy the service and its Fly.io resources. **Permanent.** Audit log captures the full config (incl. encrypted env blob) on delete for reconstruction. Dashboard adds a type-to-confirm gate; the CLI does not — guard scripted deletes carefully.\n\n### Secrets — `npx @insforge\u002Fcli secrets`\n- `npx @insforge\u002Fcli secrets list [--all]` — list secrets (values hidden; `--all` includes deleted)\n- `npx @insforge\u002Fcli secrets get \u003Ckey>` — get decrypted value\n- `npx @insforge\u002Fcli secrets add \u003Ckey> \u003Cvalue> [--reserved] [--expires \u003CISO date>]` — create secret\n- `npx @insforge\u002Fcli secrets update \u003Ckey> [--value] [--active] [--reserved] [--expires]` — update secret\n- `npx @insforge\u002Fcli secrets delete \u003Ckey>` — **soft delete** (marks inactive; restore with `--active true`)\n\n### Configuration — `npx @insforge\u002Fcli config`\n\nManage `auth.allowed_redirect_urls` declaratively via `insforge.toml` (project root). For changing redirect URLs, prefer this over `PUT \u002Fapi\u002Fauth\u002Fconfig` — the CLI gates on backend version and surfaces a clean skip if the backend predates the field, where the raw PUT may 200-and-silently-drop.\n\n- `npx @insforge\u002Fcli config export [--out insforge.toml] [--force]` — pull live config into TOML. Sections the backend doesn't expose are omitted.\n- `npx @insforge\u002Fcli config plan [--file insforge.toml]` — diff TOML vs. live state; shows which changes will apply vs. be skipped on the connected backend.\n- `npx @insforge\u002Fcli config apply [--file insforge.toml] [--dry-run] [--auto-approve]` — apply the TOML. Per-change capability gate: supported changes apply; unsupported go to `skipped[]` with an upgrade message and **no PUT is issued for them**. `--json` returns `{ plan, applied[], skipped[] }`.\n\n> **If `apply` returns `skipped: [...]`, surface verbatim.** The user's backend predates this section. Tell them which sections were skipped and to upgrade; do not retry, do not bypass with `curl` (silent drop). Sample message: _\"I tried to set `auth.allowed_redirect_urls` but your backend is on an older version that doesn't support it yet. Upgrade your backend and re-run `npx @insforge\u002Fcli config apply`.\"_\n\n> **TOML is for knobs only — never embed programs.** SQL → `db migrations`. Function code → `functions deploy`. Compute → `compute deploy`. Frontend → `deployments deploy`. TOML carries booleans, strings, and arrays — anything bigger lives in its own file managed by a dedicated CLI command.\n\n**Scope today:** only `auth.allowed_redirect_urls`. Password policy, SMTP, OAuth providers, custom subdomain, and similar will land in TOML later. For other `auth.config` fields today, use the dashboard.\n\nSee [references\u002Fconfig.md](references\u002Fconfig.md) for output shapes and a common-mistakes table.\n\n### Schedules — `npx @insforge\u002Fcli schedules`\n- `npx @insforge\u002Fcli schedules list` — list all scheduled tasks (shows ID, name, cron, URL, method, active, next run)\n- `npx @insforge\u002Fcli schedules get \u003Cid>` — get schedule details\n- `npx @insforge\u002Fcli schedules create --name --cron --url --method [--headers \u003Cjson>] [--body \u003Cjson>]` — create a cron job. `--cron` accepts either 5-field cron (`*\u002F5 * * * *`) or pg_cron interval syntax for sub-minute cadence (`30 seconds`)\n- `npx @insforge\u002Fcli schedules update \u003Cid> [--name] [--cron] [--url] [--method] [--headers] [--body] [--active]` — update schedule\n- `npx @insforge\u002Fcli schedules delete \u003Cid>` — delete schedule (with confirmation)\n- `npx @insforge\u002Fcli schedules logs \u003Cid> [--limit] [--offset]` — view execution logs\n\n### Branching — `npx @insforge\u002Fcli branch`\n\nTest risky schema, RLS, auth, or function changes in an isolated branch project before applying them to prod. A branch shares the parent's `JWT_SECRET` (so the same users authenticate) but gets a fresh EC2 + database + `API_KEY` \u002F `ANON_KEY`. See [`references\u002Fbranch.md`](references\u002Fbranch.md) for the decision guide and lifecycle command details.\n\n> ⚠️ **Backend version requirement.** Branching is still in development and only available on InsForge backend **2.1.0 or later**. On older backends, `npx @insforge\u002Fcli branch` commands will fail. If you hit an error, contact the InsForge team.\n\n| Command | Description |\n|---------|-------------|\n| `npx @insforge\u002Fcli branch create \u003Cname> [--mode full\\|schema-only] [--no-switch]` | Create a branch from the linked project. Auto-switches the directory's context to the new branch by default. |\n| `npx @insforge\u002Fcli branch list` | List active branches of the parent project (or the parent of the currently-switched-to branch). |\n| `npx @insforge\u002Fcli branch switch \u003Cname>` \u002F `--parent` | Repoint `.insforge\u002Fproject.json` at the branch (or back at parent). |\n| `npx @insforge\u002Fcli branch merge \u003Cname> [--dry-run] [--save-sql \u003Cpath>] [-y]` | Compute (and optionally apply) the 3-way merge to parent. Conflict path exits with code 2. See [branch-merge](references\u002Fbranch-merge.md). |\n| `npx @insforge\u002Fcli branch reset \u003Cname> [-y]` | Wipe all changes on the branch and restore its database to T0 (parent's snapshot at branch creation). Same EC2 \u002F `appkey` \u002F `API_KEY` — only DB content rewinds. Works from `ready` **or** `merged`. See [branch-reset](references\u002Fbranch-reset.md). |\n| `npx @insforge\u002Fcli branch delete \u003Cname> [-y]` | Delete a branch and reclaim its EC2. Auto-switches back to parent if currently on the deleted branch. |\n\n**Typical flow:**\n\n```bash\nnpx @insforge\u002Fcli branch create feat-rls --mode schema-only\n# context now points at the branch — re-source .env if your dev server caches it\n# branch runtime starts empty — redeploy any functions\u002Fwebsite\u002Fcompute you'll exercise\n# ... apply your schema \u002F RLS \u002F auth changes via db migrations \u002F SQL ...\nnpx @insforge\u002Fcli branch merge feat-rls --dry-run --save-sql \u002Ftmp\u002Fdiff.sql\n# review \u002Ftmp\u002Fdiff.sql; on conflict CLI exits 2\nnpx @insforge\u002Fcli branch merge feat-rls\n# parent now has the changes — redeploy functions \u002F website \u002F compute as needed\nnpx @insforge\u002Fcli branch delete feat-rls\n```\n\n> **Got into a bad state on the branch?** `npx @insforge\u002Fcli branch reset \u003Cname>` rewinds the branch's database back to T0 (the parent snapshot at branch creation) without touching the EC2 or API keys — cheaper than delete + recreate and the SDK's `INSFORGE_URL` \u002F `ANON_KEY` stay valid. Works from both `ready` and `merged` (a merged branch reset re-opens the same slot for another round of changes).\n\n### Diagnostics — `npx @insforge\u002Fcli diagnose`\n\nRun with no subcommand for a full health report across all checks.\n\n- `npx @insforge\u002Fcli diagnose` — full health report (runs all diagnostics)\n- `npx @insforge\u002Fcli diagnose --ai \"\u003Cissue description>\"` — hand a natural-language problem description (error, failing URL, HTTP status) to the InsForge debug agent; returns a diagnosis plus suggested solutions\n- `npx @insforge\u002Fcli diagnose metrics [--range 1h|6h|24h|7d] [--metrics \u003Clist>]` — EC2 instance metrics (CPU, memory, disk, network). Default range: `1h`\n- `npx @insforge\u002Fcli diagnose advisor [--severity critical|warning|info] [--category security|performance|health] [--limit \u003Cn>]` — latest advisor scan results and issues. Default limit: 50\n- `npx @insforge\u002Fcli diagnose db [--check \u003Cchecks>]` — database health checks. Checks: `connections`, `slow-queries`, `bloat`, `size`, `index-usage`, `locks`, `cache-hit` (default: `all`)\n- `npx @insforge\u002Fcli diagnose logs [--source \u003Cname>] [--limit \u003Cn>]` — aggregate error-level logs from all backend sources. Default limit: 100\n\n### Analytics Integration — `npx @insforge\u002Fcli posthog`\n- `npx @insforge\u002Fcli posthog setup` — one-shot connect-and-install: auto-provisions a PostHog account if needed, runs OAuth, detects the project framework (Next.js App\u002FPages Router, Vite + React, SvelteKit, Astro), installs `posthog-js`, renders the per-framework SDK init template, and writes env vars. See [references\u002Fposthog.md](references\u002Fposthog.md).\n\n> ⚠️ **Private beta.** PostHog integration is currently rolling out to early-access partners; older cloud projects and self-hosted backends may not expose `\u002Fintegrations\u002Fposthog\u002Fv1\u002F*`.\n> **Availability:** If the CLI fails with `PostHog connect flow unavailable (HTTP 404)`, the project doesn't have PostHog enabled yet — wait for the rollout or ask the InsForge team for early access. Do not work around this by pulling a `phc_` key from a separate PostHog account; the InsForge dashboard won't surface analytics without the OAuth-backed server-side connection.\n> Templated install supports Next.js (App \u002F Pages Router), Vite + React, SvelteKit, and Astro; other frameworks fall through to a manual instructions path.\n\n### Logs — `npx @insforge\u002Fcli logs`\n- `npx @insforge\u002Fcli logs \u003Csource> [--limit \u003Cn>]` — fetch backend container logs (default: 20 entries)\n\n| Source | Description |\n|--------|-------------|\n| `insforge.logs` | Main backend logs |\n| `postgREST.logs` | PostgREST API layer logs |\n| `postgres.logs` | PostgreSQL database logs |\n| `function.logs` | Edge function execution logs |\n| `function-deploy.logs` | Edge function deployment logs |\n\n> Source names are case-insensitive: `postgrest.logs` works the same as `postgREST.logs`.\n\n### Documentation — `npx @insforge\u002Fcli docs`\n- `npx @insforge\u002Fcli docs` — list all topics\n- `npx @insforge\u002Fcli docs instructions` — setup guide\n- `npx @insforge\u002Fcli docs \u003Cfeature> \u003Clanguage>` — feature docs (`db \u002F storage \u002F functions \u002F auth \u002F ai \u002F realtime` × `typescript \u002F swift \u002F kotlin \u002F rest-api`)\n\n> For writing application code with the InsForge SDK, use the insforge (SDK) skill instead, and use the `npx @insforge\u002Fcli docs \u003Cfeature> \u003Clanguage>` to get specific SDK documentation.\n\n---\n\n## Non-Obvious Behaviors\n\n**Functions invoke URL**: invoked at `{oss_host}\u002Ffunctions\u002F{slug}` — NOT `\u002Fapi\u002Ffunctions\u002F{slug}`. Exits with code 1 on HTTP 400+.\n\n**Secrets delete is soft**: marks the secret inactive, not destroyed. Restore with `npx @insforge\u002Fcli secrets update KEY --active true`. Use `--all` with `secrets list` to see inactive ones.\n\n**Storage delete-bucket is hard**: deletes the bucket and every object inside it permanently.\n\n**db rpc uses GET or POST**: no `--data` → GET; with `--data` → POST.\n\n**db migrations use timestamped files**: migration filenames use `YYYYMMDDHHmmss_name.sql`, for example `20260418091500_create-posts.sql`.\n\n**db migrations up supports safe batch modes**: `npx @insforge\u002Fcli db migrations up \u003Cfilename|version>` applies one explicit local target. `npx @insforge\u002Fcli db migrations up --to \u003Cversion|filename>` and `npx @insforge\u002Fcli db migrations up --all` apply pending files in ascending version order and stop on the first failure.\n\n**db migrations run inside a backend-managed transaction**: do not put `BEGIN`, `COMMIT`, or `ROLLBACK` in migration files.\n\n**The live database schema is the source of truth**: before writing a migration, and again if a migration fails, inspect the current database state first (`db tables \u002F indexes \u002F policies \u002F triggers \u002F functions`, plus `db migrations list`) and then adjust the migration statements to match reality. Do not assume local files are still current.\n\n**Compute deploy has two modes.** `compute deploy [dir]` shells out to `flyctl deploy --remote-only --build-only` against your source dir using a short-lived per-app token the cloud mints for that one deploy — **requires `flyctl` on PATH** but **no local Docker daemon** (the build runs remotely on Fly's builder). The token is attenuated to one app + builder\u002Fwg with `else: deny` so it cannot reach any other app or org-level endpoint, and it auto-expires after ~20 min. `compute deploy --image \u003Curl>` deploys a pre-built image from any registry — **nothing needed locally**, best for CI or off-the-shelf images like `nginx:alpine`. Don't use `flyctl` outside this CLI flow with your own credentials — the Fly account is InsForge's, you'd 401.\n\n**Compute endpoints use .fly.dev**: Services get a public URL at `https:\u002F\u002F{name}-{projectId}.fly.dev`. Custom domains require DNS configuration.\n\n**Schedules accept two cron formats**: 5-field cron (`minute hour day month day-of-week`, e.g. `*\u002F5 * * * *`) **or** pg_cron interval syntax for sub-minute cadence (e.g. `30 seconds`). 6-field cron with seconds (Quartz\u002FSpring's `*\u002F2 * * * * *`) is **not** supported — use the interval form for sub-minute work. Headers can reference secrets with `${{secrets.KEY_NAME}}`.\n\n**Payments use Stripe as source of truth**: use `payments config set` for Stripe keys, `payments sync` before relying on existing catalog data, and create a new Stripe price instead of editing amount\u002Fcurrency. Runtime checkout and customer portal integration belongs in the `insforge` SDK skill.\n\n**`config apply` is version-aware**: per-project backends drift in version. The CLI probes `\u002Fapi\u002Fmetadata` and gates `auth.allowed_redirect_urls` on whether the backend exposes it; if not, the change lands in `skipped[]` with an upgrade message and **no PUT is issued**. Never bypass with `curl` to \"force\" a skipped field — older backends may 200-and-silently-drop. Surface skips to the user and ask them to upgrade.\n\n---\n\n## Common Workflows\n\n### Configure auth redirect URLs (insforge.toml)\n\n```bash\n# 1. Pull current config to insforge.toml (writes in project root)\nnpx @insforge\u002Fcli --json config export\n\n# 2. Edit insforge.toml — add\u002Fremove entries under [auth] allowed_redirect_urls\n\n# 3. Preview the diff\nnpx @insforge\u002Fcli --json config plan\n\n# 4. Apply (use --yes for non-interactive — required in --json mode)\nnpx @insforge\u002Fcli --json --yes config apply\n```\n\nIf `apply` returns a non-empty `skipped[]`, the user's backend predates this section — surface the entries verbatim with the upgrade ask. Don't retry, don't fall back to `curl` (older backends may 200-and-silently-drop). See [references\u002Fconfig.md](references\u002Fconfig.md).\n\n### Set up database schema with migrations\n\n```bash\n# Inspect the current live schema first\nnpx @insforge\u002Fcli db tables\nnpx @insforge\u002Fcli db indexes\nnpx @insforge\u002Fcli db policies\nnpx @insforge\u002Fcli db migrations list\n\n# Sync applied remote migration history locally\nnpx @insforge\u002Fcli db migrations fetch\n\n# Create the next schema migration file\nnpx @insforge\u002Fcli db migrations new create-posts\n\n# Edit migrations\u002F20260418091500_create-posts.sql with CREATE TABLE \u002F ALTER TABLE \u002F policies\n\n# Apply pending migrations safely\nnpx @insforge\u002Fcli db migrations up --all\n```\n\n> Use migrations for schema changes. Use `db query` for row changes and inspection. In migrations, FK to users with `auth.users(id)` and use `auth.uid()` in RLS policies.\n\n### Manage database migrations\n\n```bash\n# Inspect remote migration history\nnpx @insforge\u002Fcli db migrations list\n\n# Sync applied remote migrations into migrations\u002F\nnpx @insforge\u002Fcli db migrations fetch\n\n# Create the next local migration file\nnpx @insforge\u002Fcli db migrations new create-posts\n\n# Apply all pending local migrations\nnpx @insforge\u002Fcli db migrations up --all\n```\n\n### Deploy an edge function\n\n```bash\n# Default source path: insforge\u002Ffunctions\u002F{slug}\u002Findex.ts\nnpx @insforge\u002Fcli functions deploy my-handler\nnpx @insforge\u002Fcli functions invoke my-handler --data '{\"action\": \"test\"}'\n```\n\n### Deploy frontend\n\n**Always verify the local build succeeds before deploying.** Local builds are faster to debug and don't waste server resources. After the build passes, deploy the project source directory (usually `.`), not `dist\u002F` or other generated build output.\n\n**Environment variables are required.** Frontend apps need env vars (API URL, anon key) to connect to InsForge at runtime. Deploying without them produces a broken app. Before deploying, you must ensure env vars are set using one of these two approaches:\n\n**Option A — Persistent env vars (recommended):** Set once, applied to every future deployment automatically. Best for projects that will be redeployed.\n\n```bash\n# Check what's already set\nnpx @insforge\u002Fcli deployments env list\n\n# Set the vars your app needs (use the correct framework prefix)\nnpx @insforge\u002Fcli deployments env set VITE_INSFORGE_URL https:\u002F\u002Fmy-app.us-east.insforge.app\nnpx @insforge\u002Fcli deployments env set VITE_INSFORGE_ANON_KEY ik_xxx\n\n# Deploy the project source — persistent env vars are applied automatically\nnpx @insforge\u002Fcli deployments deploy .\n```\n\n**Option B — Inline `--env` flag:** Pass env vars as JSON directly on the deploy command. Useful for one-off deploys or overriding persistent vars.\n\n```bash\nnpx @insforge\u002Fcli deployments deploy . --env '{\"VITE_INSFORGE_URL\": \"https:\u002F\u002Fmy-app.us-east.insforge.app\", \"VITE_INSFORGE_ANON_KEY\": \"ik_xxx\"}'\n```\n\n**Full workflow:**\n\n```bash\n# 1. Build locally first\nnpm run build\n\n# 2. Ensure env vars are set (check existing, add missing)\nnpx @insforge\u002Fcli deployments env list\nnpx @insforge\u002Fcli deployments env set VITE_INSFORGE_URL https:\u002F\u002Fmy-app.us-east.insforge.app\nnpx @insforge\u002Fcli deployments env set VITE_INSFORGE_ANON_KEY ik_xxx\n\n# 3. Deploy the project source directory\nnpx @insforge\u002Fcli deployments deploy .\n```\n\n**Environment variable prefix by framework:**\n\n| Framework | Prefix | Example |\n|-----------|--------|---------|\n| Vite | `VITE_` | `VITE_INSFORGE_URL` |\n| Next.js | `NEXT_PUBLIC_` | `NEXT_PUBLIC_INSFORGE_URL` |\n| Create React App | `REACT_APP_` | `REACT_APP_INSFORGE_URL` |\n| Astro | `PUBLIC_` | `PUBLIC_INSFORGE_URL` |\n| SvelteKit | `PUBLIC_` | `PUBLIC_INSFORGE_URL` |\n\n**Pre-deploy checklist:**\n- [ ] `npm run build` succeeds locally\n- [ ] Env vars are set — run `deployments env list` to verify, or pass `--env` on the deploy command\n- [ ] All env vars use the correct framework prefix\n- [ ] Deploy the project source directory (usually `.`), not `dist\u002F`, `build\u002F`, or `.next\u002F`\n- [ ] Edge function directories excluded from frontend build (if applicable)\n- [ ] Never include `node_modules`, `.git`, `.env`, or `.insforge` in the upload\n- [ ] Framework build output is configured correctly (`dist\u002F`, `build\u002F`, `.next\u002F`, etc.)\n\n### Deploy a Docker container (compute service)\n\nTwo modes — pick by what you have. Both deploy to the same Fly.io infrastructure.\n\n**Source mode (you have a Dockerfile; needs `flyctl` on PATH but NO local Docker daemon):**\n```bash\n# Install flyctl once: curl -L https:\u002F\u002Ffly.io\u002Finstall.sh | sh\n\n# Project layout: Dockerfile + your app code\n$ ls\nDockerfile  app.py  requirements.txt\n\n# One command:\nnpx @insforge\u002Fcli compute deploy . --name my-api --port 8000\n# CLI mints a per-app, attenuated Fly deploy token from InsForge cloud\n# (~20 min TTL, scoped to one app, else: deny blocks org-wide reads), then\n# shells out to `flyctl deploy --remote-only --build-only` so the build runs\n# on Fly's remote builder and is pushed to registry.fly.io. Cloud launches\n# the machine and returns the URL. NO local Docker daemon needed.\n```\n\n**Off-the-shelf image (no Docker required):**\n```bash\nnpx @insforge\u002Fcli compute deploy --image nginx:alpine --name my-api --port 80 --region iad\nnpx @insforge\u002Fcli compute list\n# Service is running with a public https:\u002F\u002F{name}-{project}.fly.dev endpoint\n# No flyctl, no FLY_API_TOKEN, no local Docker required.\n```\n\n**Pre-built image you pushed yourself (CI\u002FCD, custom registry — no Docker required locally):**\n```bash\n# Built + pushed elsewhere (GitHub Actions, your CI, etc.)\nnpx @insforge\u002Fcli compute deploy --image ghcr.io\u002Fyou\u002Fapp:v1 --name my-api --port 8000\n```\n\n**Lifecycle management:**\n```bash\nnpx @insforge\u002Fcli compute stop \u003Cid>       # stop the machine\nnpx @insforge\u002Fcli compute start \u003Cid>      # restart it\nnpx @insforge\u002Fcli compute events \u003Cid>     # machine lifecycle events\nnpx @insforge\u002Fcli compute delete \u003Cid>     # destroy everything\n```\n\n**CPU tiers:** `shared-1x` (default), `shared-2x`, `performance-1x`, `performance-2x`, `performance-4x`\n**Memory options:** 256, 512 (default), 1024, 2048, 4096, 8192 MB\n**Regions:** `iad` (default), `sin`, `lax`, `lhr`, `nrt`, `ams`, `syd`\n\n> **Source mode** requires `flyctl` on PATH (no Docker). The CLI never asks the user for `FLY_API_TOKEN` — the cloud mints a short-lived, app-scoped token per deploy (~20 min, `else: deny`) and passes it through env to the flyctl subprocess. Tokens cannot deploy or read any other app, even within InsForge's Fly org. **Image mode** (the examples above) needs neither flyctl nor a token.\n\n### Backup and restore database\n\n```bash\nnpx @insforge\u002Fcli db export --output backup.sql\nnpx @insforge\u002Fcli db import backup.sql\n```\n\n### Schedule a cron job\n\n```bash\n# Wall-clock cadence — every 5 minutes (5-field cron)\nnpx @insforge\u002Fcli schedules create \\\n  --name \"Cleanup Expired\" \\\n  --cron \"*\u002F5 * * * *\" \\\n  --url \"https:\u002F\u002Fmy-app.us-east.insforge.app\u002Ffunctions\u002Fcleanup\" \\\n  --method POST \\\n  --headers '{\"Authorization\": \"Bearer ${{secrets.API_TOKEN}}\"}'\n\n# Sub-minute cadence — every 30 seconds (pg_cron interval syntax)\nnpx @insforge\u002Fcli schedules create \\\n  --name \"Health Probe\" \\\n  --cron \"30 seconds\" \\\n  --url \"https:\u002F\u002Fmy-app.us-east.insforge.app\u002Ffunctions\u002Fprobe\" \\\n  --method GET\n\n# Check execution history\nnpx @insforge\u002Fcli schedules logs \u003Cid>\n```\n\n#### Cron Expression Format\n\nInsForge accepts **two cron formats**: standard 5-field cron expressions, **or** pg_cron interval syntax for sub-minute cadence. 6-field cron expressions with seconds (Quartz\u002FSpring style) are NOT supported — use the interval form below for sub-minute work.\n\n**5-field cron format:**\n\n```\n┌─────────────── minute (0-59)\n│ ┌───────────── hour (0-23)\n│ │ ┌─────────── day of month (1-31)\n│ │ │ ┌───────── month (1-12)\n│ │ │ │ ┌─────── day of week (0-6, Sunday=0)\n│ │ │ │ │\n* * * * *\n```\n\n| Expression | Description |\n|------------|-------------|\n| `* * * * *` | Every minute |\n| `*\u002F5 * * * *` | Every 5 minutes |\n| `0 * * * *` | Every hour (at minute 0) |\n| `0 9 * * *` | Daily at 9:00 AM |\n| `0 9 * * 1` | Every Monday at 9:00 AM |\n| `0 0 1 * *` | First day of every month at midnight |\n| `30 14 * * 1-5` | Weekdays at 2:30 PM |\n\n**Interval syntax (for sub-minute cadence):**\n\nUse `\u003Cpositive integer> seconds` (e.g. `30 seconds`) — the only thing 5-field cron can't express.\n\n> **When to pick which:** use 5-field cron for \"wall-clock\" cadence (every Monday at 9 AM, daily midnight, every 5 minutes on the dot). Use interval syntax when you need sub-minute cadence or simple \"every N seconds\" semantics. At very high cadence (e.g. `1 second`), watch `schedules.job_logs` row counts — every fire writes a log row.\n\n#### Secret References in Headers\n\nHeaders can reference secrets stored in InsForge using the syntax `${{secrets.KEY_NAME}}`.\n\n```json\n{\n  \"headers\": {\n    \"Authorization\": \"Bearer ${{secrets.API_TOKEN}}\",\n    \"X-API-Key\": \"${{secrets.EXTERNAL_API_KEY}}\"\n  }\n}\n```\n\nSecrets are resolved at schedule creation\u002Fupdate time. If a referenced secret doesn't exist, the operation fails with a 404 error.\n\n#### Best Practices\n\n1. **Pick the right cron format for the cadence**\n   - Wall-clock cadence (daily\u002Fhourly\u002Fweekly) → 5-field cron (`*\u002F5 * * * *`, `0 9 * * 1-5`)\n   - Sub-minute cadence → pg_cron interval form (e.g. `30 seconds`)\n   - 6-field cron with seconds (`*\u002F2 * * * * *`) is **not** supported — use the interval form\n\n2. **Store sensitive values as secrets**\n   - Use `${{secrets.KEY_NAME}}` in headers for API keys and tokens\n   - Create secrets first via the secrets API before referencing them\n\n3. **Target InsForge functions for serverless tasks**\n   - Use the function URL format: `https:\u002F\u002Fyour-project.region.insforge.app\u002Ffunctions\u002F{slug}`\n   - Ensure the target function exists and has `status: \"active\"`\n\n4. **Monitor execution logs**\n   - Check logs regularly to ensure schedules are running successfully\n   - Look for non-200 status codes and failed executions\n\n#### Common Mistakes\n\n| Mistake | Solution |\n|---------|----------|\n| Using 6-field cron (e.g. `*\u002F2 * * * * *`) | Not supported — use pg_cron interval form (`2 seconds`) for sub-minute, or 5-field cron for everything else |\n| Referencing non-existent secret | Create the secret first via secrets API |\n| Targeting non-existent function | Verify function exists and is `active` before scheduling |\n| Schedule not running | Check `isActive` is `true` and cron expression is valid |\n\n#### Recommended Workflow\n\n```\n1. Create secrets if needed     -> `npx @insforge\u002Fcli secrets add KEY VALUE`\n2. Create\u002Fverify target function -> `npx @insforge\u002Fcli functions list`\n3. Create schedule              -> `npx @insforge\u002Fcli schedules create`\n4. Verify schedule is active    -> `npx @insforge\u002Fcli schedules get \u003Cid>`\n5. Monitor execution logs       -> `npx @insforge\u002Fcli schedules logs \u003Cid>`\n```\n\n### Diagnose backend health\n\n```bash\n# Full health report (all checks)\nnpx @insforge\u002Fcli diagnose\n\n# Check specific areas\nnpx @insforge\u002Fcli diagnose metrics --range 24h          # CPU\u002Fmemory\u002Fdisk over last 24h\nnpx @insforge\u002Fcli diagnose advisor --severity critical   # critical issues only\nnpx @insforge\u002Fcli diagnose db --check bloat,slow-queries # specific DB checks\nnpx @insforge\u002Fcli diagnose logs                          # aggregate errors from all sources\n```\n\n### Debug with logs\n\n```bash\nnpx @insforge\u002Fcli logs function.logs          # function execution issues\nnpx @insforge\u002Fcli logs postgres.logs          # database query problems\nnpx @insforge\u002Fcli logs insforge.logs          # API \u002F auth errors\nnpx @insforge\u002Fcli logs postgrest.logs --limit 50\n```\n\n#### Best Practices\n\n1. **Start with function.logs for function issues**\n   - Check execution errors, timeouts, and runtime exceptions\n\n2. **Use postgres.logs for query problems**\n   - Debug slow queries, constraint violations, connection issues\n\n3. **Check insforge.logs for API errors**\n   - Authentication failures, request validation, general backend errors\n\n#### Common Debugging Scenarios\n\n| Problem | Check |\n|---------|-------|\n| Function not working | `function.logs` |\n| Database query failing | `postgres.logs`, `postgREST.logs` |\n| Auth issues | `insforge.logs` |\n| API returning 500 errors | `insforge.logs`, `postgREST.logs` |\n| General health \u002F performance | `diagnose` (full report) or `diagnose metrics` |\n| Database bloat \u002F slow queries | `diagnose db` |\n| Security \u002F config issues | `diagnose advisor --category security` |\n| Compute service not starting | `compute events \u003Cid>` (machine lifecycle events) |\n| Compute source-mode deploy failed | Verify `flyctl` is on PATH (`flyctl version`); the per-app deploy token has a 20-min TTL — re-run if expired. Use `--image \u003Curl>` with a pre-built image to skip flyctl entirely. |\n| Compute image-mode deploy failed | Confirm the image is publicly pullable (private registries need per-project credential setup) |\n\n### Non-interactive CI\u002FCD\n\n```bash\nINSFORGE_EMAIL=$EMAIL INSFORGE_PASSWORD=$PASSWORD npx @insforge\u002Fcli login --email -y\nnpx @insforge\u002Fcli link --project-id $PROJECT_ID --org-id $ORG_ID -y\nnpx @insforge\u002Fcli db query \"SELECT count(*) FROM users\" --json\n```\n\n---\n\n## Project Configuration\n\nAfter `create` or `link`, `.insforge\u002Fproject.json` is created:\n\n```json\n{\n  \"project_id\": \"...\",\n  \"appkey\": \"...\",\n  \"region\": \"us-east\",\n  \"api_key\": \"ik_...\",\n  \"oss_host\": \"https:\u002F\u002F{appkey}.{region}.insforge.app\"\n}\n```\n\n`oss_host` is the base URL for all SDK and API operations. `api_key` is the full-access admin key for backend API calls, equivalent to a service role key on other platforms.\n\n> **Never commit this file to version control or share it publicly**.\n> Do not edit this file manually. Use `npx @insforge\u002Fcli link` to switch projects.\n","# InsForge CLI\n\nCommand-line tool for managing InsForge Backend-as-a-Service projects.\n\n## Critical: Always Use npx (No Global Install)\n\n**NEVER** install the CLI globally (`npm install -g @insforge\u002Fcli`). **Always** run commands via `npx`:\n\n```bash\nnpx @insforge\u002Fcli \u003Ccommand>\n```\n\nThis ensures the latest version is always used without global install issues (permissions, PATH, node version mismatches).\n\n**Session start** — verify authentication and project:\n\n```bash\nnpx @insforge\u002Fcli whoami    # verify authentication\nnpx @insforge\u002Fcli current   # verify linked project\n```\n\nIf not authenticated: `npx @insforge\u002Fcli login`\nIf no project linked: `npx @insforge\u002Fcli create` (new) or `npx @insforge\u002Fcli link` (existing)\n\n> **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.\n\n## Global Options\n\n| Flag | Description |\n|------|-------------|\n| `--json` | Structured JSON output (for scripts and agents) |\n| `-y, --yes` | Skip confirmation prompts |\n\n> All examples below use `npx @insforge\u002Fcli`. **Never** call `insforge` directly.\n\n## Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| 0 | Success |\n| 1 | General error (e.g., HTTP 400+ from function invoke) |\n| 2 | Not authenticated |\n| 3 | Project not linked |\n| 4 | Resource not found |\n| 5 | Permission denied |\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `INSFORGE_ACCESS_TOKEN` | Override stored access token |\n| `INSFORGE_PROJECT_ID` | Override linked project ID |\n| `INSFORGE_EMAIL` | Email for non-interactive login |\n| `INSFORGE_PASSWORD` | Password for non-interactive login |\n\n---\n\n## Commands\n\n### Authentication\n- `npx @insforge\u002Fcli login` — OAuth (browser) or `--email` for password login. See [references\u002Flogin.md](references\u002Flogin.md)\n- `npx @insforge\u002Fcli logout` — clear stored credentials\n- `npx @insforge\u002Fcli whoami` — show current user\n\n### Project Management\n- `npx @insforge\u002Fcli create` — create new project. See [references\u002Fcreate.md](references\u002Fcreate.md)\n- `npx @insforge\u002Fcli link` — link directory to existing project\n- `npx @insforge\u002Fcli current` — show current user + linked project\n- `npx @insforge\u002Fcli list` — list all orgs and projects\n- `npx @insforge\u002Fcli 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.\n\n### Database — `npx @insforge\u002Fcli db`\n- `npx @insforge\u002Fcli db query \u003Csql>` — execute raw SQL. See [references\u002Fdb-query.md](references\u002Fdb-query.md)\n- `npx @insforge\u002Fcli db tables \u002F indexes \u002F policies \u002F triggers \u002F functions` — inspect schema\n- `npx @insforge\u002Fcli db migrations list \u002F fetch \u002F new \u002F up` — manage developer migration files. See [references\u002Fdb-migrations.md](references\u002Fdb-migrations.md)\n- `npx @insforge\u002Fcli db rpc \u003Cfn> [--data \u003Cjson>]` — call database function (GET if no data, POST if data)\n- `npx @insforge\u002Fcli db export` — export schema\u002Fdata. See [references\u002Fdb-export.md](references\u002Fdb-export.md)\n- `npx @insforge\u002Fcli db import \u003Cfile>` — import from SQL file. See [references\u002Fdb-import.md](references\u002Fdb-import.md)\n\n> Use `db migrations` for schema changes. Reserve `db query` for inspecting data and for row-level `SELECT \u002F INSERT \u002F UPDATE \u002F DELETE` work.\n\n### Edge Functions — `npx @insforge\u002Fcli functions`\n- `npx @insforge\u002Fcli functions list` — list deployed functions\n- `npx @insforge\u002Fcli functions code \u003Cslug>` — view function source\n- `npx @insforge\u002Fcli functions deploy \u003Cslug>` — deploy or update. See [references\u002Ffunctions-deploy.md](references\u002Ffunctions-deploy.md)\n- `npx @insforge\u002Fcli functions invoke \u003Cslug> [--data \u003Cjson>] [--method GET|POST]` — invoke function\n- `npx @insforge\u002Fcli functions delete \u003Cslug>` — delete an edge function (with confirmation)\n\n### Storage — `npx @insforge\u002Fcli storage`\n- `npx @insforge\u002Fcli storage buckets` — list buckets\n- `npx @insforge\u002Fcli storage create-bucket \u003Cname> [--private]` — create bucket (default: public)\n- `npx @insforge\u002Fcli storage delete-bucket \u003Cname>` — delete bucket and **all its objects** (destructive)\n- `npx @insforge\u002Fcli storage list-objects \u003Cbucket> [--prefix] [--search] [--limit] [--sort]` — list objects\n- `npx @insforge\u002Fcli storage upload \u003Cfile> --bucket \u003Cname> [--key \u003CobjectKey>]` — upload file\n- `npx @insforge\u002Fcli storage download \u003CobjectKey> --bucket \u003Cname> [--output \u003Cpath>]` — download file\n\n### Payments — `npx @insforge\u002Fcli payments`\n- `npx @insforge\u002Fcli payments status` — show Stripe key, account, sync, and webhook status\n- `npx @insforge\u002Fcli payments config \u002F config set \u002F config remove` — manage Stripe test\u002Flive secret keys. See [references\u002Fpayments.md](references\u002Fpayments.md)\n- `npx @insforge\u002Fcli payments sync [--environment test|live|all]` — sync products, prices, customers, and subscriptions from Stripe\n- `npx @insforge\u002Fcli payments webhooks configure \u003Cenvironment>` — create or recreate the managed Stripe webhook endpoint\n- `npx @insforge\u002Fcli payments catalog --environment \u003Cenv>` — inspect mirrored products and prices together\n- `npx @insforge\u002Fcli payments customers --environment \u003Cenv>` — admin\u002Fdebug customer reads\n- `npx @insforge\u002Fcli payments products list\u002Fget\u002Fcreate\u002Fupdate\u002Fdelete` — manage Stripe products\n- `npx @insforge\u002Fcli payments prices list\u002Fget\u002Fcreate\u002Fupdate\u002Farchive` — manage Stripe prices\n- `npx @insforge\u002Fcli payments subscriptions --environment \u003Cenv>` — admin\u002Fdebug subscription reads\n- `npx @insforge\u002Fcli payments history --environment \u003Cenv>` — admin\u002Fdebug payment history reads\n\n> ⚠️ **Private preview.** Payments are a new feature; older backends may not expose `\u002Fapi\u002Fpayments`.\n> **Availability:** If the CLI says `Payments are not available on this backend`, stop and ask the developer\u002Fadmin to enable payments or upgrade the self-hosted InsForge instance. Do not work around this by storing Stripe secret keys with generic secrets or embedding Stripe secret keys in app code.\n> Agents should default to `--environment test` while building. Only use `live` after the developer explicitly approves production Stripe changes.\n\n### Frontend Deployments (Vercel) — `npx @insforge\u002Fcli deployments`\n\nDeploy a frontend application (static site \u002F SPA \u002F Next.js \u002F etc.) to Vercel,\nmanaged through InsForge. For backend container workloads see **Backend Compute\nServices** below.\n\n- `npx @insforge\u002Fcli deployments deploy [dir]` — deploy frontend app from its source directory. See [references\u002Fdeployments-deploy.md](references\u002Fdeployments-deploy.md)\n- `npx @insforge\u002Fcli deployments list` — list deployments\n- `npx @insforge\u002Fcli deployments status \u003Cid> [--sync]` — get deployment status (--sync fetches from Vercel)\n- `npx @insforge\u002Fcli deployments cancel \u003Cid>` — cancel running deployment\n- `npx @insforge\u002Fcli deployments env list` — list all deployment environment variables\n- `npx @insforge\u002Fcli deployments env set \u003Ckey> \u003Cvalue>` — create or update a deployment environment variable\n- `npx @insforge\u002Fcli deployments env delete \u003Cid>` — delete a deployment environment variable by ID\n\n### Backend Compute Services (Fly.io) — `npx @insforge\u002Fcli compute`\n\nDeploy and manage backend containerized services (APIs, workers, microservices).\nEach service runs as a Docker container reachable via a public HTTPS endpoint.\nFor frontend hosting see **Frontend Deployments** above.\n\n> 🔧 **Implementation note (for agents):** InsForge runs compute on **Fly.io**\n> under the hood, but **DO NOT use `flyctl` directly** to deploy or manage\n> these services. The Fly account, org, IP allocation, and machine ownership\n> all live on the InsForge cloud — `flyctl` invoked with the user's own credentials\n> will land in the wrong org and fail with `unauthorized`. Always use\n> `npx @insforge\u002Fcli compute …`. The CLI is just an HTTP client that calls the\n> InsForge backend; the backend talks to Fly. No `flyctl` and no Fly token\n> are needed locally.\n\n> ⚠️ **In progress.** Compute services are still in development; the API and CLI may change.\n>\n> **Availability:** Compute requires the backend to have Fly.io configured. If not enabled, the API returns `COMPUTE_SERVICE_NOT_CONFIGURED` with setup instructions in `nextActions`. Follow those instructions.\n\n- `npx @insforge\u002Fcli compute list` — list all compute services (name, status, image, CPU, memory, endpoint)\n- `npx @insforge\u002Fcli compute get \u003Cid>` — get service details\n- `npx @insforge\u002Fcli compute deploy [dir] --name \u003Cname> [--port] [--cpu] [--memory] [--region] [--env \u003Cjson> | --env-file \u003Cpath>]` — **source mode**: requires `flyctl` on PATH; **no local Docker daemon needed**. CLI shells out to `flyctl deploy --remote-only --build-only` using a short-lived per-app deploy token minted by InsForge cloud (the user never sees a Fly token). Build runs on Fly's remote builder; image is pushed to `registry.fly.io`; cloud launches the machine.\n- `npx @insforge\u002Fcli compute deploy --image \u003Curl> --name \u003Cname> [--port] [--cpu] [--memory] [--region] [--env \u003Cjson> | --env-file \u003Cpath>]` — **image mode**: deploys a pre-built image from any registry. **Nothing needed locally** beyond the InsForge CLI. Best for CI\u002FCD pipelines and off-the-shelf images like `nginx:alpine`. Prefer `--env-file \u003Cpath>` over inline `--env \u003Cjson>` for >1 secret.\n- See [references\u002Fcompute-deploy.md](references\u002Fcompute-deploy.md) for both modes.\n- `npx @insforge\u002Fcli compute update \u003Cid> [--image] [--port] [--cpu] [--memory] [--region] [--env \u003Cjson> | --env-set KEY=VALUE | --env-unset KEY]` — update service config. `--env-set`\u002F`--env-unset` are **repeatable** and merge with existing env — use these to rotate one secret without restating the rest. `--env \u003Cjson>` replaces wholesale and is mutually exclusive with the merge flags.\n- `npx @insforge\u002Fcli compute stop \u003Cid>` — stop a running service\n- `npx @insforge\u002Fcli compute start \u003Cid>` — start a stopped service\n- `npx @insforge\u002Fcli compute events \u003Cid> [--limit 50]` — Fly machine **lifecycle events** (start\u002Fstop\u002Fexit\u002Frestart). Container stdout\u002Fstderr is NOT surfaced in v1 — that's roadmap work and will reuse the freed-up `compute logs` command name when it lands. To debug a crash-looping container today, reproduce locally with the same image.\n- `npx @insforge\u002Fcli compute delete \u003Cid>` — destroy the service and its Fly.io resources. **Permanent.** Audit log captures the full config (incl. encrypted env blob) on delete for reconstruction. Dashboard adds a type-to-confirm gate; the CLI does not — guard scripted deletes carefully.\n\n### Secrets — `npx @insforge\u002Fcli secrets`\n- `npx @insforge\u002Fcli secrets list [--all]` — list secrets (values hidden; `--all` includes deleted)\n- `npx @insforge\u002Fcli secrets get \u003Ckey>` — get decrypted value\n- `npx @insforge\u002Fcli secrets add \u003Ckey> \u003Cvalue> [--reserved] [--expires \u003CISO date>]` — create secret\n- `npx @insforge\u002Fcli secrets update \u003Ckey> [--value] [--active] [--reserved] [--expires]` — update secret\n- `npx @insforge\u002Fcli secrets delete \u003Ckey>` — **soft delete** (marks inactive; restore with `--active true`)\n\n### Configuration — `npx @insforge\u002Fcli config`\n\nManage `auth.allowed_redirect_urls` declaratively via `insforge.toml` (project root). For changing redirect URLs, prefer this over `PUT \u002Fapi\u002Fauth\u002Fconfig` — the CLI gates on backend version and surfaces a clean skip if the backend predates the field, where the raw PUT may 200-and-silently-drop.\n\n- `npx @insforge\u002Fcli config export [--out insforge.toml] [--force]` — pull live config into TOML. Sections the backend doesn't expose are omitted.\n- `npx @insforge\u002Fcli config plan [--file insforge.toml]` — diff TOML vs. live state; shows which changes will apply vs. be skipped on the connected backend.\n- `npx @insforge\u002Fcli config apply [--file insforge.toml] [--dry-run] [--auto-approve]` — apply the TOML. Per-change capability gate: supported changes apply; unsupported go to `skipped[]` with an upgrade message and **no PUT is issued for them**. `--json` returns `{ plan, applied[], skipped[] }`.\n\n> **If `apply` returns `skipped: [...]`, surface verbatim.** The user's backend predates this section. Tell them which sections were skipped and to upgrade; do not retry, do not bypass with `curl` (silent drop). Sample message: _\"I tried to set `auth.allowed_redirect_urls` but your backend is on an older version that doesn't support it yet. Upgrade your backend and re-run `npx @insforge\u002Fcli config apply`.\"_\n\n> **TOML is for knobs only — never embed programs.** SQL → `db migrations`. Function code → `functions deploy`. Compute → `compute deploy`. Frontend → `deployments deploy`. TOML carries booleans, strings, and arrays — anything bigger lives in its own file managed by a dedicated CLI command.\n\n**Scope today:** only `auth.allowed_redirect_urls`. Password policy, SMTP, OAuth providers, custom subdomain, and similar will land in TOML later. For other `auth.config` fields today, use the dashboard.\n\nSee [references\u002Fconfig.md](references\u002Fconfig.md) for output shapes and a common-mistakes table.\n\n### Schedules — `npx @insforge\u002Fcli schedules`\n- `npx @insforge\u002Fcli schedules list` — list all scheduled tasks (shows ID, name, cron, URL, method, active, next run)\n- `npx @insforge\u002Fcli schedules get \u003Cid>` — get schedule details\n- `npx @insforge\u002Fcli schedules create --name --cron --url --method [--headers \u003Cjson>] [--body \u003Cjson>]` — create a cron job. `--cron` accepts either 5-field cron (`*\u002F5 * * * *`) or pg_cron interval syntax for sub-minute cadence (`30 seconds`)\n- `npx @insforge\u002Fcli schedules update \u003Cid> [--name] [--cron] [--url] [--method] [--headers] [--body] [--active]` — update schedule\n- `npx @insforge\u002Fcli schedules delete \u003Cid>` — delete schedule (with confirmation)\n- `npx @insforge\u002Fcli schedules logs \u003Cid> [--limit] [--offset]` — view execution logs\n\n### Branching — `npx @insforge\u002Fcli branch`\n\nTest risky schema, RLS, auth, or function changes in an isolated branch project before applying them to prod. A branch shares the parent's `JWT_SECRET` (so the same users authenticate) but gets a fresh EC2 + database + `API_KEY` \u002F `ANON_KEY`. See [`references\u002Fbranch.md`](references\u002Fbranch.md) for the decision guide and lifecycle command details.\n\n> ⚠️ **Backend version requirement.** Branching is still in development and only available on InsForge backend **2.1.0 or later**. On older backends, `npx @insforge\u002Fcli branch` commands will fail. If you hit an error, contact the InsForge team.\n\n| Command | Description |\n|---------|-------------|\n| `npx @insforge\u002Fcli branch create \u003Cname> [--mode full\\|schema-only] [--no-switch]` | Create a branch from the linked project. Auto-switches the directory's context to the new branch by default. |\n| `npx @insforge\u002Fcli branch list` | List active branches of the parent project (or the parent of the currently-switched-to branch). |\n| `npx @insforge\u002Fcli branch switch \u003Cname>` \u002F `--parent` | Repoint `.insforge\u002Fproject.json` at the branch (or back at parent). |\n| `npx @insforge\u002Fcli branch merge \u003Cname> [--dry-run] [--save-sql \u003Cpath>] [-y]` | Compute (and optionally apply) the 3-way merge to parent. Conflict path exits with code 2. See [branch-merge](references\u002Fbranch-merge.md). |\n| `npx @insforge\u002Fcli branch reset \u003Cname> [-y]` | Wipe all changes on the branch and restore its database to T0 (parent's snapshot at branch creation). Same EC2 \u002F `appkey` \u002F `API_KEY` — only DB content rewinds. Works from `ready` **or** `merged`. See [branch-reset](references\u002Fbranch-reset.md). |\n| `npx @insforge\u002Fcli branch delete \u003Cname> [-y]` | Delete a branch and reclaim its EC2. Auto-switches back to parent if currently on the deleted branch. |\n\n**Typical flow:**\n\n```bash\nnpx @insforge\u002Fcli branch create feat-rls --mode schema-only\n# context now points at the branch — re-source .env if your dev server caches it\n# branch runtime starts empty — redeploy any functions\u002Fwebsite\u002Fcompute you'll exercise\n# ... apply your schema \u002F RLS \u002F auth changes via db migrations \u002F SQL ...\nnpx @insforge\u002Fcli branch merge feat-rls --dry-run --save-sql \u002Ftmp\u002Fdiff.sql\n# review \u002Ftmp\u002Fdiff.sql; on conflict CLI exits 2\nnpx @insforge\u002Fcli branch merge feat-rls\n# parent now has the changes — redeploy functions \u002F website \u002F compute as needed\nnpx @insforge\u002Fcli branch delete feat-rls\n```\n\n> **Got into a bad state on the branch?** `npx @insforge\u002Fcli branch reset \u003Cname>` rewinds the branch's database back to T0 (the parent snapshot at branch creation) without touching the EC2 or API keys — cheaper than delete + recreate and the SDK's `INSFORGE_URL` \u002F `ANON_KEY` stay valid. Works from both `ready` and `merged` (a merged branch reset re-opens the same slot for another round of changes).\n\n### Diagnostics — `npx @insforge\u002Fcli diagnose`\n\nRun with no subcommand for a full health report across all checks.\n\n- `npx @insforge\u002Fcli diagnose` — full health report (runs all diagnostics)\n- `npx @insforge\u002Fcli diagnose --ai \"\u003Cissue description>\"` — hand a natural-language problem description (error, failing URL, HTTP status) to the InsForge debug agent; returns a diagnosis plus suggested solutions\n- `npx @insforge\u002Fcli diagnose metrics [--range 1h|6h|24h|7d] [--metrics \u003Clist>]` — EC2 instance metrics (CPU, memory, disk, network). Default range: `1h`\n- `npx @insforge\u002Fcli diagnose advisor [--severity critical|warning|info] [--category security|performance|health] [--limit \u003Cn>]` — latest advisor scan results and issues. Default limit: 50\n- `npx @insforge\u002Fcli diagnose db [--check \u003Cchecks>]` — database health checks. Checks: `connections`, `slow-queries`, `bloat`, `size`, `index-usage`, `locks`, `cache-hit` (default: `all`)\n- `npx @insforge\u002Fcli diagnose logs [--source \u003Cname>] [--limit \u003Cn>]` — aggregate error-level logs from all backend sources. Default limit: 100\n\n### Analytics Integration — `npx @insforge\u002Fcli posthog`\n- `npx @insforge\u002Fcli posthog setup` — one-shot connect-and-install: auto-provisions a PostHog account if needed, runs OAuth, detects the project framework (Next.js App\u002FPages Router, Vite + React, SvelteKit, Astro), installs `posthog-js`, renders the per-framework SDK init template, and writes env vars. See [references\u002Fposthog.md](references\u002Fposthog.md).\n\n> ⚠️ **Private beta.** PostHog integration is currently rolling out to early-access partners; older cloud projects and self-hosted backends may not expose `\u002Fintegrations\u002Fposthog\u002Fv1\u002F*`.\n> **Availability:** If the CLI fails with `PostHog connect flow unavailable (HTTP 404)`, the project doesn't have PostHog enabled yet — wait for the rollout or ask the InsForge team for early access. Do not work around this by pulling a `phc_` key from a separate PostHog account; the InsForge dashboard won't surface analytics without the OAuth-backed server-side connection.\n> Templated install supports Next.js (App \u002F Pages Router), Vite + React, SvelteKit, and Astro; other frameworks fall through to a manual instructions path.\n\n### Logs — `npx @insforge\u002Fcli logs`\n- `npx @insforge\u002Fcli logs \u003Csource> [--limit \u003Cn>]` — fetch backend container logs (default: 20 entries)\n\n| Source | Description |\n|--------|-------------|\n| `insforge.logs` | Main backend logs |\n| `postgREST.logs` | PostgREST API layer logs |\n| `postgres.logs` | PostgreSQL database logs |\n| `function.logs` | Edge function execution logs |\n| `function-deploy.logs` | Edge function deployment logs |\n\n> Source names are case-insensitive: `postgrest.logs` works the same as `postgREST.logs`.\n\n### Documentation — `npx @insforge\u002Fcli docs`\n- `npx @insforge\u002Fcli docs` — list all topics\n- `npx @insforge\u002Fcli docs instructions` — setup guide\n- `npx @insforge\u002Fcli docs \u003Cfeature> \u003Clanguage>` — feature docs (`db \u002F storage \u002F functions \u002F auth \u002F ai \u002F realtime` × `typescript \u002F swift \u002F kotlin \u002F rest-api`)\n\n> For writing application code with the InsForge SDK, use the insforge (SDK) skill instead, and use the `npx @insforge\u002Fcli docs \u003Cfeature> \u003Clanguage>` to get specific SDK documentation.\n\n---\n\n## Non-Obvious Behaviors\n\n**Functions invoke URL**: invoked at `{oss_host}\u002Ffunctions\u002F{slug}` — NOT `\u002Fapi\u002Ffunctions\u002F{slug}`. Exits with code 1 on HTTP 400+.\n\n**Secrets delete is soft**: marks the secret inactive, not destroyed. Restore with `npx @insforge\u002Fcli secrets update KEY --active true`. Use `--all` with `secrets list` to see inactive ones.\n\n**Storage delete-bucket is hard**: deletes the bucket and every object inside it permanently.\n\n**db rpc uses GET or POST**: no `--data` → GET; with `--data` → POST.\n\n**db migrations use timestamped files**: migration filenames use `YYYYMMDDHHmmss_name.sql`, for example `20260418091500_create-posts.sql`.\n\n**db migrations up supports safe batch modes**: `npx @insforge\u002Fcli db migrations up \u003Cfilename|version>` applies one explicit local target. `npx @insforge\u002Fcli db migrations up --to \u003Cversion|filename>` and `npx @insforge\u002Fcli db migrations up --all` apply pending files in ascending version order and stop on the first failure.\n\n**db migrations run inside a backend-managed transaction**: do not put `BEGIN`, `COMMIT`, or `ROLLBACK` in migration files.\n\n**The live database schema is the source of truth**: before writing a migration, and again if a migration fails, inspect the current database state first (`db tables \u002F indexes \u002F policies \u002F triggers \u002F functions`, plus `db migrations list`) and then adjust the migration statements to match reality. Do not assume local files are still current.\n\n**Compute deploy has two modes.** `compute deploy [dir]` shells out to `flyctl deploy --remote-only --build-only` against your source dir using a short-lived per-app token the cloud mints for that one deploy — **requires `flyctl` on PATH** but **no local Docker daemon** (the build runs remotely on Fly's builder). The token is attenuated to one app + builder\u002Fwg with `else: deny` so it cannot reach any other app or org-level endpoint, and it auto-expires after ~20 min. `compute deploy --image \u003Curl>` deploys a pre-built image from any registry — **nothing needed locally**, best for CI or off-the-shelf images like `nginx:alpine`. Don't use `flyctl` outside this CLI flow with your own credentials — the Fly account is InsForge's, you'd 401.\n\n**Compute endpoints use .fly.dev**: Services get a public URL at `https:\u002F\u002F{name}-{projectId}.fly.dev`. Custom domains require DNS configuration.\n\n**Schedules accept two cron formats**: 5-field cron (`minute hour day month day-of-week`, e.g. `*\u002F5 * * * *`) **or** pg_cron interval syntax for sub-minute cadence (e.g. `30 seconds`). 6-field cron with seconds (Quartz\u002FSpring's `*\u002F2 * * * * *`) is **not** supported — use the interval form for sub-minute work. Headers can reference secrets with `${{secrets.KEY_NAME}}`.\n\n**Payments use Stripe as source of truth**: use `payments config set` for Stripe keys, `payments sync` before relying on existing catalog data, and create a new Stripe price instead of editing amount\u002Fcurrency. Runtime checkout and customer portal integration belongs in the `insforge` SDK skill.\n\n**`config apply` is version-aware**: per-project backends drift in version. The CLI probes `\u002Fapi\u002Fmetadata` and gates `auth.allowed_redirect_urls` on whether the backend exposes it; if not, the change lands in `skipped[]` with an upgrade message and **no PUT is issued**. Never bypass with `curl` to \"force\" a skipped field — older backends may 200-and-silently-drop. Surface skips to the user and ask them to upgrade.\n\n---\n\n## Common Workflows\n\n### Configure auth redirect URLs (insforge.toml)\n\n```bash\n# 1. Pull current config to insforge.toml (writes in project root)\nnpx @insforge\u002Fcli --json config export\n\n# 2. Edit insforge.toml — add\u002Fremove entries under [auth] allowed_redirect_urls\n\n# 3. Preview the diff\nnpx @insforge\u002Fcli --json config plan\n\n# 4. Apply (use --yes for non-interactive — required in --json mode)\nnpx @insforge\u002Fcli --json --yes config apply\n```\n\nIf `apply` returns a non-empty `skipped[]`, the user's backend predates this section — surface the entries verbatim with the upgrade ask. Don't retry, don't fall back to `curl` (older backends may 200-and-silently-drop). See [references\u002Fconfig.md](references\u002Fconfig.md).\n\n### Set up database schema with migrations\n\n```bash\n# Inspect the current live schema first\nnpx @insforge\u002Fcli db tables\nnpx @insforge\u002Fcli db indexes\nnpx @insforge\u002Fcli db policies\nnpx @insforge\u002Fcli db migrations list\n\n# Sync applied remote migration history locally\nnpx @insforge\u002Fcli db migrations fetch\n\n# Create the next schema migration file\nnpx @insforge\u002Fcli db migrations new create-posts\n\n# Edit migrations\u002F20260418091500_create-posts.sql with CREATE TABLE \u002F ALTER TABLE \u002F policies\n\n# Apply pending migrations safely\nnpx @insforge\u002Fcli db migrations up --all\n```\n\n> Use migrations for schema changes. Use `db query` for row changes and inspection. In migrations, FK to users with `auth.users(id)` and use `auth.uid()` in RLS policies.\n\n### Manage database migrations\n\n```bash\n# Inspect remote migration history\nnpx @insforge\u002Fcli db migrations list\n\n# Sync applied remote migrations into migrations\u002F\nnpx @insforge\u002Fcli db migrations fetch\n\n# Create the next local migration file\nnpx @insforge\u002Fcli db migrations new create-posts\n\n# Apply all pending local migrations\nnpx @insforge\u002Fcli db migrations up --all\n```\n\n### Deploy an edge function\n\n```bash\n# Default source path: insforge\u002Ffunctions\u002F{slug}\u002Findex.ts\nnpx @insforge\u002Fcli functions deploy my-handler\nnpx @insforge\u002Fcli functions invoke my-handler --data '{\"action\": \"test\"}'\n```\n\n### Deploy frontend\n\n**Always verify the local build succeeds before deploying.** Local builds are faster to debug and don't waste server resources. After the build passes, deploy the project source directory (usually `.`), not `dist\u002F` or other generated build output.\n\n**Environment variables are required.** Frontend apps need env vars (API URL, anon key) to connect to InsForge at runtime. Deploying without them produces a broken app. Before deploying, you must ensure env vars are set using one of these two approaches:\n\n**Option A — Persistent env vars (recommended):** Set once, applied to every future deployment automatically. Best for projects that will be redeployed.\n\n```bash\n# Check what's already set\nnpx @insforge\u002Fcli deployments env list\n\n# Set the vars your app needs (use the correct framework prefix)\nnpx @insforge\u002Fcli deployments env set VITE_INSFORGE_URL https:\u002F\u002Fmy-app.us-east.insforge.app\nnpx @insforge\u002Fcli deployments env set VITE_INSFORGE_ANON_KEY ik_xxx\n\n# Deploy the project source — persistent env vars are applied automatically\nnpx @insforge\u002Fcli deployments deploy .\n```\n\n**Option B — Inline `--env` flag:** Pass env vars as JSON directly on the deploy command. Useful for one-off deploys or overriding persistent vars.\n\n```bash\nnpx @insforge\u002Fcli deployments deploy . --env '{\"VITE_INSFORGE_URL\": \"https:\u002F\u002Fmy-app.us-east.insforge.app\", \"VITE_INSFORGE_ANON_KEY\": \"ik_xxx\"}'\n```\n\n**Full workflow:**\n\n```bash\n# 1. Build locally first\nnpm run build\n\n# 2. Ensure env vars are set (check existing, add missing)\nnpx @insforge\u002Fcli deployments env list\nnpx @insforge\u002Fcli deployments env set VITE_INSFORGE_URL https:\u002F\u002Fmy-app.us-east.insforge.app\nnpx @insforge\u002Fcli deployments env set VITE_INSFORGE_ANON_KEY ik_xxx\n\n# 3. Deploy the project source directory\nnpx @insforge\u002Fcli deployments deploy .\n```\n\n**Environment variable prefix by framework:**\n\n| Framework | Prefix | Example |\n|-----------|--------|---------|\n| Vite | `VITE_` | `VITE_INSFORGE_URL` |\n| Next.js | `NEXT_PUBLIC_` | `NEXT_PUBLIC_INSFORGE_URL` |\n| Create React App | `REACT_APP_` | `REACT_APP_INSFORGE_URL` |\n| Astro | `PUBLIC_` | `PUBLIC_INSFORGE_URL` |\n| SvelteKit | `PUBLIC_` | `PUBLIC_INSFORGE_URL` |\n\n**Pre-deploy checklist:**\n- [ ] `npm run build` succeeds locally\n- [ ] Env vars are set — run `deployments env list` to verify, or pass `--env` on the deploy command\n- [ ] All env vars use the correct framework prefix\n- [ ] Deploy the project source directory (usually `.`), not `dist\u002F`, `build\u002F`, or `.next\u002F`\n- [ ] Edge function directories excluded from frontend build (if applicable)\n- [ ] Never include `node_modules`, `.git`, `.env`, or `.insforge` in the upload\n- [ ] Framework build output is configured correctly (`dist\u002F`, `build\u002F`, `.next\u002F`, etc.)\n\n### Deploy a Docker container (compute service)\n\nTwo modes — pick by what you have. Both deploy to the same Fly.io infrastructure.\n\n**Source mode (you have a Dockerfile; needs `flyctl` on PATH but NO local Docker daemon):**\n```bash\n# Install flyctl once: curl -L https:\u002F\u002Ffly.io\u002Finstall.sh | sh\n\n# Project layout: Dockerfile + your app code\n$ ls\nDockerfile  app.py  requirements.txt\n\n# One command:\nnpx @insforge\u002Fcli compute deploy . --name my-api --port 8000\n# CLI mints a per-app, attenuated Fly deploy token from InsForge cloud\n# (~20 min TTL, scoped to one app, else: deny blocks org-wide reads), then\n# shells out to `flyctl deploy --remote-only --build-only` so the build runs\n# on Fly's remote builder and is pushed to registry.fly.io. Cloud launches\n# the machine and returns the URL. NO local Docker daemon needed.\n```\n\n**Off-the-shelf image (no Docker required):**\n```bash\nnpx @insforge\u002Fcli compute deploy --image nginx:alpine --name my-api --port 80 --region iad\nnpx @insforge\u002Fcli compute list\n# Service is running with a public https:\u002F\u002F{name}-{project}.fly.dev endpoint\n# No flyctl, no FLY_API_TOKEN, no local Docker required.\n```\n\n**Pre-built image you pushed yourself (CI\u002FCD, custom registry — no Docker required locally):**\n```bash\n# Built + pushed elsewhere (GitHub Actions, your CI, etc.)\nnpx @insforge\u002Fcli compute deploy --image ghcr.io\u002Fyou\u002Fapp:v1 --name my-api --port 8000\n```\n\n**Lifecycle management:**\n```bash\nnpx @insforge\u002Fcli compute stop \u003Cid>       # stop the machine\nnpx @insforge\u002Fcli compute start \u003Cid>      # restart it\nnpx @insforge\u002Fcli compute events \u003Cid>     # machine lifecycle events\nnpx @insforge\u002Fcli compute delete \u003Cid>     # destroy everything\n```\n\n**CPU tiers:** `shared-1x` (default), `shared-2x`, `performance-1x`, `performance-2x`, `performance-4x`\n**Memory options:** 256, 512 (default), 1024, 2048, 4096, 8192 MB\n**Regions:** `iad` (default), `sin`, `lax`, `lhr`, `nrt`, `ams`, `syd`\n\n> **Source mode** requires `flyctl` on PATH (no Docker). The CLI never asks the user for `FLY_API_TOKEN` — the cloud mints a short-lived, app-scoped token per deploy (~20 min, `else: deny`) and passes it through env to the flyctl subprocess. Tokens cannot deploy or read any other app, even within InsForge's Fly org. **Image mode** (the examples above) needs neither flyctl nor a token.\n\n### Backup and restore database\n\n```bash\nnpx @insforge\u002Fcli db export --output backup.sql\nnpx @insforge\u002Fcli db import backup.sql\n```\n\n### Schedule a cron job\n\n```bash\n# Wall-clock cadence — every 5 minutes (5-field cron)\nnpx @insforge\u002Fcli schedules create \\\n  --name \"Cleanup Expired\" \\\n  --cron \"*\u002F5 * * * *\" \\\n  --url \"https:\u002F\u002Fmy-app.us-east.insforge.app\u002Ffunctions\u002Fcleanup\" \\\n  --method POST \\\n  --headers '{\"Authorization\": \"Bearer ${{secrets.API_TOKEN}}\"}'\n\n# Sub-minute cadence — every 30 seconds (pg_cron interval syntax)\nnpx @insforge\u002Fcli schedules create \\\n  --name \"Health Probe\" \\\n  --cron \"30 seconds\" \\\n  --url \"https:\u002F\u002Fmy-app.us-east.insforge.app\u002Ffunctions\u002Fprobe\" \\\n  --method GET\n\n# Check execution history\nnpx @insforge\u002Fcli schedules logs \u003Cid>\n```\n\n#### Cron Expression Format\n\nInsForge accepts **two cron formats**: standard 5-field cron expressions, **or** pg_cron interval syntax for sub-minute cadence. 6-field cron expressions with seconds (Quartz\u002FSpring style) are NOT supported — use the interval form below for sub-minute work.\n\n**5-field cron format:**\n\n```\n┌─────────────── minute (0-59)\n│ ┌───────────── hour (0-23)\n│ │ ┌─────────── day of month (1-31)\n│ │ │ ┌───────── month (1-12)\n│ │ │ │ ┌─────── day of week (0-6, Sunday=0)\n│ │ │ │ │\n* * * * *\n```\n\n| Expression | Description |\n|------------|-------------|\n| `* * * * *` | Every minute |\n| `*\u002F5 * * * *` | Every 5 minutes |\n| `0 * * * *` | Every hour (at minute 0) |\n| `0 9 * * *` | Daily at 9:00 AM |\n| `0 9 * * 1` | Every Monday at 9:00 AM |\n| `0 0 1 * *` | First day of every month at midnight |\n| `30 14 * * 1-5` | Weekdays at 2:30 PM |\n\n**Interval syntax (for sub-minute cadence):**\n\nUse `\u003Cpositive integer> seconds` (e.g. `30 seconds`) — the only thing 5-field cron can't express.\n\n> **When to pick which:** use 5-field cron for \"wall-clock\" cadence (every Monday at 9 AM, daily midnight, every 5 minutes on the dot). Use interval syntax when you need sub-minute cadence or simple \"every N seconds\" semantics. At very high cadence (e.g. `1 second`), watch `schedules.job_logs` row counts — every fire writes a log row.\n\n#### Secret References in Headers\n\nHeaders can reference secrets stored in InsForge using the syntax `${{secrets.KEY_NAME}}`.\n\n```json\n{\n  \"headers\": {\n    \"Authorization\": \"Bearer ${{secrets.API_TOKEN}}\",\n    \"X-API-Key\": \"${{secrets.EXTERNAL_API_KEY}}\"\n  }\n}\n```\n\nSecrets are resolved at schedule creation\u002Fupdate time. If a referenced secret doesn't exist, the operation fails with a 404 error.\n\n#### Best Practices\n\n1. **Pick the right cron format for the cadence**\n   - Wall-clock cadence (daily\u002Fhourly\u002Fweekly) → 5-field cron (`*\u002F5 * * * *`, `0 9 * * 1-5`)\n   - Sub-minute cadence → pg_cron interval form (e.g. `30 seconds`)\n   - 6-field cron with seconds (`*\u002F2 * * * * *`) is **not** supported — use the interval form\n\n2. **Store sensitive values as secrets**\n   - Use `${{secrets.KEY_NAME}}` in headers for API keys and tokens\n   - Create secrets first via the secrets API before referencing them\n\n3. **Target InsForge functions for serverless tasks**\n   - Use the function URL format: `https:\u002F\u002Fyour-project.region.insforge.app\u002Ffunctions\u002F{slug}`\n   - Ensure the target function exists and has `status: \"active\"`\n\n4. **Monitor execution logs**\n   - Check logs regularly to ensure schedules are running successfully\n   - Look for non-200 status codes and failed executions\n\n#### Common Mistakes\n\n| Mistake | Solution |\n|---------|----------|\n| Using 6-field cron (e.g. `*\u002F2 * * * * *`) | Not supported — use pg_cron interval form (`2 seconds`) for sub-minute, or 5-field cron for everything else |\n| Referencing non-existent secret | Create the secret first via secrets API |\n| Targeting non-existent function | Verify function exists and is `active` before scheduling |\n| Schedule not running | Check `isActive` is `true` and cron expression is valid |\n\n#### Recommended Workflow\n\n```\n1. Create secrets if needed     -> `npx @insforge\u002Fcli secrets add KEY VALUE`\n2. Create\u002Fverify target function -> `npx @insforge\u002Fcli functions list`\n3. Create schedule              -> `npx @insforge\u002Fcli schedules create`\n4. Verify schedule is active    -> `npx @insforge\u002Fcli schedules get \u003Cid>`\n5. Monitor execution logs       -> `npx @insforge\u002Fcli schedules logs \u003Cid>`\n```\n\n### Diagnose backend health\n\n```bash\n# Full health report (all checks)\nnpx @insforge\u002Fcli diagnose\n\n# Check specific areas\nnpx @insforge\u002Fcli diagnose metrics --range 24h          # CPU\u002Fmemory\u002Fdisk over last 24h\nnpx @insforge\u002Fcli diagnose advisor --severity critical   # critical issues only\nnpx @insforge\u002Fcli diagnose db --check bloat,slow-queries # specific DB checks\nnpx @insforge\u002Fcli diagnose logs                          # aggregate errors from all sources\n```\n\n### Debug with logs\n\n```bash\nnpx @insforge\u002Fcli logs function.logs          # function execution issues\nnpx @insforge\u002Fcli logs postgres.logs          # database query problems\nnpx @insforge\u002Fcli logs insforge.logs          # API \u002F auth errors\nnpx @insforge\u002Fcli logs postgrest.logs --limit 50\n```\n\n#### Best Practices\n\n1. **Start with function.logs for function issues**\n   - Check execution errors, timeouts, and runtime exceptions\n\n2. **Use postgres.logs for query problems**\n   - Debug slow queries, constraint violations, connection issues\n\n3. **Check insforge.logs for API errors**\n   - Authentication failures, request validation, general backend errors\n\n#### Common Debugging Scenarios\n\n| Problem | Check |\n|---------|-------|\n| Function not working | `function.logs` |\n| Database query failing | `postgres.logs`, `postgREST.logs` |\n| Auth issues | `insforge.logs` |\n| API returning 500 errors | `insforge.logs`, `postgREST.logs` |\n| General health \u002F performance | `diagnose` (full report) or `diagnose metrics` |\n| Database bloat \u002F slow queries | `diagnose db` |\n| Security \u002F config issues | `diagnose advisor --category security` |\n| Compute service not starting | `compute events \u003Cid>` (machine lifecycle events) |\n| Compute source-mode deploy failed | Verify `flyctl` is on PATH (`flyctl version`); the per-app deploy token has a 20-min TTL — re-run if expired. Use `--image \u003Curl>` with a pre-built image to skip flyctl entirely. |\n| Compute image-mode deploy failed | Confirm the image is publicly pullable (private registries need per-project credential setup) |\n\n### Non-interactive CI\u002FCD\n\n```bash\nINSFORGE_EMAIL=$EMAIL INSFORGE_PASSWORD=$PASSWORD npx @insforge\u002Fcli login --email -y\nnpx @insforge\u002Fcli link --project-id $PROJECT_ID --org-id $ORG_ID -y\nnpx @insforge\u002Fcli db query \"SELECT count(*) FROM users\" --json\n```\n\n---\n\n## Project Configuration\n\nAfter `create` or `link`, `.insforge\u002Fproject.json` is created:\n\n```json\n{\n  \"project_id\": \"...\",\n  \"appkey\": \"...\",\n  \"region\": \"us-east\",\n  \"api_key\": \"ik_...\",\n  \"oss_host\": \"https:\u002F\u002F{appkey}.{region}.insforge.app\"\n}\n```\n\n`oss_host` is the base URL for all SDK and API operations. `api_key` is the full-access admin key for backend API calls, equivalent to a service role key on other platforms.\n\n> **Never commit this file to version control or share it publicly**.\n> Do not edit this file manually. Use `npx @insforge\u002Fcli link` to switch projects.\n",{"name":5,"license":14,"metadata":23,"description":7},{"date":24,"author":25,"version":26,"organization":27},"May 2026","insforge","1.5.0","InsForge","main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Finsforge-cli",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add agisota\u002Fold-one --skill insforge-cli",{"tool":43,"command":44},"bunx","bunx skills add agisota\u002Fold-one --skill insforge-cli",{"tool":46,"command":47},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill insforge-cli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002FSKILL.md",true,[51,57,61,65,69,73,77,81,85,89,93,97,101,105,109],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fbranch-merge.md","REFERENCE","参考文档",7256,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fbranch-merge.md",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fbranch-reset.md",4641,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fbranch-reset.md",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fbranch.md",6674,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fbranch.md",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fcompute-deploy.md",16318,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fcompute-deploy.md",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fconfig.md",2467,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fconfig.md",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fcreate.md",1723,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fcreate.md",{"path":78,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fdb-export.md",1124,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fdb-export.md",{"path":82,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fdb-import.md",680,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fdb-import.md",{"path":86,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fdb-migrations.md",7848,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fdb-migrations.md",{"path":90,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fdb-query.md",2554,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fdb-query.md",{"path":94,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fdeployments-deploy.md",7779,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fdeployments-deploy.md",{"path":98,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Ffunctions-deploy.md",5512,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Ffunctions-deploy.md",{"path":102,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Flogin.md",1329,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Flogin.md",{"path":106,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Fpayments.md",8924,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fpayments.md",{"path":110,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":111,"sourceHtmlUrl":112},"references\u002Fposthog.md",6529,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-cli\u002Freferences\u002Fposthog.md",[114,121,128,137,144,151],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":132,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]