From 848e3e93e8ac9e8dffaf320d98549f388ea6e3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?batuhan=20i=C3=A7=C3=B6z?= Date: Thu, 26 Nov 2026 21:23:56 +0000 Subject: [PATCH 01/17] Restructure docs content into the five-tab information architecture Move every authored page into its new section folder (Get started, Build, Deploy, Domains & routing, Operate, Teams & account, Guides, Agents, Reference, Platforms), rewrite the folder meta files for the new order, and delete the pages this overhaul retires: the WordPress pages, the Eleventy recipe, the Glitch and Val Town migrations, the share-an-artifact agent pages, the hand-authored client setup duplicates, and the 23 CLI subpages the generated CLI reference replaces. --- .../(labs)}/design-system.mdx | 0 content/(account)/(labs)/meta.ts | 3 + content/(account)/meta.ts | 16 +- content/{(concepts) => (account)}/teams.mdx | 0 content/{(dynamic) => (build)}/connectors.mdx | 0 content/{(dynamic) => (build)}/crons.mdx | 0 content/{(dynamic) => (build)}/database.mdx | 0 .../environment-variables.mdx | 0 content/{(dynamic) => (build)}/functions.mdx | 0 content/(build)/meta.ts | 19 + .../{(dynamic) => (build)}/object-storage.mdx | 0 .../zero-migration.mdx} | 0 content/(concepts)/meta.ts | 8 - content/{(publish) => (deploy)}/ci.mdx | 0 content/{(publish) => (deploy)}/git.mdx | 0 content/(deploy)/meta.ts | 3 + content/{(publish) => (deploy)}/publish.mdx | 0 content/{(concepts) => (deploy)}/versions.mdx | 0 content/(dynamic)/meta.ts | 8 - content/(dynamic)/wordpress.mdx | 153 ---- content/(get-started)/meta.ts | 3 + content/{ => (get-started)}/quickstart.mdx | 0 .../{(concepts) => (get-started)}/spaces.mdx | 0 content/{(serve) => (operate)}/comments.mdx | 0 .../{(reference) => (operate)}/feedback.mdx | 0 .../infrastructure/automated-failover.mdx | 0 .../infrastructure/ddos-protection.mdx | 0 .../infrastructure/defensive-mode.mdx | 0 .../domain-verification-records.mdx | 0 .../infrastructure/edge-request-logs.mdx | 0 .../infrastructure/filesystem-permissions.mdx | 0 .../infrastructure/http-security-headers.mdx | 0 .../{ => (operate)}/infrastructure/index.mdx | 0 .../infrastructure/ip-ranges.mdx | 0 .../{ => (operate)}/infrastructure/meta.ts | 0 .../infrastructure/origin-edge-servers.mdx | 0 .../infrastructure/rate-limiting.mdx | 0 .../infrastructure/server-specs-settings.mdx | 0 .../infrastructure/tls-certificates.mdx | 0 content/{(dynamic) => (operate)}/logs.mdx | 0 content/(operate)/meta.ts | 23 + content/{(serve) => (operate)}/share.mdx | 0 content/{(serve) => (operate)}/stats.mdx | 0 content/{ => (operate)}/troubleshooting.mdx | 0 content/(publish)/meta.ts | 18 - content/(publish)/migrate-from/glitch.mdx | 45 - content/(publish)/migrate-from/meta.ts | 16 - content/(publish)/migrate-from/val-town.mdx | 46 - content/(publish)/recipes/eleventy.mdx | 53 -- content/(publish)/recipes/meta.ts | 7 - content/(publish)/wordpress-data-sources.mdx | 125 --- .../{ => (reference)}/api/authentication.mdx | 0 content/{ => (reference)}/api/connectors.mdx | 0 content/{ => (reference)}/api/errors.mdx | 0 content/{ => (reference)}/api/idempotency.mdx | 0 content/{ => (reference)}/api/index.mdx | 0 .../api/long-running-operations.mdx | 0 content/{ => (reference)}/api/meta.ts | 6 +- content/{ => (reference)}/api/pagination.mdx | 0 content/{ => (reference)}/api/rate-limits.mdx | 0 content/{ => (reference)}/api/sdk.mdx | 0 content/{ => (reference)}/api/webhooks.mdx | 0 content/{ => (reference)}/cli/index.mdx | 0 content/(reference)/cli/meta.ts | 3 + content/(reference)/meta.ts | 3 +- content/{(serve) => (routing)}/caching.mdx | 0 .../{(serve) => (routing)}/customization.mdx | 0 .../domains/index.mdx} | 0 content/(routing)/domains/meta.ts | 3 + .../domains/registration.mdx} | 0 .../{(serve) => (routing)/domains}/urls.mdx | 1 + .../error-pages.mdx} | 0 content/(routing)/meta.ts | 3 + .../routing.mdx => (routing)/redirects.mdx} | 0 .../{(serve) => (routing)}/traffic-rules.mdx | 0 content/(serve)/meta.ts | 20 - .../anonymous-and-claim.mdx | 0 content/agents/claude-code.mdx | 132 --- content/agents/claude-desktop.mdx | 87 -- content/agents/codex.mdx | 93 -- content/agents/cursor.mdx | 98 --- content/agents/meta.ts | 12 +- content/agents/other-clients.mdx | 140 --- content/agents/sf-setup.mdx | 110 --- content/agents/share-chatgpt-html.mdx | 44 - content/agents/share-claude-artifact.mdx | 38 - content/cli/agent-commands.mdx | 307 ------- content/cli/agents.mdx | 226 ----- content/cli/api-keys.mdx | 164 ---- content/cli/api.mdx | 100 --- content/cli/builds.mdx | 280 ------ content/cli/comments.mdx | 510 ----------- content/cli/connectors.mdx | 798 ------------------ content/cli/db.mdx | 266 ------ content/cli/domains.mdx | 335 -------- content/cli/env.mdx | 186 ---- content/cli/git.mdx | 281 ------ content/cli/login.mdx | 213 ----- content/cli/meta.ts | 32 - content/cli/operations.mdx | 139 --- content/cli/project.mdx | 317 ------- content/cli/publish.mdx | 318 ------- content/cli/rules.mdx | 331 -------- content/cli/share.mdx | 335 -------- content/cli/source.mdx | 427 ---------- content/cli/spaces.mdx | 514 ----------- content/cli/storage.mdx | 214 ----- content/cli/teams.mdx | 361 -------- content/cli/versions.mdx | 371 -------- content/cli/zero.mdx | 337 -------- content/{(publish) => guides}/frameworks.mdx | 0 content/guides/meta.ts | 7 + .../migrate-from/cloudflare-pages.mdx | 0 .../migrate-from/github-pages.mdx | 0 .../migrate-from/here-now.mdx | 0 .../migrate-from/index.mdx | 0 content/guides/migrate-from/meta.ts | 7 + .../migrate-from/netlify.mdx | 0 .../migrate-from/vercel.mdx | 0 content/{(publish) => guides}/migrate.mdx | 0 .../{(publish) => guides}/recipes/astro.mdx | 0 .../{(publish) => guides}/recipes/html.mdx | 0 content/guides/recipes/meta.ts | 3 + .../{(publish) => guides}/recipes/next.mdx | 0 .../{(publish) => guides}/recipes/vite.mdx | 0 content/meta.ts | 18 +- content/platforms/meta.ts | 5 +- content/platforms/partner-api/meta.ts | 6 +- 128 files changed, 111 insertions(+), 8636 deletions(-) rename content/{(concepts) => (account)/(labs)}/design-system.mdx (100%) create mode 100644 content/(account)/(labs)/meta.ts rename content/{(concepts) => (account)}/teams.mdx (100%) rename content/{(dynamic) => (build)}/connectors.mdx (100%) rename content/{(dynamic) => (build)}/crons.mdx (100%) rename content/{(dynamic) => (build)}/database.mdx (100%) rename content/{(dynamic) => (build)}/environment-variables.mdx (100%) rename content/{(dynamic) => (build)}/functions.mdx (100%) create mode 100644 content/(build)/meta.ts rename content/{(dynamic) => (build)}/object-storage.mdx (100%) rename content/{(dynamic)/zero-runtime.mdx => (build)/zero-migration.mdx} (100%) delete mode 100644 content/(concepts)/meta.ts rename content/{(publish) => (deploy)}/ci.mdx (100%) rename content/{(publish) => (deploy)}/git.mdx (100%) create mode 100644 content/(deploy)/meta.ts rename content/{(publish) => (deploy)}/publish.mdx (100%) rename content/{(concepts) => (deploy)}/versions.mdx (100%) delete mode 100644 content/(dynamic)/meta.ts delete mode 100644 content/(dynamic)/wordpress.mdx create mode 100644 content/(get-started)/meta.ts rename content/{ => (get-started)}/quickstart.mdx (100%) rename content/{(concepts) => (get-started)}/spaces.mdx (100%) rename content/{(serve) => (operate)}/comments.mdx (100%) rename content/{(reference) => (operate)}/feedback.mdx (100%) rename content/{ => (operate)}/infrastructure/automated-failover.mdx (100%) rename content/{ => (operate)}/infrastructure/ddos-protection.mdx (100%) rename content/{ => (operate)}/infrastructure/defensive-mode.mdx (100%) rename content/{ => (operate)}/infrastructure/domain-verification-records.mdx (100%) rename content/{ => (operate)}/infrastructure/edge-request-logs.mdx (100%) rename content/{ => (operate)}/infrastructure/filesystem-permissions.mdx (100%) rename content/{ => (operate)}/infrastructure/http-security-headers.mdx (100%) rename content/{ => (operate)}/infrastructure/index.mdx (100%) rename content/{ => (operate)}/infrastructure/ip-ranges.mdx (100%) rename content/{ => (operate)}/infrastructure/meta.ts (100%) rename content/{ => (operate)}/infrastructure/origin-edge-servers.mdx (100%) rename content/{ => (operate)}/infrastructure/rate-limiting.mdx (100%) rename content/{ => (operate)}/infrastructure/server-specs-settings.mdx (100%) rename content/{ => (operate)}/infrastructure/tls-certificates.mdx (100%) rename content/{(dynamic) => (operate)}/logs.mdx (100%) create mode 100644 content/(operate)/meta.ts rename content/{(serve) => (operate)}/share.mdx (100%) rename content/{(serve) => (operate)}/stats.mdx (100%) rename content/{ => (operate)}/troubleshooting.mdx (100%) delete mode 100644 content/(publish)/meta.ts delete mode 100644 content/(publish)/migrate-from/glitch.mdx delete mode 100644 content/(publish)/migrate-from/meta.ts delete mode 100644 content/(publish)/migrate-from/val-town.mdx delete mode 100644 content/(publish)/recipes/eleventy.mdx delete mode 100644 content/(publish)/recipes/meta.ts delete mode 100644 content/(publish)/wordpress-data-sources.mdx rename content/{ => (reference)}/api/authentication.mdx (100%) rename content/{ => (reference)}/api/connectors.mdx (100%) rename content/{ => (reference)}/api/errors.mdx (100%) rename content/{ => (reference)}/api/idempotency.mdx (100%) rename content/{ => (reference)}/api/index.mdx (100%) rename content/{ => (reference)}/api/long-running-operations.mdx (100%) rename content/{ => (reference)}/api/meta.ts (82%) rename content/{ => (reference)}/api/pagination.mdx (100%) rename content/{ => (reference)}/api/rate-limits.mdx (100%) rename content/{ => (reference)}/api/sdk.mdx (100%) rename content/{ => (reference)}/api/webhooks.mdx (100%) rename content/{ => (reference)}/cli/index.mdx (100%) create mode 100644 content/(reference)/cli/meta.ts rename content/{(serve) => (routing)}/caching.mdx (100%) rename content/{(serve) => (routing)}/customization.mdx (100%) rename content/{(serve)/domains.mdx => (routing)/domains/index.mdx} (100%) create mode 100644 content/(routing)/domains/meta.ts rename content/{(serve)/buy-domains.mdx => (routing)/domains/registration.mdx} (100%) rename content/{(serve) => (routing)/domains}/urls.mdx (99%) rename content/{(serve)/site-pages.mdx => (routing)/error-pages.mdx} (100%) create mode 100644 content/(routing)/meta.ts rename content/{(serve)/routing.mdx => (routing)/redirects.mdx} (100%) rename content/{(serve) => (routing)}/traffic-rules.mdx (100%) delete mode 100644 content/(serve)/meta.ts rename content/{(publish) => agents}/anonymous-and-claim.mdx (100%) delete mode 100644 content/agents/claude-code.mdx delete mode 100644 content/agents/claude-desktop.mdx delete mode 100644 content/agents/codex.mdx delete mode 100644 content/agents/cursor.mdx delete mode 100644 content/agents/other-clients.mdx delete mode 100644 content/agents/sf-setup.mdx delete mode 100644 content/agents/share-chatgpt-html.mdx delete mode 100644 content/agents/share-claude-artifact.mdx delete mode 100644 content/cli/agent-commands.mdx delete mode 100644 content/cli/agents.mdx delete mode 100644 content/cli/api-keys.mdx delete mode 100644 content/cli/api.mdx delete mode 100644 content/cli/builds.mdx delete mode 100644 content/cli/comments.mdx delete mode 100644 content/cli/connectors.mdx delete mode 100644 content/cli/db.mdx delete mode 100644 content/cli/domains.mdx delete mode 100644 content/cli/env.mdx delete mode 100644 content/cli/git.mdx delete mode 100644 content/cli/login.mdx delete mode 100644 content/cli/meta.ts delete mode 100644 content/cli/operations.mdx delete mode 100644 content/cli/project.mdx delete mode 100644 content/cli/publish.mdx delete mode 100644 content/cli/rules.mdx delete mode 100644 content/cli/share.mdx delete mode 100644 content/cli/source.mdx delete mode 100644 content/cli/spaces.mdx delete mode 100644 content/cli/storage.mdx delete mode 100644 content/cli/teams.mdx delete mode 100644 content/cli/versions.mdx delete mode 100644 content/cli/zero.mdx rename content/{(publish) => guides}/frameworks.mdx (100%) create mode 100644 content/guides/meta.ts rename content/{(publish) => guides}/migrate-from/cloudflare-pages.mdx (100%) rename content/{(publish) => guides}/migrate-from/github-pages.mdx (100%) rename content/{(publish) => guides}/migrate-from/here-now.mdx (100%) rename content/{(publish) => guides}/migrate-from/index.mdx (100%) create mode 100644 content/guides/migrate-from/meta.ts rename content/{(publish) => guides}/migrate-from/netlify.mdx (100%) rename content/{(publish) => guides}/migrate-from/vercel.mdx (100%) rename content/{(publish) => guides}/migrate.mdx (100%) rename content/{(publish) => guides}/recipes/astro.mdx (100%) rename content/{(publish) => guides}/recipes/html.mdx (100%) create mode 100644 content/guides/recipes/meta.ts rename content/{(publish) => guides}/recipes/next.mdx (100%) rename content/{(publish) => guides}/recipes/vite.mdx (100%) diff --git a/content/(concepts)/design-system.mdx b/content/(account)/(labs)/design-system.mdx similarity index 100% rename from content/(concepts)/design-system.mdx rename to content/(account)/(labs)/design-system.mdx diff --git a/content/(account)/(labs)/meta.ts b/content/(account)/(labs)/meta.ts new file mode 100644 index 00000000..b32892d6 --- /dev/null +++ b/content/(account)/(labs)/meta.ts @@ -0,0 +1,3 @@ +import { defineMeta } from "blume"; + +export default defineMeta({ title: "Labs", collapsed: true, pages: ["labs", "team-memories", "team-skills", "design-system"] }); diff --git a/content/(account)/meta.ts b/content/(account)/meta.ts index 96b0ad27..646e3809 100644 --- a/content/(account)/meta.ts +++ b/content/(account)/meta.ts @@ -1,8 +1,18 @@ import { defineMeta } from "blume"; export default defineMeta({ - title: "Account", + title: "Teams & account", collapsed: false, - order: 6, - pages: ["authentication", "api-keys", "identity-connections", "auto-enroll", "subteams", "pricing", "billing", "usage"], + pages: [ + "teams", + "subteams", + "auto-enroll", + "authentication", + "api-keys", + "identity-connections", + "billing", + "pricing", + "usage", + "labs", + ], }); diff --git a/content/(concepts)/teams.mdx b/content/(account)/teams.mdx similarity index 100% rename from content/(concepts)/teams.mdx rename to content/(account)/teams.mdx diff --git a/content/(dynamic)/connectors.mdx b/content/(build)/connectors.mdx similarity index 100% rename from content/(dynamic)/connectors.mdx rename to content/(build)/connectors.mdx diff --git a/content/(dynamic)/crons.mdx b/content/(build)/crons.mdx similarity index 100% rename from content/(dynamic)/crons.mdx rename to content/(build)/crons.mdx diff --git a/content/(dynamic)/database.mdx b/content/(build)/database.mdx similarity index 100% rename from content/(dynamic)/database.mdx rename to content/(build)/database.mdx diff --git a/content/(dynamic)/environment-variables.mdx b/content/(build)/environment-variables.mdx similarity index 100% rename from content/(dynamic)/environment-variables.mdx rename to content/(build)/environment-variables.mdx diff --git a/content/(dynamic)/functions.mdx b/content/(build)/functions.mdx similarity index 100% rename from content/(dynamic)/functions.mdx rename to content/(build)/functions.mdx diff --git a/content/(build)/meta.ts b/content/(build)/meta.ts new file mode 100644 index 00000000..a25fffce --- /dev/null +++ b/content/(build)/meta.ts @@ -0,0 +1,19 @@ +import { defineMeta } from "blume"; + +export default defineMeta({ + title: "Build", + collapsed: false, + pages: [ + "build", + "collections", + "actions", + "database", + "functions", + "email", + "object-storage", + "crons", + "environment-variables", + "connectors", + "zero-migration", + ], +}); diff --git a/content/(dynamic)/object-storage.mdx b/content/(build)/object-storage.mdx similarity index 100% rename from content/(dynamic)/object-storage.mdx rename to content/(build)/object-storage.mdx diff --git a/content/(dynamic)/zero-runtime.mdx b/content/(build)/zero-migration.mdx similarity index 100% rename from content/(dynamic)/zero-runtime.mdx rename to content/(build)/zero-migration.mdx diff --git a/content/(concepts)/meta.ts b/content/(concepts)/meta.ts deleted file mode 100644 index c9f8cda6..00000000 --- a/content/(concepts)/meta.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { defineMeta } from "blume"; - -export default defineMeta({ - title: "Concepts", - collapsed: false, - order: 2, - pages: ["spaces", "versions", "teams", "design-system"], -}); diff --git a/content/(publish)/ci.mdx b/content/(deploy)/ci.mdx similarity index 100% rename from content/(publish)/ci.mdx rename to content/(deploy)/ci.mdx diff --git a/content/(publish)/git.mdx b/content/(deploy)/git.mdx similarity index 100% rename from content/(publish)/git.mdx rename to content/(deploy)/git.mdx diff --git a/content/(deploy)/meta.ts b/content/(deploy)/meta.ts new file mode 100644 index 00000000..8cd9b40a --- /dev/null +++ b/content/(deploy)/meta.ts @@ -0,0 +1,3 @@ +import { defineMeta } from "blume"; + +export default defineMeta({ title: "Deploy", collapsed: false, pages: ["publish", "channels", "versions", "git", "ci"] }); diff --git a/content/(publish)/publish.mdx b/content/(deploy)/publish.mdx similarity index 100% rename from content/(publish)/publish.mdx rename to content/(deploy)/publish.mdx diff --git a/content/(concepts)/versions.mdx b/content/(deploy)/versions.mdx similarity index 100% rename from content/(concepts)/versions.mdx rename to content/(deploy)/versions.mdx diff --git a/content/(dynamic)/meta.ts b/content/(dynamic)/meta.ts deleted file mode 100644 index 92d186e2..00000000 --- a/content/(dynamic)/meta.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { defineMeta } from "blume"; - -export default defineMeta({ - title: "Dynamic", - collapsed: false, - order: 5, - pages: ["zero-runtime", "functions", "connectors", "database", "environment-variables", "crons", "object-storage", "logs", "wordpress"], -}); diff --git a/content/(dynamic)/wordpress.mdx b/content/(dynamic)/wordpress.mdx deleted file mode 100644 index a12e1c9e..00000000 --- a/content/(dynamic)/wordpress.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: WordPress on every Space -description: Every Space runs a WordPress behind its static files. Run WP-CLI against it, call its Abilities with a short-lived token, and open its database. ---- - -Every Space includes a WordPress install behind its published files. Reach it through `sf wp` or its published Abilities. - -Your published files are served in front of WordPress, so a static Space never uses it or pays for it. WordPress runs the dynamic features: [Zero](/zero-runtime) apps run on it, [Storage](/object-storage) is its media library, and [Database](/database) is its MySQL. You can reach it directly in two ways. - -## `sf wp` - -`sf wp` runs WP-CLI directly for anything Spacefast doesn't have a dedicated command for. - -```bash -sf wp option get blogname -sf wp --space docs plugin list --format=csv -sf wp core version -``` - -Everything after `sf`'s own flags is handed to `wp` unchanged. `--format=csv` above reaches WP-CLI, not `sf`. - -### The `--` rule - -`sf` stops claiming flags at the first token that is not one of its own, and `--` ends the argument outright. So a `wp` flag can't collide with an `sf` flag by accident. To pass `--path` or `--space` to `wp`, put it after `--` or after any positional argument. - -```bash -sf wp -- --version -``` - -Without the separator, `--version` would be read as `sf`'s own. - -### Remote and local behave differently - -| | Remote, the default | `--local` | -| --- | --- | --- | -| Runs against | The Space's WordPress | A WordPress on your machine | -| WP-CLI's output | Not returned | Streamed straight through | -| Exit code | 1 when the command failed | WP-CLI's own | -| Needs | Write access to the Space | `php` on your `PATH` | - -The local path runs a pinned `wp-cli.phar` as a child process with inherited stdio, so it is a true passthrough. Interactive commands, pagers, and colored output all work. - -The remote path cannot be. The host runs WP-CLI as a job against the site and reports whether it exited zero. No channel carries what the command printed. Rather than fake a stream, `sf wp` says so: - -```text -✓ wp option get blogname on docs in 1840ms -The host runs WP-CLI as a job and does not return its output; only success or failure. -Run with --local against a local WordPress to see what the command prints. -``` - -When you need the bytes, run the same command locally, or use `sf db` and the database console. - -```bash -sf wp --local --path ./wordpress core version -``` - -`--path` implies `--local`. Missing PHP fails with `wp_cli_php_missing`; WP-CLI ships as a PHAR, so it needs PHP 7.2 or newer. - -### Flags, limits, and access - -`--mode limited` skips the site's own themes and plugins, so a core command still answers on a site whose own code is broken. `--mode full` is the default and is what most commands need. - -`--json` wraps only Spacefast's own errors, a Space that will not resolve or a host that will not answer. It never wraps `wp`'s output. - -| Limit | Value | -| --- | --- | -| Arguments per command | 64 | -| Characters per argument | 4,096 | -| Run time before the API gives up | 360 seconds, answering `wp_cli_timeout` | - -A remote run needs write access to the Space, because a `wp` command has unrestricted authority over the site's data. Every run is written to the Space's activity trail, successful or not. A run whose outcome could not be determined is recorded as such. A Space that has not been provisioned yet answers `runtime_not_provisioned`. - -The API route is `runSpaceWpCliCommand`. It takes an already-split argument vector, `["option", "get", "blogname"]`, relayed verbatim. No shell parses it, so nothing re-splits, re-globs, or re-quotes what you send. - -## Abilities - -An Ability is a named operation with a schema that the Space's WordPress publishes for agents to call. Some come from the runtime itself and exist on every Space. - -```bash -sf zero abilities -``` - -The table prints `ABILITY | CATEGORY | MODE | REQUIRES`. The `REQUIRES` column is what answers "why did that come back 403". - -### Storage Abilities - -Five Abilities in the `zero-storage` category are registered by the runtime, so every Space publishes them whether or not it has ever published an app. They are the media library, the same objects [Storage](/object-storage) manages. - -| Ability | Mode | Does | Needs | -| --- | --- | --- | --- | -| `zero/storage-list` | read | Lists the files in the Space, optionally within one folder | `upload_files` | -| `zero/storage-get` | read | Reads one file's id, filename, URL, MIME type, folder, dimensions, and size | `upload_files` | -| `zero/storage-upload` | write | Stores a file from base64 content, optionally in a folder | `upload_files` | -| `zero/storage-move` | write | Moves a file into a folder, creating the folder path if needed | `edit_post` | -| `zero/storage-delete` | write | Trashes a file. It leaves every listing and stays recoverable | `delete_post` | - -The "Needs" column is a WordPress capability. The Space projects it from the calling credential's Grant, so what a credential may do is decided per request against the path it asked for. See [Spacefast Share](/share). - -WordPress decides which file types `zero/storage-upload` accepts. - -### Call one - -```bash -sf zero call zero/storage-list -sf zero call zero/storage-list --input '{"folder":"press","perPage":20}' -sf zero call zero/storage-upload --input @upload.json -``` - -`sf zero call` mints a short-lived token for the Space, runs the Ability against the Space's own WordPress REST API, and prints the HTTP status and the JSON result. The token is never printed and never appears in the `--json` receipt. - -`--input` takes inline JSON or `@path` to read it from a file. `--credential mch_...` picks a machine credential when the Space has more than one. A non-2xx answer is `zero_ability_failed` and exits 1, with the whole receipt in `details`. A 403 means the credential's Grant does not permit that Ability. - -### Mint a token yourself - -An agent working from the API does the same thing in two calls. - -```bash -curl -X POST https://api.spacefast.com/v1/spaces/spc_xxxxxxxx/zero/token \ - -H "Authorization: Bearer sfa_xxxxxxxxxxxxxxxxxxxxxxxx" \ - -H "Content-Type: application/json" \ - -d '{ "credentialId": "mch_xxxxxxxx", "ttlSeconds": 900 }' -``` - -`createSpaceZeroToken` turns your platform credential into a bearer carrying one machine credential's authority. You never need that credential's own secret. The response carries the `token`, its `expiresAt`, the `host` it is bound to, the `endpoint` (the Space's `/wp-json` root), the `capabilities` it should get, and the WordPress `role` those project to. - -| Field | Value | -| --- | --- | -| `credentialId` | A live `mch_` machine credential of this Space. Required | -| `ttlSeconds` | 60 to 3,600. Defaults to 900 | - -Send the token to the Space in `X-SF-Authorization`, never in `Authorization`: - -```bash -curl -X POST \ - https://my-site.space.fast/wp-json/wp-abilities/v1/abilities/zero/storage-list/run \ - -H "X-SF-Authorization: Bearer " \ - -H "Content-Type: application/json" \ - -d '{ "perPage": 20 }' -``` - -The plain `Authorization` header belongs to your application and passes through untouched. That's why the platform's bearer takes a header of its own. - -The token is bound to the host the Space serves on, and the runtime re-derives what it may do from the credential's Grant on every request. The `capabilities` in the response are what to expect, not a promise: a credential scoped away from a path answers there with less, never with more. - -`listSpaceZeroAbilities` is the API side of `sf zero abilities`. - -## The database - -The same WordPress owns a MySQL database. `sf db` reads its schema and rows, and the dashboard mints a single-use SQL console URL for raw queries. See [Database](/database). - -## Next steps - -To read WordPress content from another app, use [WordPress data sources](/wordpress-data-sources). diff --git a/content/(get-started)/meta.ts b/content/(get-started)/meta.ts new file mode 100644 index 00000000..c204834c --- /dev/null +++ b/content/(get-started)/meta.ts @@ -0,0 +1,3 @@ +import { defineMeta } from "blume"; + +export default defineMeta({ title: "Get started", collapsed: false, pages: ["quickstart", "spaces", "request-lifecycle"] }); diff --git a/content/quickstart.mdx b/content/(get-started)/quickstart.mdx similarity index 100% rename from content/quickstart.mdx rename to content/(get-started)/quickstart.mdx diff --git a/content/(concepts)/spaces.mdx b/content/(get-started)/spaces.mdx similarity index 100% rename from content/(concepts)/spaces.mdx rename to content/(get-started)/spaces.mdx diff --git a/content/(serve)/comments.mdx b/content/(operate)/comments.mdx similarity index 100% rename from content/(serve)/comments.mdx rename to content/(operate)/comments.mdx diff --git a/content/(reference)/feedback.mdx b/content/(operate)/feedback.mdx similarity index 100% rename from content/(reference)/feedback.mdx rename to content/(operate)/feedback.mdx diff --git a/content/infrastructure/automated-failover.mdx b/content/(operate)/infrastructure/automated-failover.mdx similarity index 100% rename from content/infrastructure/automated-failover.mdx rename to content/(operate)/infrastructure/automated-failover.mdx diff --git a/content/infrastructure/ddos-protection.mdx b/content/(operate)/infrastructure/ddos-protection.mdx similarity index 100% rename from content/infrastructure/ddos-protection.mdx rename to content/(operate)/infrastructure/ddos-protection.mdx diff --git a/content/infrastructure/defensive-mode.mdx b/content/(operate)/infrastructure/defensive-mode.mdx similarity index 100% rename from content/infrastructure/defensive-mode.mdx rename to content/(operate)/infrastructure/defensive-mode.mdx diff --git a/content/infrastructure/domain-verification-records.mdx b/content/(operate)/infrastructure/domain-verification-records.mdx similarity index 100% rename from content/infrastructure/domain-verification-records.mdx rename to content/(operate)/infrastructure/domain-verification-records.mdx diff --git a/content/infrastructure/edge-request-logs.mdx b/content/(operate)/infrastructure/edge-request-logs.mdx similarity index 100% rename from content/infrastructure/edge-request-logs.mdx rename to content/(operate)/infrastructure/edge-request-logs.mdx diff --git a/content/infrastructure/filesystem-permissions.mdx b/content/(operate)/infrastructure/filesystem-permissions.mdx similarity index 100% rename from content/infrastructure/filesystem-permissions.mdx rename to content/(operate)/infrastructure/filesystem-permissions.mdx diff --git a/content/infrastructure/http-security-headers.mdx b/content/(operate)/infrastructure/http-security-headers.mdx similarity index 100% rename from content/infrastructure/http-security-headers.mdx rename to content/(operate)/infrastructure/http-security-headers.mdx diff --git a/content/infrastructure/index.mdx b/content/(operate)/infrastructure/index.mdx similarity index 100% rename from content/infrastructure/index.mdx rename to content/(operate)/infrastructure/index.mdx diff --git a/content/infrastructure/ip-ranges.mdx b/content/(operate)/infrastructure/ip-ranges.mdx similarity index 100% rename from content/infrastructure/ip-ranges.mdx rename to content/(operate)/infrastructure/ip-ranges.mdx diff --git a/content/infrastructure/meta.ts b/content/(operate)/infrastructure/meta.ts similarity index 100% rename from content/infrastructure/meta.ts rename to content/(operate)/infrastructure/meta.ts diff --git a/content/infrastructure/origin-edge-servers.mdx b/content/(operate)/infrastructure/origin-edge-servers.mdx similarity index 100% rename from content/infrastructure/origin-edge-servers.mdx rename to content/(operate)/infrastructure/origin-edge-servers.mdx diff --git a/content/infrastructure/rate-limiting.mdx b/content/(operate)/infrastructure/rate-limiting.mdx similarity index 100% rename from content/infrastructure/rate-limiting.mdx rename to content/(operate)/infrastructure/rate-limiting.mdx diff --git a/content/infrastructure/server-specs-settings.mdx b/content/(operate)/infrastructure/server-specs-settings.mdx similarity index 100% rename from content/infrastructure/server-specs-settings.mdx rename to content/(operate)/infrastructure/server-specs-settings.mdx diff --git a/content/infrastructure/tls-certificates.mdx b/content/(operate)/infrastructure/tls-certificates.mdx similarity index 100% rename from content/infrastructure/tls-certificates.mdx rename to content/(operate)/infrastructure/tls-certificates.mdx diff --git a/content/(dynamic)/logs.mdx b/content/(operate)/logs.mdx similarity index 100% rename from content/(dynamic)/logs.mdx rename to content/(operate)/logs.mdx diff --git a/content/(operate)/meta.ts b/content/(operate)/meta.ts new file mode 100644 index 00000000..8acec961 --- /dev/null +++ b/content/(operate)/meta.ts @@ -0,0 +1,23 @@ +import { defineMeta } from "blume"; + +export default defineMeta({ + title: "Operate", + collapsed: false, + pages: [ + "share", + "sso", + "comments", + "stats", + "tag-manager", + "logs", + "activity", + "exports", + "space-transfers", + "security", + "production-checklist", + "performance", + "troubleshooting", + "feedback", + "infrastructure", + ], +}); diff --git a/content/(serve)/share.mdx b/content/(operate)/share.mdx similarity index 100% rename from content/(serve)/share.mdx rename to content/(operate)/share.mdx diff --git a/content/(serve)/stats.mdx b/content/(operate)/stats.mdx similarity index 100% rename from content/(serve)/stats.mdx rename to content/(operate)/stats.mdx diff --git a/content/troubleshooting.mdx b/content/(operate)/troubleshooting.mdx similarity index 100% rename from content/troubleshooting.mdx rename to content/(operate)/troubleshooting.mdx diff --git a/content/(publish)/meta.ts b/content/(publish)/meta.ts deleted file mode 100644 index 129b14d7..00000000 --- a/content/(publish)/meta.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { defineMeta } from "blume"; - -export default defineMeta({ - title: "Publish", - collapsed: false, - order: 3, - pages: [ - "publish", - "frameworks", - "anonymous-and-claim", - "git", - "ci", - "wordpress-data-sources", - "recipes", - "migrate", - "migrate-from", - ], -}); diff --git a/content/(publish)/migrate-from/glitch.mdx b/content/(publish)/migrate-from/glitch.mdx deleted file mode 100644 index 5482a96e..00000000 --- a/content/(publish)/migrate-from/glitch.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Move from Glitch -description: Publish a Glitch project you downloaded on Spacefast. Static projects publish as they are; a Node server is rewritten as Functions routes ---- - -Glitch stopped serving projects on July 8, 2025, and its dashboard offered code downloads through the end of 2025 ([Glitch's announcement](https://blog.glitch.com/post/changes-are-coming-to-glitch), checked 2026-11-14). If you kept the download, your AI can publish it on Spacefast. - -## Move the project - - - - Put the project in a folder of its own. - - - Connect Spacefast to your agent ([Agents](/agents) lists the ways), open the folder, and send: - - - Publish the project in this folder on Spacefast. It used to run on Glitch. Keep it working the same way and send me the link. - - - A project with only HTML, CSS, and browser scripts publishes as it is. A Node server needs its routes rewritten as [Functions](/functions) routes or moved to a [supported framework](/frameworks), and your agent can do that rewrite. - - - `.env` files are never published. Set each value on the Space instead, with `sf env set` or `sf env import .env`. See [Environment variables](/environment-variables). - - - A team's new Spaces start private unless the team changed its default. Make the Space public or create a share link in [Spacefast Share](/share) once it works. - - - -No agent? A folder with an `index.html` and no `package.json` publishes from [drop.fast](https://drop.fast) or with `sf publish`. See the [plain HTML recipe](/recipes/html). - -## What carries over - -| From Glitch | On Spacefast | -| --- | --- | -| Static files | Published as they sit in the folder | -| Server routes | Rewritten as [Functions](/functions) routes, which take a standard `Request` and return a `Response` | -| Secrets from `.env` | Set as [environment variables](/environment-variables) and read from `env` | - -## What doesn't - -- **Timers inside a running server.** A Functions worker answers requests. Work that ran on a timer becomes a [cron](/crons), a scheduled `GET` against one of your own paths. -- **Local data files.** A Functions worker reaches the Space's [database](/database) through the D1-shaped `env.DB` binding, not through a file in the project. Code that read or wrote a JSON or SQLite file needs rewriting against `env.DB`, and existing rows go in through the [SQL console](/database#the-sql-console). -- **The old project address.** Point your own domain at the Space with [Custom domains](/domains), and update links to the old address. diff --git a/content/(publish)/migrate-from/meta.ts b/content/(publish)/migrate-from/meta.ts deleted file mode 100644 index 34de76d0..00000000 --- a/content/(publish)/migrate-from/meta.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { defineMeta } from "blume"; - -export default defineMeta({ - title: "Move from", - collapsed: true, - pages: [ - "index", - "netlify", - "vercel", - "cloudflare-pages", - "github-pages", - "here-now", - "glitch", - "val-town", - ], -}); diff --git a/content/(publish)/migrate-from/val-town.mdx b/content/(publish)/migrate-from/val-town.mdx deleted file mode 100644 index 5bdb38ab..00000000 --- a/content/(publish)/migrate-from/val-town.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Move from Val Town -description: Move vals to Spacefast before Val Town closes. HTTP vals become Functions routes and scheduled vals become crons ---- - -Val Town closes on January 10, 2027, and code on Val Town becomes read-only on December 10, 2026 ([Val Town's announcement](https://blog.val.town/winding-down), checked 2026-11-14). Get your code out first, then have your AI move it to Spacefast. - -## Move your vals - - - - Copy your vals and the vals they import into a folder. Val Town's [migration guides](https://docs.val.town/migration) cover exporting to GitHub. - - - Connect Spacefast to your agent ([Agents](/agents) lists the ways), open the folder, and send: - - - Publish the project in this folder on Spacefast. It used to run on Val Town. Keep it working the same way and send me the link. - - - - Set each environment variable your vals read on the Space, with `sf env set` or `sf env import`. See [Environment variables](/environment-variables). - - - A team's new Spaces start private unless the team changed its default. Make the Space public or create a share link in [Spacefast Share](/share) once it works. - - - -## Where each kind of val goes - -| On Val Town | On Spacefast | -| --- | --- | -| HTTP val | A [Functions](/functions) route. A module in `functions/` exports a handler per HTTP method, or a root `handler.ts` default-exports `{ fetch }` and answers the whole Space | -| Scheduled val | A [cron](/crons) in `sf.jsonc`: a scheduled `GET` against a Functions route on your own Space | -| SQLite tables | The Space's [database](/database), through the D1-shaped `env.DB` binding | -| Environment variables | [Environment variables](/environment-variables) on the Space, read from the handler's `env` argument | -| Static pages | Published files. See the [plain HTML recipe](/recipes/html) | - -Handlers take a standard `Request` and return a standard `Response`, which is the shape HTTP vals use too. - -## What to check - -- **Imports and runtime calls.** Replace `esm.town` imports with local files or npm packages, and replace `Deno.env.get` with the handler's `env` argument. The [Functions](/functions) page lists the supported module types. -- **SQL.** Queries move from SQLite to the Space's database through `env.DB`. Check SQLite-specific syntax, and load existing rows through the [SQL console](/database#the-sql-console). -- **Schedules.** A five-field crontab schedule is an advanced cron, which comes with Boost. For now every crontab runs at its closest simple schedule until advanced scheduling is enabled, and a Space can declare at most 8 crons. A cron runs approximately on schedule, with no retries. See [Crons](/crons). -- **Outbound requests.** A worker's `fetch()` reaches any public host once the Space is claimed. See [Functions outbound HTTP](/functions#outbound-http). diff --git a/content/(publish)/recipes/eleventy.mdx b/content/(publish)/recipes/eleventy.mdx deleted file mode 100644 index 02d068a5..00000000 --- a/content/(publish)/recipes/eleventy.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Eleventy -description: Build an Eleventy site and publish _site, and what to do when your config moves the output somewhere else ---- - -Eleventy is detected by its `@11ty/eleventy` dependency, or by one of four config files: `.eleventy.js`, `eleventy.config.js`, `eleventy.config.mjs`, or `eleventy.config.cjs`. - -## What to build - -The default `eleventy`. Spacefast runs the bare binary when your `package.json` has no `build` script, resolving it from the project's `node_modules/.bin`. - -## The output directory - -`_site`. - -## Publish - -```bash -sf publish -``` - -Or build it yourself and upload the result: - -```bash -npx @11ty/eleventy -sf publish ./_site --prebuilt -``` - -## What the receipt shows - -```text -Published: https://quiet-harbor.space.fast - - Live URL https://quiet-harbor.space.fast - Version URL https://quiet-harbor--v4.space.fast - Version v4 (ready) - Files 88 -``` - -## The gotcha - -`_site` is a constant in the detection table. Nothing reads `dir.output` out of your Eleventy config, so a project that renders into `public` or `docs` builds fine and then publishes an empty directory. Name it yourself: - -```bash -sf publish --output-directory public -``` - -Two related caveats: - -- `eleventy.config.ts` is not one of the four config names. A TypeScript config on its own does not identify the project. The `@11ty/eleventy` dependency does, and a dependency match always wins over a config-file match. -- `_site` is also Jekyll's output directory. Jekyll is the one preset that reads its config; it uses `destination` from `_config.yml` when set. - -The full table, the detection order, and every override flag are on [Frameworks and builds](/frameworks). diff --git a/content/(publish)/recipes/meta.ts b/content/(publish)/recipes/meta.ts deleted file mode 100644 index 9ee47f37..00000000 --- a/content/(publish)/recipes/meta.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineMeta } from "blume"; - -export default defineMeta({ - title: "Recipes", - collapsed: false, - pages: ["html", "astro", "next", "vite", "eleventy"], -}); diff --git a/content/(publish)/wordpress-data-sources.mdx b/content/(publish)/wordpress-data-sources.mdx deleted file mode 100644 index 1337e3e2..00000000 --- a/content/(publish)/wordpress-data-sources.mdx +++ /dev/null @@ -1,125 +0,0 @@ ---- -title: Build from a WordPress site -description: Point a Space's repository build at a public WordPress site, read its content over the REST API during the build, and publish the static output ---- - -Data sources only reach repository builds. A folder publish, or a local `sf publish` of a built directory, doesn't get them. - -A data source is a public WordPress site a build reads content from. Nothing is copied into the Space and nothing is written back. The platform hands the build a URL and a source map. Your build code fetches over the WordPress REST API, and the output publishes like any other static build. - -## What you need first - -A Space needs a connected repository before a source does anything. See [Publish from Git](/git). Until one is connected, the dashboard shows **Connect a repository to use data sources** with a **Connect repository** button, and saved sources sit there doing nothing. Once it is connected the banner reads **Ready for repository builds**. - -Sources live on the Space, not in `sf.jsonc`. `dataSources` and `defaultDataSource` are not keys of the committed config file, and putting them there does nothing. Content sources are deployment settings, so configure them in the dashboard or through the API. - -## Add a source - - - - -Open the Space, go to **Settings**, then **Data sources**. The page header reads "Public WordPress sources are available only to repository builds." - - - - In the **WordPress sources** card, click **Add source**. Fill in **Name** and **WordPress URL**. The URL placeholder is `https://example.com`. - - - The **Default source** card holds one **Choose a source** select, described as "Used when a build asks for WordPress content without naming a source." The chosen entry is the one exposed as `WORDPRESS_URL`. - - - Save the form. The next build picks the values up. - - - -**Remove data source** deletes a row. An empty card reads "No data sources yet. Add a public WordPress site to get started." - - - - -Sources are part of the Space's config overlay, written with [`updateSpace`](/api/reference/spaces/updatespace). - -```bash -curl -X PATCH https://api.spacefast.com/v1/spaces/spc_xxxxxxxx \ - -H "Authorization: Bearer sfa_xxxxxxxxxxxxxxxxxxxxxxxx" \ - -H "Content-Type: application/json" \ - -d '{ - "config": { - "dataSources": { - "blog": { "kind": "wordpress", "url": "https://blog.example.com" }, - "docs_site": { "kind": "wordpress", "url": "https://docs.example.com" } - }, - "defaultDataSource": "blog" - } - }' -``` - -`config` **replaces** the stored overlay rather than merging into it, so send the keys you want to keep. Read the current sources back with [`listSpaceDataSources`](/api/reference/spaces/listspacedatasources), which returns each entry with a `default` flag. - - - - -### Fields - -| Field | Type | What it does | -| --- | --- | --- | -| `dataSources` | object, up to 32 entries | Named sources, keyed by name | -| `dataSources..kind` | `"wordpress"` | The only source kind | -| `dataSources..url` | string, up to 2048 chars | The site's public HTTPS root | -| `defaultDataSource` | string | Name of the source exposed as `WORDPRESS_URL` | - -A name is 1 to 128 characters, starts with a letter or underscore, and holds only letters, numbers, and underscores. `__proto__`, `constructor`, and `prototype` are reserved and refused. - -A URL has to be lowercase `https://` with a DNS hostname, a canonical dotted-decimal IPv4 address, or a bracketed IPv6 address. A nonzero port and a path are allowed. Credentials, a query string, a fragment, whitespace, backslashes, and a trailing-dot host are all refused. What is stored is the canonical form: default port dropped, host lowercased, IDN normalized, dot segments resolved, trailing path slashes trimmed. - -`defaultDataSource` has to name a configured entry, otherwise the write fails with "defaultDataSource must name a configured dataSources entry." Leave it out and the first source in bytewise name order becomes the default. - -## What the build receives - -Two variables are injected into every repository build on a Space that has at least one source. - -| Variable | Value | -| --- | --- | -| `WORDPRESS_URL` | The default source's canonical URL | -| `SPACEFAST_DATA_SOURCES` | JSON: `{"dataSources":{"":{"kind":"wordpress","url":"..."}},"defaultDataSource":""}` | - -Your own build variables win. Defining `SPACEFAST_DATA_SOURCES` yourself suppresses the generated map entirely and no `WORDPRESS_URL` is injected either. Defining `WORDPRESS_URL` alone overrides just the default URL and leaves the map intact. Set them with `sf env set`, described in [Frameworks and builds](/frameworks). - -The source map is serialized with names in bytewise order, so the value is stable across builds that changed nothing. - -## Read the content - -Any HTTP client works. The variables are ordinary environment variables and the endpoint is the standard WordPress REST API. - -```js scripts/fetch-posts.mjs -const base = process.env.WORDPRESS_URL; -const response = await fetch(`${base}/wp-json/wp/v2/posts?per_page=100&_embed=1`); -if (!response.ok) { - throw new Error(`WordPress returned ${response.status}`); -} -const posts = await response.json(); - -for (const post of posts) { - console.log(post.slug, post.title.rendered); -} -``` - -Run it as part of your build, write the result wherever your framework reads data from, and publish the output directory as usual. - -There is also `@spacefast/wordpress`, a read-only REST client that discovers the URL for you. - -```ts -import { createWordPressClient } from "@spacefast/wordpress"; - -const wp = createWordPressClient(); -const { data: posts } = await wp.posts.list({ perPage: 100 }); -const about = await wp.pages.bySlug("about"); -``` - -With no argument it reads `WORDPRESS_URL`, falling back to the default entry in `SPACEFAST_DATA_SOURCES`. Pass `{ source: "docs_site" }` to select a named entry, or `{ url }` to bypass discovery. It exposes `posts`, `pages`, `media`, `categories`, `tags`, `users`, and a `collection(path)` escape hatch, each with `list`, `get`, and `bySlug`. List responses carry `pagination.total` and `pagination.totalPages` from the `X-WP-Total` and `X-WP-TotalPages` headers. - -## Requirements on the site - -The URL has to serve the standard WordPress REST API at `/wp-json/` with pretty permalinks on. The content the build reads is whatever that API returns to an anonymous caller, so anything private stays private. - -A source is only read while a build runs. When published content changes, a new build is what picks it up. Open **Builds** and use **Build now** for an immediate refresh, or push to the production branch. diff --git a/content/api/authentication.mdx b/content/(reference)/api/authentication.mdx similarity index 100% rename from content/api/authentication.mdx rename to content/(reference)/api/authentication.mdx diff --git a/content/api/connectors.mdx b/content/(reference)/api/connectors.mdx similarity index 100% rename from content/api/connectors.mdx rename to content/(reference)/api/connectors.mdx diff --git a/content/api/errors.mdx b/content/(reference)/api/errors.mdx similarity index 100% rename from content/api/errors.mdx rename to content/(reference)/api/errors.mdx diff --git a/content/api/idempotency.mdx b/content/(reference)/api/idempotency.mdx similarity index 100% rename from content/api/idempotency.mdx rename to content/(reference)/api/idempotency.mdx diff --git a/content/api/index.mdx b/content/(reference)/api/index.mdx similarity index 100% rename from content/api/index.mdx rename to content/(reference)/api/index.mdx diff --git a/content/api/long-running-operations.mdx b/content/(reference)/api/long-running-operations.mdx similarity index 100% rename from content/api/long-running-operations.mdx rename to content/(reference)/api/long-running-operations.mdx diff --git a/content/api/meta.ts b/content/(reference)/api/meta.ts similarity index 82% rename from content/api/meta.ts rename to content/(reference)/api/meta.ts index c4582f93..441e71cc 100644 --- a/content/api/meta.ts +++ b/content/(reference)/api/meta.ts @@ -1,7 +1,8 @@ import { defineMeta } from "blume"; export default defineMeta({ - title: "API overview", + title: "REST API", + collapsed: false, pages: [ "index", "authentication", @@ -10,8 +11,9 @@ export default defineMeta({ "rate-limits", "idempotency", "long-running-operations", - "webhooks", + "versioning", "connectors", + "webhooks", "sdk", "reference", ], diff --git a/content/api/pagination.mdx b/content/(reference)/api/pagination.mdx similarity index 100% rename from content/api/pagination.mdx rename to content/(reference)/api/pagination.mdx diff --git a/content/api/rate-limits.mdx b/content/(reference)/api/rate-limits.mdx similarity index 100% rename from content/api/rate-limits.mdx rename to content/(reference)/api/rate-limits.mdx diff --git a/content/api/sdk.mdx b/content/(reference)/api/sdk.mdx similarity index 100% rename from content/api/sdk.mdx rename to content/(reference)/api/sdk.mdx diff --git a/content/api/webhooks.mdx b/content/(reference)/api/webhooks.mdx similarity index 100% rename from content/api/webhooks.mdx rename to content/(reference)/api/webhooks.mdx diff --git a/content/cli/index.mdx b/content/(reference)/cli/index.mdx similarity index 100% rename from content/cli/index.mdx rename to content/(reference)/cli/index.mdx diff --git a/content/(reference)/cli/meta.ts b/content/(reference)/cli/meta.ts new file mode 100644 index 00000000..bc921d1c --- /dev/null +++ b/content/(reference)/cli/meta.ts @@ -0,0 +1,3 @@ +import { defineMeta } from "blume"; + +export default defineMeta({ title: "CLI", collapsed: false, pages: ["index", "reference"] }); diff --git a/content/(reference)/meta.ts b/content/(reference)/meta.ts index 6c207182..1346796f 100644 --- a/content/(reference)/meta.ts +++ b/content/(reference)/meta.ts @@ -3,6 +3,5 @@ import { defineMeta } from "blume"; export default defineMeta({ title: "Reference", collapsed: false, - order: 7, - pages: ["glossary", "limits", "config-file", "errors", "feedback"], + pages: ["cli", "api", "config-file", "limits", "errors", "glossary", "changelog"], }); diff --git a/content/(serve)/caching.mdx b/content/(routing)/caching.mdx similarity index 100% rename from content/(serve)/caching.mdx rename to content/(routing)/caching.mdx diff --git a/content/(serve)/customization.mdx b/content/(routing)/customization.mdx similarity index 100% rename from content/(serve)/customization.mdx rename to content/(routing)/customization.mdx diff --git a/content/(serve)/domains.mdx b/content/(routing)/domains/index.mdx similarity index 100% rename from content/(serve)/domains.mdx rename to content/(routing)/domains/index.mdx diff --git a/content/(routing)/domains/meta.ts b/content/(routing)/domains/meta.ts new file mode 100644 index 00000000..2f8ff45d --- /dev/null +++ b/content/(routing)/domains/meta.ts @@ -0,0 +1,3 @@ +import { defineMeta } from "blume"; + +export default defineMeta({ title: "Domains", collapsed: true, pages: ["urls", "index", "dns", "registration", "transfers"] }); diff --git a/content/(serve)/buy-domains.mdx b/content/(routing)/domains/registration.mdx similarity index 100% rename from content/(serve)/buy-domains.mdx rename to content/(routing)/domains/registration.mdx diff --git a/content/(serve)/urls.mdx b/content/(routing)/domains/urls.mdx similarity index 99% rename from content/(serve)/urls.mdx rename to content/(routing)/domains/urls.mdx index 73963f3d..496152ce 100644 --- a/content/(serve)/urls.mdx +++ b/content/(routing)/domains/urls.mdx @@ -1,4 +1,5 @@ --- +slug: urls title: URLs and hostnames description: Every hostname a Space answers on, which one counts as the live URL, and what changes when a custom domain takes over sidebar: { order: 1 } diff --git a/content/(serve)/site-pages.mdx b/content/(routing)/error-pages.mdx similarity index 100% rename from content/(serve)/site-pages.mdx rename to content/(routing)/error-pages.mdx diff --git a/content/(routing)/meta.ts b/content/(routing)/meta.ts new file mode 100644 index 00000000..e84a31b2 --- /dev/null +++ b/content/(routing)/meta.ts @@ -0,0 +1,3 @@ +import { defineMeta } from "blume"; + +export default defineMeta({ title: "Domains & routing", collapsed: false, pages: ["domains", "redirects", "headers", "caching", "customization"] }); diff --git a/content/(serve)/routing.mdx b/content/(routing)/redirects.mdx similarity index 100% rename from content/(serve)/routing.mdx rename to content/(routing)/redirects.mdx diff --git a/content/(serve)/traffic-rules.mdx b/content/(routing)/traffic-rules.mdx similarity index 100% rename from content/(serve)/traffic-rules.mdx rename to content/(routing)/traffic-rules.mdx diff --git a/content/(serve)/meta.ts b/content/(serve)/meta.ts deleted file mode 100644 index 874d7d32..00000000 --- a/content/(serve)/meta.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { defineMeta } from "blume"; - -export default defineMeta({ - title: "Serving", - collapsed: false, - order: 4, - pages: [ - "urls", - "buy-domains", - "domains", - "routing", - "traffic-rules", - "caching", - "stats", - "share", - "comments", - "customization", - "site-pages", - ], -}); diff --git a/content/(publish)/anonymous-and-claim.mdx b/content/agents/anonymous-and-claim.mdx similarity index 100% rename from content/(publish)/anonymous-and-claim.mdx rename to content/agents/anonymous-and-claim.mdx diff --git a/content/agents/claude-code.mdx b/content/agents/claude-code.mdx deleted file mode 100644 index 18038827..00000000 --- a/content/agents/claude-code.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: Claude Code -description: Install the Spacefast plugin in Claude Code, what it adds to your session, and the prompts that work ---- - -The Spacefast plugin lets Claude Code publish your project and manage resources within its approved permissions. Team membership and billing changes still need you in the dashboard. - -## Install - -```bash -claude plugin marketplace add spacefast/plugins -claude plugin install spacefast@spacefast -``` - -The plugin does not assume the `sf` CLI is installed. You sign in the first time the hosted server is used, through your client's OAuth flow. - -Two other ways to install: `npx -y plugins add spacefast/plugins -t claude-code -y` installs the same plugin, and `sf setup agent --agent claude-code` writes MCP config into `~/.claude.json` and installs the skill into `~/.claude/skills/spacefast/` instead. See [sf setup agent](/agents/sf-setup). - -## What the plugin adds - -### MCP server - -One entry, the hosted server. - -```json .mcp.json -{ - "mcpServers": { - "spacefast": { - "type": "http", - "url": "https://mcp.spacefast.com" - } - } -} -``` - -Claude Code stores the OAuth credential for it. The `"type": "http"` field is required. Claude Code rejects a bare `{ "url": ... }` entry. - -The plugin doesn't add the local stdio server. If you need it to read folders on your machine, set it up separately with [sf setup agent](/agents/sf-setup). - -### Skills - -The base skill, `skills/spacefast/`, routes each request to the right tool and sets the publish-poll-report loop. Task skills cover building a site, editing a Space, sharing, custom domains, fixing a deployment, and the Design System. Each skill is a `SKILL.md` plus a `references.md`. See [skills](/agents/skills). - -### Hooks - -```json hooks.json -{ - "hooks": { - "SessionStart": [ - { - "matcher": "startup|resume|clear|compact", - "hooks": [ - { - "type": "command", - "command": "node \"${GROK_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/session-start.mjs\"" - } - ] - } - ], - "PreToolUse": [ - { - "matcher": "^(Bash|PowerShell|exec_command|shell_command|mcp__(?:plugin_spacefast(?:[-_]local)?_)?spacefast(?:[-_]local)?__(?:publish|createPublish|createSpaceBuild|retryBuild|finalizeSpaceVersion|promoteSpaceVersion|commitSpaceSourceWorkspaceChanges))$", - "hooks": [ - { - "type": "command", - "command": "node \"${GROK_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/design-reminder.mjs\"", - "timeout": 5 - } - ] - } - ] - } -} -``` - -The `SessionStart` script reads `.spacefast/space.json` in your working directory. If that file names a Space, it writes this line into the session, followed by a reminder to check the team's Design System before publishing. - -```text -Spacefast project detected. This directory is linked to at . Use the Spacefast skill and preserve .spacefast/space.json. Treat .spacefast/state.json as credential material: never print, commit, or archive it. -``` - -The live URL is appended only when it starts with `https://`. If the file is missing or holds no Space, the hook prints nothing. - -The `PreToolUse` script adds the same Design System reminder before a Spacefast publish, build, or promote tool call, or before a shell command that runs `sf`. It's advisory and never blocks the call. Neither hook makes network calls or sends telemetry. - -## Verify it works - -Ask the agent to call `searchDocs` for a documentation query, then `getDocsPage` with a returned slug before attempting a publish. - - -Use the Spacefast MCP server to search the docs for custom domains. - - -If the tools are wired up, Claude Code names the tool it called. Then try a publish. - - -Publish this folder to Spacefast and give me the live URL. - - -The hosted server needs a signed-in connection, so the plugin can't publish anonymously. To publish without an account, use `sf publish`, which returns a claim link. See [Publish without an account](/anonymous-and-claim). - -## Typical prompts - - -Publish ./dist to Spacefast and tell me the live URL and the version URL. - - - -Ship a new version of this Space with the changelog "fix the pricing table". - - - -Show me the last few deployments for this Space and whether the latest build passed. - - - -Point docs.example.com at this Space and tell me which DNS records to add. - - - -How much traffic did this Space get in the last 30 days? - - - -Roll this Space back to the previous version. - - -The inspection prompts open Space Apps. Rollback calls `promoteSpaceVersion`, which may pause for your approval before the write runs. See [approvals](/agents/mcp-server). - -## Next steps - -For an existing export, follow [Share a Claude artifact publicly](/agents/share-claude-artifact). diff --git a/content/agents/claude-desktop.mdx b/content/agents/claude-desktop.mdx deleted file mode 100644 index 1f39dbb2..00000000 --- a/content/agents/claude-desktop.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Claude Desktop -description: Install the Spacefast desktop extension for Claude Desktop, or paste the hosted MCP server into your config ---- - -The Spacefast desktop extension runs the Spacefast MCP server on your computer, so Claude Desktop can publish and manage your Spaces. It needs Node.js with `npx` where Claude Desktop can find it. - -## Install the extension - -Download `claude-desktop.mcpb` from the latest release of `github.com/spacefast/plugins` and open it. Claude Desktop installs it as a desktop extension. If the bundle doesn't open, go to **Settings → Extensions → Advanced settings → Install Extension** and select the file. - - - - Grab `claude-desktop.mcpb` from the releases page. - - - Claude Desktop reads the manifest and offers to install the extension. - - - Ask Claude to sign you in to publish to your team. Signed out, it publishes anonymously and you claim the Space later. - - - -Then ask for something small to prove the extension is live. - - -Publish this folder to Spacefast and give me the live URL. - - - -List my Spacefast Spaces. - - -## What the manifest declares - -The bundle is a manifest version `0.2` extension with a Node server. Its entry point is `server/index.js`, a thin spawner that runs `npx -y spacefast@ mcp` over stdio, so the extension itself carries no server code. - -```json manifest.json -"mcp_config": { - "command": "node", - "args": ["${__dirname}/server/index.js"] -} -``` - -The extension publishes inline files and edits Space source without a local checkout. Because the extension runs on Node, it can't publish a local folder by path. That needs the native `sf` build on Linux or macOS. From the extension, publish inline files, or use the CLI. - -| Fact | Value | -|---|---| -| Manifest version | `0.2` | -| Server type | `node` | -| Platforms | macOS, Windows, Linux | -| Node | 20 or newer | -| License | MIT | -| Tools | Generated from the pinned CLI's tool catalog | - -## Authentication - -The extension has no settings. Ask Claude to sign you in: it shows a link and a code, and you approve them in the browser. That signs in both the extension and the `sf` CLI on this computer. - -Signed in, the extension can also reach services your team connected in Spacefast through `search_connector_tools`. The hosted server can't. - -Signed out, an anonymous publish returns a claim link. Open it in the browser to take ownership of the Space. See [Publish without an account](/anonymous-and-claim). - -## Or use the hosted server - -If you would rather connect to the hosted endpoint and sign in with OAuth, add this to `claude_desktop_config.json`. - -```json claude_desktop_config.json -{ - "mcpServers": { - "spacefast": { - "type": "http", - "url": "https://mcp.spacefast.com" - } - } -} -``` - -The hosted server has no filesystem, so `publish` requires inline files. Connectors you add on claude.ai sync down to Desktop; the bundle is the desktop-only option. - -:::note -`sf setup agent` doesn't configure Claude Desktop. Use the extension or the config file above. -::: - -## Next steps - -To publish an existing export, follow [Share a Claude artifact publicly](/agents/share-claude-artifact). diff --git a/content/agents/codex.mdx b/content/agents/codex.mdx deleted file mode 100644 index 15ba67fb..00000000 --- a/content/agents/codex.mdx +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Codex -description: Install the Spacefast plugin in Codex, or add the MCP server to config.toml by hand ---- - -The Spacefast plugin lets Codex publish your project and manage your Spaces through the hosted MCP server. - -## Install - -```bash -codex plugin marketplace add spacefast/plugins -codex plugin add spacefast@spacefast -``` - -Two other ways to install: `npx -y plugins add spacefast/plugins -t codex -y` installs the same plugin, and `sf setup agent --agent codex` writes the MCP table into `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`) and installs the skill into `$CODEX_HOME/skills/spacefast/`. - -## What the plugin adds - -### MCP server - -```json .mcp.json -{ - "mcpServers": { - "spacefast": { - "type": "streamable-http", - "url": "https://mcp.spacefast.com" - } - } -} -``` - -Codex uses the transport name `streamable-http` for the same endpoint that Claude Code and Cursor call `http`. The hosted server needs a signed-in connection, so anonymous publishing goes through `sf publish` instead. - -### Skills - -`skills/spacefast/` is the base skill, in the Codex variant. The plugin also ships the task skills for building a site, editing a Space, sharing, custom domains, fixing a deployment, and the Design System. Each skill has a `SKILL.md`, a `references.md`, and an `agents/openai.yaml` with its display name and default prompt. See [skills](/agents/skills). - -### Hooks - -The plugin includes the same two advisory hooks as [Claude Code](/agents/claude-code#hooks): a `SessionStart` note when the directory is linked to a Space, and a Design System reminder before publishing. Codex doesn't trust new or changed hooks on install. Review them with `/hooks` first. - -### Agent manifest - -`agents/openai.yaml` declares the plugin's identity and its one dependency, the Spacefast MCP server over `streamable_http` at `https://mcp.spacefast.com`, with `allow_implicit_invocation: true`. - -## Manual config - -To skip the plugin and add only the MCP server, put this in `~/.codex/config.toml`. - -```toml ~/.codex/config.toml -[mcp_servers.spacefast] -url = "https://mcp.spacefast.com" -``` - -`sf setup agent --agent codex` writes the same table with an `oauth_resource` line, or the stdio form when you pick the proxy or local method. - -```toml ~/.codex/config.toml -[mcp_servers.spacefast] -command = "sf" -args = ["mcp", "proxy"] -``` - -## Verify it works - - -Use the Spacefast MCP server to search the docs for anonymous publishing. - - -Ask the agent to call `searchDocs` for a documentation query, then `getDocsPage` with a returned slug before attempting a publish. - - -Publish this folder to Spacefast and give me the live URL. - - -## Typical prompts - - -Publish ./out to Spacefast with the changelog "rebuild the docs". - - - -Did the last Spacefast build for this Space succeed? Show me the deployments. - - - -Show DNS and TLS status for every domain on this Space. - - - -Make this Space public and confirm the access setting afterwards. - - -The last one calls the matching API operation tool, which can pause for your approval before the write lands. diff --git a/content/agents/cursor.mdx b/content/agents/cursor.mdx deleted file mode 100644 index baaf0162..00000000 --- a/content/agents/cursor.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: Cursor -description: Install the Spacefast plugin in Cursor, or add the MCP server to mcp.json by hand ---- - -The Spacefast plugin lets Cursor publish your project and call API operation tools, within the permissions you approved. Some actions remain reserved for a signed-in person. - -## Install - -```bash -npx -y plugins add spacefast/plugins -t cursor -y -``` - -You can also run `sf setup agent --agent cursor`. It writes `~/.cursor/mcp.json` and installs the skill into `~/.cursor/skills/spacefast/`, or into `/.agents/skills/` with `--project`. - -## What the plugin adds - -### MCP server - -```json .mcp.json -{ - "mcpServers": { - "spacefast": { - "type": "http", - "url": "https://mcp.spacefast.com" - } - } -} -``` - -This is the hosted server. Complete the browser OAuth flow when Cursor prompts you. It has no filesystem, so `publish` takes inline files, and anonymous publishing goes through `sf publish` instead. - -### A rule and skills - -The plugin ships the Spacefast skills plus a `rules/spacefast.mdc` rule. - -```md rules/spacefast.mdc ---- -description: "Build and publish websites, edit existing Spaces, manage sharing and domains, and apply saved team standards with Spacefast. Use the installed task skill for the requested workflow." -globs: -alwaysApply: false ---- -``` - -`alwaysApply: false` means Cursor pulls the rule in when the description matches what you asked for, rather than adding it to every request. The body is the same routing guidance the base skill carries. See [skills](/agents/skills). - -## Manual config - -Put this in `~/.cursor/mcp.json` to add the hosted server without the plugin. - -```json ~/.cursor/mcp.json -{ - "mcpServers": { - "spacefast": { - "type": "http", - "url": "https://mcp.spacefast.com" - } - } -} -``` - -The `"type"` field is required; omitting it breaks the config. - -Writing this file by hand or through the CLI keeps every other top-level key intact, but it drops comments. The CLI refuses to write through a symlinked config. - -## Verify it works - - -Use the Spacefast MCP server to search the docs for version rollback. - - -Ask the agent to call `searchDocs` for a documentation query, then `getDocsPage` with a returned slug before attempting a publish. - - -Publish this project to Spacefast and give me the live URL. - - -## Typical prompts - - -Publish ./dist to Spacefast and tell me the live URL and the version URL. - - - -Push a new version of this Space with the changelog "new landing page". - - - -Show me the deployments for this Space and whether the last build passed. - - - -Attach app.example.com to this Space and list the DNS records I need. - - - -What were the top pages on this Space over the last 7 days? - diff --git a/content/agents/meta.ts b/content/agents/meta.ts index 918fcfcc..5cf2630d 100644 --- a/content/agents/meta.ts +++ b/content/agents/meta.ts @@ -4,17 +4,11 @@ export default defineMeta({ title: "Agents", pages: [ "index", - "domain-research", - "share-claude-artifact", - "share-chatgpt-html", "mcp-server", - "claude-code", - "codex", - "cursor", - "claude-desktop", - "other-clients", + "poppy", "skills", - "sf-setup", "permissions", + "anonymous-and-claim", + "domain-research", ], }); diff --git a/content/agents/other-clients.mdx b/content/agents/other-clients.mdx deleted file mode 100644 index 7dbb68b9..00000000 --- a/content/agents/other-clients.mdx +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: Any MCP client -description: Connect any MCP client to Spacefast over hosted HTTP or local stdio, and what sf mcp proxy does ---- - -MCP configuration varies by client: `mcp` for OpenCode, `servers` for VS Code, and `context_servers` for Zed. `sf setup agent` writes configuration for the clients it supports. - -## Pick a transport - - - - The server runs at `https://mcp.spacefast.com`. Your client signs in with OAuth. There is no filesystem, so `publish` takes inline files. - - ```json - { - "mcpServers": { - "spacefast": { - "type": "http", - "url": "https://mcp.spacefast.com" - } - } - } - ``` - - The `"type"` field is required. Claude Code rejects a bare `{ "url": ... }` entry outright, and VS Code reads it as a stdio command. - - - The server runs on your machine and can read your working directory, so `publish` accepts a path. - - ```json - { - "mcpServers": { - "spacefast": { - "command": "npx", - "args": ["-y", "spacefast", "mcp"], - "env": {} - } - } - } - ``` - - Set `SPACEFAST_TOKEN` in `env` to authenticate, or leave it empty to publish anonymously and claim the Space later. - - - The server runs hosted, but your CLI login carries the auth instead of an editor OAuth flow. - - ```json - { - "mcpServers": { - "spacefast": { - "command": "sf", - "args": ["mcp", "proxy"] - } - } - } - ``` - - This is what `sf setup agent` writes by default. - - - -Amp puts the server map at the top level with no root key. Use `sf setup agent` for a [supported client](/cli/agents#sf-mcp-install); otherwise adapt the transport example to your client's configuration format. - -Ask the agent to call `searchDocs` for a documentation query, then `getDocsPage` with a returned slug before attempting a publish. - - -Use the Spacefast MCP server to search the docs for custom domains. - - - -Publish this folder to Spacefast and give me the live URL. - - -## Hosted authentication - -The hosted endpoint is never anonymous. A request with no credential gets a `401` and a `WWW-Authenticate` challenge that names the protected-resource metadata document. Your client follows that pointer to the authorization server and runs a normal OAuth flow. Bearer and DPoP are both accepted. - -The resource identifier is the MCP origin. A Spacefast OAuth token issued for the API rather than for MCP is rejected here. - -Your client never holds a Spacefast API token. Each request mints an internal delegation token that lives five minutes and carries exactly the permissions of the credential behind it. Scopes are listed on [the MCP server page](/agents/mcp-server). - -## What `sf mcp proxy` does - -`sf mcp proxy` is a bridge. Your editor speaks stdio to the `sf` process on your machine, and `sf` speaks HTTPS to `https://mcp.spacefast.com` using the login you already have from `sf login`. - -This gives you three benefits: - -- No editor-managed OAuth. Clients with weak or missing OAuth support still reach the hosted server. -- No credential in your editor's config file. The token lives in the CLI's own state. -- A fresh `sf login` is picked up without restarting your editor. - -If you are not logged in, the proxy answers with a JSON-RPC error telling you to run `sf login` and retry. - -Your login is origin-bound. The proxy sends it only to the API and MCP origins of the account that issued it, or to loopback. Pointing `--endpoint` at some other host fails unless you name that origin with `--allow-credential-origin`. The endpoint must be HTTPS except on loopback, and may not carry credentials, a query string, or a fragment. - -| Flag | Env | What it does | -|---|---|---| -| `--endpoint` | `SPACEFAST_MCP_URL` | Remote MCP endpoint. Defaults to the `mcp.` sibling of your login's API host | -| `--allow-credential-origin` | `SPACEFAST_MCP_ALLOW_CREDENTIAL_ORIGIN` | Send your credential to this origin even though it was not issued for it. Repeatable | - -Responses are capped at 32 MiB, and each request times out after 55 seconds. - -## Running the local server directly - -`sf mcp` runs the On-Device server over stdio and hands it the same credential every other CLI command uses. It never writes that credential into client config. - -```bash -sf mcp -``` - -| Flag | Env | What it does | -|---|---|---| -| `--api-url` | `SPACEFAST_API_URL` | API base URL for tool calls | -| `--profile` | `SPACEFAST_PROFILE` | CLI profile to resolve the credential from | -| `--token` | `SPACEFAST_TOKEN` | Token for tool calls | -| `--workspace-root` | `SPACEFAST_MCP_WORKSPACE_ROOT` | The one directory `publish` may read from | - -Without `--workspace-root`, the server takes the first `file:` root your client advertises, and falls back to the directory it started in. Setting the flag or the environment variable turns off that discovery. - -Diagnostics go to stderr, because stdout carries the protocol. - -## Where each client keeps its config - -`sf setup agent --agent ` writes to these paths. `~` is your home directory. - -| Client | Config file | -|---|---| -| `claude-code` | `~/.claude.json`, or `$CLAUDE_CONFIG_DIR/.claude.json` | -| `cursor` | `~/.cursor/mcp.json` | -| `codex` | `~/.codex/config.toml`, or `$CODEX_HOME/config.toml` | -| `vscode` | `mcp.json` in your VS Code user folder, or `/.vscode/mcp.json` with `--project` or from a remote terminal | -| `github-copilot` | `~/.copilot/mcp-config.json` | -| `devin-desktop` | `~/.config/devin/mcp_config.json` | -| `zed` | `~/.config/zed/settings.json` | -| `opencode` | `~/.config/opencode/opencode.json` | -| `amp` | `~/.config/amp/settings.json` | -| `warp` | `~/.warp/.mcp.json` | -| `factory-droid` | `~/.factory/mcp.json` | -| `cline` | `~/.cline/data/settings/cline_mcp_settings.json` | -| `generic` | `/.mcp.json` | diff --git a/content/agents/sf-setup.mdx b/content/agents/sf-setup.mdx deleted file mode 100644 index 06b5be05..00000000 --- a/content/agents/sf-setup.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: sf setup agent -description: Configure MCP and install the Spacefast skill for supported agent clients with one CLI command ---- - -`sf setup agent` configures supported clients it detects or you select. Add `-y` to accept the defaults without prompts. If detection finds no client, it installs the universal skill without writing MCP configuration. - -## The command - -```bash -sf setup agent -``` - -It detects the agent clients you have installed, writes each one's MCP config, and installs the Spacefast skill. It is idempotent, so running it again is safe. - -Run it without arguments and it asks two questions. First a checkbox list of the clients it found. Then how MCP should connect. - -| Choice | What it writes | -|---|---| -| Remote (default) | `sf mcp proxy` over stdio, using your CLI login | -| Local | `sf mcp`, a checkout-aware stdio server | -| Remote (OAuth) | The hosted URL directly, and your editor handles OAuth | -| Skip | Nothing. Skills only | - -Then ask your agent for something read-only to confirm the config landed. - - -Use the Spacefast MCP server to search the docs for version rollback. - - - -Publish this folder to Spacefast and give me the live URL. - - -## Non-interactive - -```bash -sf setup agent -y -``` - -`--yes` skips both prompts, auto-detects your clients, and configures **remote proxy** MCP. That is the same default the interactive picker offers. - -:::warning -With `--yes`, setup accepts the hosted MCP server through `sf mcp proxy`. Pass `--local` to use the local stdio server instead. -::: - -## Flags - -| Flag | What it does | -|---|---| -| `--agent ` | Configure one client. Repeat for more. `auto` detects, `all` covers everything, `generic` writes a project `.mcp.json` | -| `--yes`, `-y` | Skip prompts and auto-detect | -| `--project` | Install skills into this project instead of the client's global skills directory | -| `--remote` | Hosted MCP through `sf mcp proxy` and your CLI login | -| `--local` | Local stdio MCP instead of the proxy. Cannot be combined with `--remote` or `--oauth` | -| `--oauth` | With `--remote`, connect to the hosted URL directly and let the editor handle OAuth. Requires `--remote` | -| `--skip-mcp` | Install skills without configuring MCP | -| `--force` | Overwrite locally modified or unverified Spacefast skill files | -| `--handoff` | Redeem a one-use handoff link from the dashboard before generating setup. The link is read from stdin | -| `--agent-name ` | With `--handoff`, the name shown for the connection, such as `Claude Code`. Defaults to the detected client | - -```bash -sf setup agent -y --agent cursor --remote --oauth -``` - -:::warning[Never pass a handoff link as an argument] -Command arguments land in shell history and in the process list. `sf` aborts before parsing if it sees a handoff link on the command line. Pipe it to `--handoff` on stdin instead. -::: - -## What it writes into your project - -Skills are the only thing that lands in your project, and only with `--project`. Everything else goes to the client's global config, with two exceptions. VS Code writes `/.vscode/mcp.json` with `--project` or when run from a remote terminal, and `--agent generic` writes `/.mcp.json`. - -With `--project`, the skill goes into that client's project skills directory. For most clients that is `/.agents/skills/spacefast/`. - -Config merges are careful. Only the client's own root key is rewritten, and every other top-level key in the file passes through untouched. JSONC input parses, but comments are not preserved on write. A symlinked or non-file config is refused rather than followed, with `Refusing symbolic link or non-file MCP config`. - -If `--agent auto` detects nothing, it falls back to the universal `.agents` target and writes no MCP config at all. - -## Related commands - -### `sf mcp install` - -MCP config only, with no skill install. - -```bash -sf mcp install --agent claude-code -sf mcp install --agent cursor --remote --oauth -``` - -Same method resolution. `--oauth` gives the direct hosted URL, `--local` gives `sf mcp`, and anything else gives the proxy. - -### `sf agents init` - -Writes a Spacefast block into `AGENTS.md` in the current directory, wrapped in `` and `` markers. Running it again replaces the block in place and leaves the rest of the file alone. Broken or duplicated markers make it stop rather than guess. - -```bash -sf agents init -``` - -### `sf plugins` - -Runs the universal plugin installer against a pinned version. - -```bash -sf plugins --agent claude-code -sf plugins --agent codex --dry-run -``` - -`--agent` defaults to `claude-code`. `--dry-run` prints the installer command without running it. Clients with no installer target are refused with a message pointing you back at `sf setup agent`. diff --git a/content/agents/share-chatgpt-html.mdx b/content/agents/share-chatgpt-html.mdx deleted file mode 100644 index 39c2d3df..00000000 --- a/content/agents/share-chatgpt-html.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Put HTML from ChatGPT online -description: Save the HTML ChatGPT wrote as index.html and drop it on drop.fast, or connect Spacefast to ChatGPT and ask it to publish ---- - -Save the page ChatGPT wrote as one `index.html` and drop it on drop.fast, with no account. Or connect Spacefast to ChatGPT and ask it to publish the page for you. - -## Get one working file - -Ask ChatGPT for the whole page in a single file, with its styles and scripts inside: - - -Make this a complete website in one index.html file, with the CSS and JavaScript inside it. Use no build step and no packages. - - -Copy the code into a file named `index.html`, and put any images beside it in the same folder. Open the file in a browser and check it before you publish. If ChatGPT wrote a framework project instead, follow [Frameworks and builds](/frameworks) to produce the directory to publish. - -## Publish the file - -Open [drop.fast](https://drop.fast) and drop the file on the window. If the page uses images or other files, drop the whole folder so they upload too. You can publish without an account. Keep the returned claim link and open it to claim the Space before anonymous expiry; see [Publish without an account](/anonymous-and-claim). When the claim lands, the claim page asks who can see the Space. - -Keep the folder to the page and its assets. A `package.json`, a lockfile, or a framework config next to `index.html` makes Spacefast build the folder instead of publishing it as it is. See the [plain HTML recipe](/recipes/html). - -## Publish from ChatGPT - -Connect Spacefast to ChatGPT on the web once. [Connect ChatGPT to Spacefast](/setup/chatgpt) has the plugin directory link and the custom MCP server steps. Custom MCP servers need a Business, Enterprise, or Edu workspace. - -Then ask ChatGPT to publish the page: - - -Publish this page to Spacefast, enable public access, and give me the live URL. - - -## Choose who can open it - -A team's new Spaces start private unless the team changed its default, and a bare URL to a private Space does not grant access. To let anyone on the web open it, set **General access** to **Public** in the Space's **Share** settings. - -For a restricted audience, keep the Space private and create a share link on the **Share link** card instead. Anyone with the share link can open the Space without an account. [Spacefast Share](/share) explains the choices and how to revoke access. - -## Update the same link - -To update the page, sign in on drop.fast and choose **Existing space**, or publish to the same Space with `sf publish --space `. Its live address stays the same, so recipients can keep using the link you sent. [Versions and rollback](/versions) explains retained versions and restoring an earlier one. - -To use your own address, [attach a custom domain](/domains). Check [Plans and billing](/billing) for the current plan allowances before choosing a plan. diff --git a/content/agents/share-claude-artifact.mdx b/content/agents/share-claude-artifact.mdx deleted file mode 100644 index 55857106..00000000 --- a/content/agents/share-claude-artifact.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Share a Claude artifact publicly -description: Export a Claude artifact as website files, publish it to Spacefast, and give anyone with the share link access ---- - -Export your Claude artifact as website files, publish the folder to Spacefast, then make it public. Visitors don't need a Claude account. - -If you want to share the artifact inside Claude instead, use Claude's own sharing controls. This guide publishes a separate website from exported files. It does not publish your conversation. - -## Export a working page - -Download the artifact's files from Claude. A standalone HTML page needs an `index.html` file. If you have a component rather than a complete page, ask Claude to turn it into a working website first, including its styles and dependencies. - -Open the exported page locally and check its images and interactions. Features that depend on Claude's chat or private files need their own implementation in the exported site. For a framework project, follow [Frameworks and builds](/frameworks) to produce the directory to publish. - -## Publish the folder - -Open [drop.fast](https://drop.fast) and drop the folder on the window. You can publish without an account. Keep the returned claim link and open it to claim the Space before anonymous expiry; see [Publish without an account](/anonymous-and-claim). - -Already working in an agent with Spacefast connected? Ask: - - -Publish this exported website to Spacefast, enable public access, and give me the live URL and claim link if it needs claiming. - - -See [Claude Code setup](/agents/claude-code) or [Claude Desktop setup](/agents/claude-desktop) if the connection is missing. - -## Choose who can open it - -A team's new Spaces start private unless the team changed its default, and a bare URL to a private Space does not grant access. To let anyone on the web open it, set **General access** to **Public** in the Space's **Share** settings. - -For a restricted audience, keep the Space private and create a share link on the **Share link** card instead. Anyone with the share link can open the Space without an account. [Spacefast Share](/share) explains the choices and how to revoke access. - -## Update the same link - -Publish the changed files to the same Space. Its live address stays the same, so recipients can keep using the link you sent. [Versions and rollback](/versions) explains retained versions and restoring an earlier one. - -To use your own address, [attach a custom domain](/domains). Check [Plans and billing](/billing) for the current plan allowances before choosing a plan. diff --git a/content/cli/agent-commands.mdx b/content/cli/agent-commands.mdx deleted file mode 100644 index e495a18f..00000000 --- a/content/cli/agent-commands.mdx +++ /dev/null @@ -1,307 +0,0 @@ ---- -title: Inspection and agent helpers -description: Look up a Space, fetch private content, apply saved settings, and the small commands built for agents and scripts -sidebar: - order: 27 ---- - -Use `sf inspect` and `sf fetch` to read a Space you can access. Other helpers change state: `sf apply` makes saved settings live, and `sf continue` updates your saved credential after an approved claim handoff. - -Every command here also takes the [global flags](/cli#global-flags). - -## sf inspect - -Look up a Space by ID, slug, live URL, or attached domain. - -```text -sf inspect TARGET [-T ] -``` - -### Arguments - -| Argument | What it does | -| --- | --- | -| `[target]` | Space ID, slug, live URL, or domain. Required. | - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `-T, --team=` | default team | Team slug, ID, or name. Env `SPACEFAST_TEAM`. | - -```bash -sf inspect docs -sf inspect https://spacefast.com -sf inspect spc_abc123 --team acme -``` - -Unlike most commands, `sf inspect` takes its target as an argument rather than `--space`, so you can point it at anything without linking or unlinking a directory. Paste a live URL you were given and find out which Space serves it. - -### Output - -A summary of the Space, then its live version and runtime state, or `Live version: none`. `--json` returns `{ "data": { "space": …, "runtime": …, "liveVersion": … } }`. - -### Errors - -| Code | Exit | When | -| --- | --- | --- | -| `validation_error` | 2 | No target passed. "Space target is required." | -| `not_found` | 20 | Nothing you can reach matches the target. | - -## sf fetch - -Fetch private Space content through the same exchange and host-only cookie flow a browser uses. - -```text -sf fetch [PATH] (--output | --status | --headers | --verify ) [--space ] -``` - -### Arguments - -| Argument | What it does | -| --- | --- | -| `[path]` | Canonical route to fetch. Defaults to `/`. | - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--output=` | none | File to write the response body into. | -| `--status` | off | Report the HTTP status without needing an output file. | -| `--headers` | off | Include response headers, minus any that carry credentials. | -| `--verify=` | none | Require a successful response serving this exact version ID. | -| `--space=` | linked Space | Space ID, live URL, domain, or slug. Env `SPACEFAST_SPACE`. | -| `-T, --team=` | default team | Team slug, ID, or name. Env `SPACEFAST_TEAM`. | -| `--claim-token=` | none | Space key (`sfc_…`) for an unclaimed anonymous Space. Env `SPACEFAST_CLAIM_TOKEN`. | - -You must pass at least one of `--output`, `--status`, `--headers`, or `--verify`, or the command fails rather than guessing what to do with the response. - -```bash -sf fetch /docs --output ./docs.html -sf fetch / --status --headers --json -sf fetch / --verify ver_123 --json -``` - -Use `--verify` in a publish script. It asserts that a private route really serves the version you published, end to end, through the same path a visitor takes. - -### Output - -```text -HTTP 200 OK -content-type: text/html; charset=utf-8 -Fetched /docs → ./docs.html (18342 bytes). -``` - -`data` carries `spaceId`, `path`, `status`, `statusText`, and, when you asked for them, `headers`, `output`, `bytes`, and `verification.versionId`. - -### Errors - -| Code | Exit | When | -| --- | --- | --- | -| `validation_error` | 2 | None of `--output`, `--status`, `--headers`, `--verify` was passed. | -| `private_fetch_verification_failed` | 1 | The response did not serve the version `--verify` named. | - -To open a private Space in a browser instead, use [`sf open`](/cli/project#sf-open). - -## sf apply - -Push saved Space settings that are not live yet onto the serving runtime. - -```text -sf apply [--space ] [--no-wait] [--wait-timeout ] -``` - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--wait` / `--no-wait` | `--wait` | Wait until the apply finishes before returning. | -| `--wait-timeout=` | `900` | Seconds to wait. Minimum 1. | -| `--space=` | linked Space | Space ID, live URL, domain, or slug. Env `SPACEFAST_SPACE`. | -| `-T, --team=` | default team | Team slug, ID, or name. Env `SPACEFAST_TEAM`. | -| `--claim-token=` | none | Space key (`sfc_…`) for an unclaimed anonymous Space. Env `SPACEFAST_CLAIM_TOKEN`. | - -```bash -sf apply -sf apply --space docs --no-wait -``` - -### Output - -One line, depending on what it found: `Everything saved is already live.`, `Applied the saved changes.`, `Applying the saved changes.`, or `Waiting to apply the saved changes.` - -`--json` returns `{ "data": { "applied": true, "applyState": { … } } }`. `applied` is true when the saved state is live or an apply that will make it live is running. - -### Errors - -| Code | Exit | When | -| --- | --- | --- | -| `apply_failed` | 1 | The runtime could not apply the saved changes. Re-run once the Space is out of a failed state. | -| `timeout_error` | 50 | The wait budget ran out. The apply may still finish. | - -## sf continue - -Exchange a saved space key for a durable Space API key once the Space is claimed. - -```text -sf continue [--claim-token ] -``` - -| Flag | Default | What it does | -| --- | --- | --- | -| `--claim-token=` | saved key | Space key (`sfc_…`) for an unclaimed anonymous Space. Env `SPACEFAST_CLAIM_TOKEN`. | - -```bash -sf continue -``` - -This is the last step of an anonymous flow where the person claiming the Space chose [Claim & keep access](/anonymous-and-claim#keeping-your-agent-publishing). `sf continue` trades the saved space key for a durable key bound to the claimed Space, so the same directory keeps publishing. Without that approval, reconnect with a new credential. - -Run it from the directory you published from. - -### Output - -```text -Continued: https://docs.view.fast -Saved a durable API key to .spacefast/state.json. -``` - -`data` carries `space`, `credential` (`accessTokenId`, `label`, `teamId`, never the secret), and `statePath`. - -### Errors - -| Code | Exit | When | -| --- | --- | --- | -| `validation_error` | 2 | "No saved space key found. Run `sf continue` from the published directory, or pass --claim-token." | -| `checkout_state_conflict` | 30 | Another process changed the checkout credential mid-command. Re-run it. | - -## sf doctor - -Check local CLI state, auth, API reachability, and Space selection for the current directory. - -```text -sf doctor [--space ] [-T ] [--claim-token ] -``` - -```bash -sf doctor -sf doctor --space docs -``` - -It runs these checks in order: `state`, `project-config`, `auth`, `api` (a health request against the resolved API URL), `schema`, `account`, and, when a Space is selected, `space`, `runtime`, and `publish`. Each HTTP probe gets 10 seconds. - -### Output - -```text -ok auth API key available for https://api.spacefast.com. -ok api API reachable: https://api.spacefast.com -ok account Authenticated as dev@example.com -``` - -Each line is `ok` or `fail`, the check name, and what it found. - -`data` carries `ok`, the `checks` array, and `space`, `runtime`, `latestVersion` when a Space was checked. - -`sf doctor` exits `1` if any check fails. It is the one command that does not use the classified [exit codes](/cli#exit-codes). - -## sf docs - -Search the bundled docs offline: guides, CLI, API reference, and recipes. - -```text -sf docs [QUERY...] [--full] [--all] -``` - -| Flag | Default | What it does | -| --- | --- | --- | -| `--full` | off | Include full-tier docs, everything but advanced reference. | -| `--all` | off | Include every doc, reference tier included. | - -```bash -sf docs -sf docs rollback -sf docs domains --full -sf docs --all --json -``` - -The index ships inside the CLI, so this works with no network and no login. A multi-word query works without quoting. An exact topic slug prints the whole page instead of a result list. - -### Output - -Matching titles and summaries, or one full topic. `data` carries `query`, `tier`, `topic` (null unless the query hit a topic exactly), and `results`. `sf docs --all --json` is the whole catalog in one call, which is the fast way for an agent to find the right page. - -## sf map - -Print the machine-readable command map. - -```text -sf map [--paths] -``` - -| Flag | Default | What it does | -| --- | --- | --- | -| `--paths` | off | Print only canonical command invocations, one per line. | - -```bash -sf map --json -sf map --paths -``` - -### Output - -Without `--paths`, one line per command with its usage and summary, and `data.commands[]` carrying `id`, `usage`, `description`, `aliases`, and `hidden` for every canonical command. With `--paths`, `data.paths[]` is a plain list of invocations, suited to shell completion or a menu. - -## sf feedback - -Send feedback to Spacefast with optional error, request, Space, or URL context. - -```text -sf feedback --message [--category ] [--error-code ] [--request-id ] [--space ] [--url ] -``` - -| Flag | Default | What it does | -| --- | --- | --- | -| `--message=` | required | The feedback itself. | -| `--category=` | `other` | One of `bug`, `docs`, `limit`, `idea`, `other`. | -| `--error-code=` | none | Related API error code, straight from an `{ error }` receipt. | -| `--request-id=` | none | Related API request ID, also from the receipt. | -| `--space=` | none | Related Space. | -| `--url=` | none | Related URL. | - -```bash -sf feedback --message "The continuation docs are unclear" --category docs -sf feedback --message "Publish failed after claim" --category bug --error-code space_claimed_credential_available --request-id req_123 -``` - -Every failure receipt carries `error.code` and `error.requestId`. Passing both turns a complaint into something traceable. - -### Output - -```text -Feedback ref: fdb_0123456789abcdef -Thanks. We read every one. -Signed in with `sf login`? Read it back with `sf feedback inspect fdb_0123456789abcdef`. -``` - -`data` carries `ref` and `status`. `status` is `stored`. - -## sf plugins - -Install the Spacefast plugin for agents that support plugins. - -```text -sf plugins [--agent ] [--dry-run] -``` - -| Flag | Default | What it does | -| --- | --- | --- | -| `--agent=` | `claude-code` | Which agent to configure. `auto` detects, `all` does every one it finds. `sf plugins --help` lists every accepted name. | -| `--dry-run` | off | Print the pinned installer command without changing any agent configuration. | - -```bash -sf plugins --agent claude-code -sf plugins --agent cursor -sf plugins --agent codex --dry-run -``` - -`--dry-run` first is a good habit: it shows you the exact command that would run before anything touches your editor's configuration. For skills and MCP setup without the plugin, see [mcp, setup, skills, agents](/cli/agents). diff --git a/content/cli/agents.mdx b/content/cli/agents.mdx deleted file mode 100644 index 2409f84c..00000000 --- a/content/cli/agents.mdx +++ /dev/null @@ -1,226 +0,0 @@ ---- -title: mcp, setup, skills, agents -description: Configure supported coding agents for Spacefast, run the MCP server or its authenticated proxy, and manage the bundled agent skill -sidebar: - order: 26 ---- - -`sf setup agent` configures detected or selected supported clients, including Claude Code, Cursor, and Codex. Other MCP clients may need manual configuration. - -Every command here takes the global flags (`--api-url`, `--profile`, `--token`, `-y`/`--yes`). `sf mcp` and `sf mcp proxy` do not support `--json`, because stdout carries the MCP protocol. - -## Start here - -```bash -sf setup agent -y -``` - -That detects your agent clients, installs the Spacefast skill, and writes MCP config for each one. If you only want the MCP config, use `sf mcp install`. If you only want the skill, use `sf skills install`. - -## The three transports - -`sf setup agent` and `sf mcp install` write one of three configurations. - -| Method | What gets written | Who holds the credential | -| --- | --- | --- | -| `remote-proxy` (default) | `{"command": "sf", "args": ["mcp", "proxy"]}` | Your CLI login | -| `remote-oauth` (`--remote --oauth`) | A direct HTTP connection to the hosted server | Your editor, through OAuth | -| `local` (`--local`) | A local stdio server that can read your checkout | Your CLI login | - -**The default is `remote-proxy`.** Your editor speaks stdio to `sf` on your machine. `sf` speaks HTTPS to the hosted MCP server using the login you already have. You never do an OAuth dance in the editor. When you run `sf login` again, the proxy picks up the new login without an editor restart. The cost: `sf` has to be on your `PATH`, and you have to be logged in. An unauthenticated proxy answers JSON-RPC error `-32001` telling you to run `sf login`. - -Pick `--local` instead when you want the MCP server to publish files from your working directory. Pick `--remote --oauth` when you want the editor to own the credential rather than the CLI. - -For API operation tools, Apps, scopes, and saved approvals, see [the MCP server](/agents/mcp-server). For setup steps and the files written for each client, see [sf setup agent](/agents/sf-setup). - -## sf mcp install - -Install Spacefast MCP config into detected or selected coding agents. - -```text -sf mcp install [--agent ] [--remote] [--local] [--oauth] -``` - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--agent=` | detect | Agent or client to configure. Repeatable | -| `--remote` | `false` | Use hosted MCP through `sf mcp proxy` and the current CLI login | -| `--local` | `false` | Use checkout-aware local stdio MCP instead of the hosted proxy. Exclusive with `--remote` and `--oauth` | -| `--oauth` | `false` | With `--remote`, connect directly and let the editor handle OAuth. Requires `--remote` | - -`--agent` accepts: - -```text -auto all generic claude-code claude-app claude-desktop cursor codex -chatgpt vscode github-copilot github-copilot-app devin-desktop -devin-cloud zed gemini-cli opencode amp warp factory-droid cline -continue raycast poke pi indent hermes openclaw grok grok-build -grok-bot muse app.devin.ai chatgpt-work claude claude-code-cli claude.ai -clawhub copilot devin droid earendil factory gemini grok.com grokbot -muse.ai pi.dev windsurf -``` - -```bash -sf mcp install --agent claude-code -sf mcp install --agent cursor --remote --oauth -``` - -## sf mcp proxy - -Proxy remote Spacefast MCP over stdio using the current CLI login. You do not normally run this by hand. It is what the default config calls. - -```text -sf mcp proxy [--endpoint ] [--allow-credential-origin ] -``` - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--endpoint=` | the `mcp.` sibling of your login's API host, falling back to `https://mcp.spacefast.com` | Remote MCP endpoint. HTTPS is required except on loopback, and it may not carry credentials, a query, or a fragment. Env `SPACEFAST_MCP_URL` | -| `--allow-credential-origin=` | none | Send your Spacefast credential to this MCP origin even though it was not issued for it. Repeatable. Env `SPACEFAST_MCP_ALLOW_CREDENTIAL_ORIGIN` | - -Your credential goes only to the issuer's API and MCP origins, to loopback, or to an origin you allowed explicitly. Anything else is refused with JSON-RPC error `-32002`. Each response is capped at 32 MiB, and each request times out after 55 seconds. - -## sf mcp - -Run the Spacefast On-Device MCP server over stdio for MCP clients. This is the command for `--local`. It does not support `--json`. - -```text -sf mcp [--workspace-root ] -``` - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--workspace-root=` | the current working directory | Root allowed for On-Device MCP path publishing. Env `SPACEFAST_MCP_WORKSPACE_ROOT` | - -The server resolves your Space link and API client, then serves stdio. Publish paths are constrained to the workspace root: absolute paths, paths that escape the root, and symlinks are all refused. - -```bash -sf mcp -``` - -## sf setup agent - -Detect agent clients and configure Spacefast skills plus MCP in one idempotent flow. - -```text -sf setup agent [-y] [--agent ] [--project] [--remote] [--local] [--oauth] - [--skip-mcp] [--force] [--handoff] [--agent-name ] [--no-open] -``` - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `-y, --yes` | `false` | Skip prompts, auto-detect agents, and use hosted MCP through `sf mcp proxy` | -| `--agent=` | detect | Agent or client to configure. Repeatable. Same values as `sf mcp install` | -| `--project` | `false` | Install skills into this project instead of global agent directories | -| `--remote` | `false` | Use hosted MCP through `sf mcp proxy` and the current CLI login | -| `--local` | `false` | Use checkout-aware local stdio MCP instead of the hosted proxy. Exclusive with `--remote` and `--oauth` | -| `--oauth` | `false` | With `--remote`, connect directly and let the editor handle OAuth. Requires `--remote` | -| `--skip-mcp` | `false` | Install skills without configuring MCP | -| `--force` | `false` | Overwrite locally modified or unverified Spacefast skill files | -| `--handoff` | `false` | Redeem a one-use agent handoff link from the dashboard before generating setup. The link is read from stdin | -| `--agent-name=` | none | With `--handoff`, the connection name shown to the person | -| `--[no-]open` | on | Open the browser when a step needs it. `--no-open` prints the link instead | - -Interactively it shows a checkbox agent picker, then asks which transport you want. Whatever you pick, it always installs the skill afterwards. - -```bash -sf setup agent -y -sf setup agent -y --agent cursor --remote --oauth -``` - -## sf skills install - -Install or update the Spacefast agent skill bundled with this CLI. Bare `sf skills` prints help. - -```text -sf skills install [--agent ] [--project] [--list] [--force] -``` - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--agent=` | `auto` | Agent to install for. Repeatable. `auto` configures detected agents plus `.agents/skills` | -| `--project` | `false` | Install into this project instead of the agent's global skills directory | -| `--list` | `false` | List bundled skill files without installing | -| `--force` | `false` | Overwrite locally modified or unverified Spacefast skill files | - -The skill is named `spacefast` everywhere. It tells the agent to use the MCP tools first, to publish once and then poll, and to report the live URL, the immutable version URL, and the access URL when the receipt includes one. - -```bash -sf skills install -sf skills install --agent codex -sf skills install --agent all -``` - -## sf skills status - -Check installed Spacefast skills against the revision bundled with this CLI. - -```text -sf skills status [--agent ] [--project] -``` - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--agent=` | `auto` | Agent to check. Repeatable. `auto` checks detected agents plus `.agents/skills` | -| `--project` | `false` | Check project-local skills instead of global skill directories | - -```bash -sf skills status -sf skills status --agent codex -sf skills status --project --agent claude-code -``` - -## sf skills remove - -Remove the Spacefast skill while preserving locally modified files unless forced. Aliased as `sf skills rm`. - -```text -sf skills remove [--agent ] [--project] [--force] -``` - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--agent=` | detect | Agent to remove from. Repeatable | -| `--project` | `false` | Remove project-local skills instead of global skills | -| `--force` | `false` | Remove locally modified or unverified Spacefast skill files | - -This confirms before removing unless you pass `-y`. - -```bash -sf skills remove --agent codex -sf skills remove --project --agent claude-code -``` - -## sf agents init - -Create or update the Spacefast block in `AGENTS.md`. - -```text -sf agents init [directory] [--agent generic|claude-code] -``` - -| Argument or flag | Default | What it does | -| --- | --- | --- | -| `[directory]` | current directory | Project root to write into | -| `--agent=` | `generic` | `claude-code` also adds an `@AGENTS.md` import to `CLAUDE.md` so Claude Code reads the block | - -It writes `AGENTS.md` in that directory with mode `0644`, inserting or refreshing a block delimited by `` and ``. Everything outside those markers is left alone, so running it again is safe. - -```bash -sf agents init -sf agents init ./my-project --agent claude-code -``` diff --git a/content/cli/api-keys.mdx b/content/cli/api-keys.mdx deleted file mode 100644 index 1c436bb5..00000000 --- a/content/cli/api-keys.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: sf api-keys -description: Create, list, and revoke the API keys that authenticate CI jobs, scripts, and agents against Spacefast -sidebar: - order: 10 ---- - -API keys authenticate anything that cannot run a browser login: CI jobs, scripts, servers, agents. A key belongs to a team and carries the permissions of the preset you created it with. - -Every subcommand needs a login or a `--token` of its own, and acts on your default team unless you name another. Every command here also takes the [global flags](/cli#global-flags). - -## sf api-keys create - -Create an API key and print its one-time secret. - -```text -sf api-keys create [--name ] [--preset ] [--connection ...] -``` - - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--name=` | none | Human-readable API key name. Set one so you can tell keys apart later | -| `--[no-]open` | on | Open the browser. `--no-open` prints the link instead | -| `--preset=` | `space_publisher` | Access preset compiled into the key's policy. One of `ci_deploy`, `space_publisher`, `space_admin`, `domain_manager`, `team_admin`, `billing_viewer`. | -| `--connection=` | all team connections | Connector connection (`cxn_…`) the key may use. Repeat for more. Only `team_admin` includes connector access. | - -### Presets - -| Preset | What a key with it can do | -| --- | --- | -| `space_publisher` | Publish to Spaces and read the team that owns them. The default. | -| `ci_deploy` | The same permissions as `space_publisher`, named for CI. | -| `space_admin` | Everything publishing does, plus rename, delete, transfer, export and import Spaces, delete versions, manage domains and webhooks, and set Space access policy. | -| `domain_manager` | Manage domains and DNS. Nothing else. | -| `billing_viewer` | Read the team and its billing. | -| `team_admin` | Everything the team can do. | - -### Examples - -```bash -sf api-keys create --name ci -sf api-keys create --name domains-bot --preset domain_manager -sf api-keys create --name linear-bot --preset team_admin --connection cxn_abc123 -``` - -### Output - -```text -Created API key ci. -ID: key_0123456789abcdef -Permissions: publish:write, teams:read -Secret: sfa_xxxxxxxxxxxx -Store this secret now. It is only shown once. -``` - -The secret appears once and is never retrievable. Copy it straight into your secret store. - -With `--json`, `data` carries `apiKey` and the compiled `permissions` array. The secret is replaced with a note saying it was shown once. Run the command without `--json` when you need the value, or pipe the human output where you want it. - -Use the key by exporting `SPACEFAST_TOKEN`, passing `--token`, or storing it with `sf login --token`. - -### Errors - -| Code | Exit | When | -| --- | --- | --- | -| `auth_required` | 10 | Not authenticated. "Run `sf login` or pass --token before managing API keys." | -| `validation_error` | 2 | No team resolved. "Choose a default team with `sf teams switch ` first." | - -## sf api-keys list - -List API keys for the selected team. - -```text -sf api-keys list [-T ] [--limit ] -``` - -Aliases: `sf api-keys ls`. - -| Flag | Default | What it does | -| --- | --- | --- | -| `-T, --team=` | default team | Team slug, ID, or name. Env `SPACEFAST_TEAM`. | -| `--limit=` | `50` | Maximum keys to return. Between 1 and 100. | - -```bash -sf api-keys list -sf api-keys list --team acme -``` - -### Output - -A table of keys, and with `--json` the list envelope from the API straight through: - -```json -{ - "data": [ - { - "id": "key_0123456789abcdef", - "name": "ci", - "preset": "space_publisher", - "enabled": true, - "revokedAt": null, - "secretPreview": "sfa_ab12...cdef", - "lastUsedAt": null, - "createdAt": "2026-06-01T00:00:00.000Z", - "updatedAt": "2026-06-01T00:00:00.000Z" - } - ], - "pagination": { "nextCursor": null, "hasMore": false } -} -``` - -`secretPreview` is the only fragment of the secret you ever see again. `lastUsedAt` tells you which keys are dead weight. - -## sf api-keys update - -Rename an API key, or change which connector connections it may use. - -```text -sf api-keys update [--name ] [--connection ... | --all-connections] -``` - -| Flag | Default | What it does | -| --- | --- | --- | -| `--name=` | unchanged | New API key name | -| `--connection=` | unchanged | Connector connection (`cxn_…`) the key may use. Repeat for more. Cannot be combined with `--all-connections` | -| `--all-connections` | `false` | Remove the connection limit so the key can use every team connection again | - -```bash -sf api-keys update key_0123456789abcdef --connection cxn_abc123 --connection cxn_def456 -sf api-keys update key_0123456789abcdef --all-connections -``` - -## sf api-keys revoke - -Revoke an API key. - -```text -sf api-keys revoke ID [-y] -``` - -| Argument | What it does | -| --- | --- | -| `` | API key ID, for example `key_0123456789abcdef`. Take it from `sf api-keys list`. | - -```bash -sf api-keys revoke key_0123456789abcdef -``` - -It confirms first: `Revoke API key ? Every integration using it stops working immediately.` The effect is immediate and there is no undo, so mint the replacement before you revoke the old one. - -This is a remote destructive action. Agent mode never auto-confirms it, and a non-interactive run needs an explicit `--yes` or fails with `confirmation_required` (exit 2). - -### Output - -```text -Revoked API key key_0123456789abcdef. -``` - -`--json` returns `{ "data": { "id": "key_0123456789abcdef", "revoked": true } }`. - -Revoking a key does not sign you out of the CLI. `sf logout` handles the credential the CLI minted for itself. diff --git a/content/cli/api.mdx b/content/cli/api.mdx deleted file mode 100644 index 8179171a..00000000 --- a/content/cli/api.mdx +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: sf api -description: Call any public Spacefast API endpoint with the credential the CLI already has, including cursor pagination and binary downloads -sidebar: - order: 11 ---- - -`sf api` sends a signed request to the public API using whatever credential the CLI already resolved, so you never build an `Authorization` header by hand. Use it for endpoints that have no dedicated command yet, and for scripting against the raw contract. - -Call the Spacefast API directly. - -```text -sf api [METHOD] PATH [-i ] [--idempotency-key ] [--include] [--paginate] [--output | --raw-stdout] -``` - -## Arguments - -| Argument | What it does | -| --- | --- | -| `` | HTTP method (`GET`, `POST`, `PATCH`, `PUT`, `DELETE`) or the request path. | -| `[path]` | Request path, for example `/v1/spaces/{spaceId}/versions`. Required when the first argument is a method. | - -If the first argument matches a method it is treated as one and the second argument becomes the path. Otherwise the method defaults to `GET`. A missing path fails with `Usage: sf api [METHOD] /v1/`. - -## Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `-i, --input=` | none | JSON request body. A literal string, `@file`, or `-` for stdin. | -| `--experimental` | off | Allow a feature-gated operation that is enabled for your account or team, even though it sits outside the public contract. | -| `--idempotency-key=` | none | Replay-safe logical-attempt key for retryable mutations. Sent as the idempotency header. | -| `--include` | off | Write the HTTP status and a safe subset of response headers to stderr. | -| `--paginate` | off | Emit every page of a cursor-paginated list `GET` as JSON Lines. | -| `--output=` | none | Write a non-JSON response body to a file. Exclusive with `--raw-stdout`. | -| `--raw-stdout` | off | Write a non-JSON response body to stdout. Exclusive with `--output`. | - -Global flags apply, with one exception. `sf api --help` lists `--json` because every command inherits it, but `sf api` never renders a `{ data }` envelope. It prints the response from the API. Agent mode knows this and does not append `--json` to `sf api`. - -## Examples - -```bash -sf api /v1/me -sf api GET /v1/spaces/spc_123/versions --paginate -sf api POST /v1/publish --input @publish.json --idempotency-key 01J-logical-attempt -echo '{"name":"x"}' | sf api POST /v1/teams --input - -sf api GET /v1/spaces/spc_123/versions/ver_123/archive --output site.tar.gz -``` - -## What it will not call - -`sf api` calls the public contract and nothing else. It takes an API-relative path, never an absolute URL or an origin. - -| Path | Result | -| --- | --- | -| Anything outside `/v1/` | `path_not_public` (exit 2) | -| `/v1/mcp…` | `audience_not_callable` (exit 2) | -| `/v1/auth/agent-handoffs…` | `audience_not_callable` (exit 2) | -| `/v1/teams/{teamId}/billing/…` | `audience_not_callable` (exit 2), manage billing in the dashboard. `GET /v1/teams/{teamId}/billing` itself is public | -| `/v1/internal…` | `audience_not_callable` (exit 2) | - -`--experimental` lifts the `audience_not_callable` refusal only for a dashboard operation enabled for your account or team. It never opens `/v1/mcp`, agent handoffs, or internal paths. - -Paths are also normalized before they go out. A URL fragment, a backslash, a `.` or `..` segment, an encoded separator, or invalid percent-encoding each fails with `validation_error` (exit 2) rather than being sent. - -## Pagination - -`--paginate` works only on cursor-paginated list endpoints, the ones declared as cursor lists in the published OpenAPI spec. See [pagination](/api/pagination) for which those are and how the cursor works. - -It follows `pagination.nextCursor` until it runs out and prints one page per line as JSON Lines: - -```bash -sf api GET /v1/spaces/spc_123/versions --paginate -``` - -```json -{"data":[{"id":"ver_1"}],"pagination":{"nextCursor":"c2","hasMore":true}} -{"data":[{"id":"ver_2"}],"pagination":{"nextCursor":null,"hasMore":false}} -``` - -On a non-GET request it fails with `--paginate is only valid for GET requests.` On a path that is not a declared cursor list it fails with `--paginate requires a cursor-list GET operation declared in the bundled public OpenAPI spec.` Both are exit 2. - -## Output - -A JSON response prints verbatim on stdout, envelope and all. A success is `{ data }` from the API; a failure is its problem document. A `204`, `205`, or `304` has no body, so `sf api` prints `{"data":null}` instead of reporting an un-downloadable response. - -A non-JSON response needs somewhere to go. Pass `--output ` to write it to disk or `--raw-stdout` to stream it, or the command fails rather than dumping bytes into your terminal. - -`--include` writes the status line and these headers to stderr so stdout stays parseable: `content-type`, `content-length`, `etag`, `cache-control`, `retry-after`, `ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`, `idempotency-replayed`, `x-request-id`, `deprecation`, `sunset`, `link`. - -## Errors - -The exit code follows the HTTP status the same way every other command does. See [exit codes](/cli#exit-codes). Anything the table does not classify exits 1. - -| Code | Exit | When | -| --- | --- | --- | -| `path_not_public` | 2 | The path is outside `/v1/`. | -| `audience_not_callable` | 2 | The path belongs to a non-public audience. | -| `absolute_url_not_allowed` | 2 | You passed a full URL or an origin instead of a path. | -| `binary_output_requires_destination` | 2 | A non-JSON response with no `--output` or `--raw-stdout`. | -| `pagination_response_invalid` | 1 | A cursor list returned no pagination envelope, invalid JSON, a non-JSON body, or a repeated cursor. | diff --git a/content/cli/builds.mdx b/content/cli/builds.mdx deleted file mode 100644 index 3c8bc3c0..00000000 --- a/content/cli/builds.mdx +++ /dev/null @@ -1,280 +0,0 @@ ---- -title: sf build and sf builds -description: Build and pack a project locally, then list, inspect, follow, cancel, and retry the builds Spacefast runs for you -sidebar: - order: 3 ---- - -You can pack a build output archive locally, or drive every remote build a Space runs, from list to retry. - -A build turns source into a version. `sf publish --remote` and repository pushes create builds; `sf build` runs the same build locally and leaves you an archive. See [Frameworks and builds](/frameworks) for detection and the build settings model. - -## sf build - -Build and pack project output. - -```text -sf build [DIR] -``` - -Detects build settings, runs the build, and packs the output into an archive. A `zero` runtime compiles the capsule instead and leaves the app shell that `sf publish` would upload. This command talks to your filesystem, not to a Space. - -### Arguments - -| Argument | Default | What it is | -| --- | --- | --- | -| `[DIR]` | `.` | Project directory to build | - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--root-directory=` | project root | Project subdirectory that contains the app | -| `--install-directory=` | app root | Project subdirectory to run dependency installation from | -| `--install-command=` | package-manager detection | Install command | -| `--build-command=` | framework and package script detection | Build command | -| `--output-directory=` | framework default | Build output directory relative to the app root | -| `--env-file=` | none | Local dotenv file to load for install and build commands. Repeatable | -| `--ignored-build-command=` | none | Command that exits 0 when this build should be skipped | -| `--skip-install` | off | Skip the install command | -| `--skip-build` | off | Skip the build command and pack the selected directory unless `--output-directory` is set | -| `--prebuilt` | off | Pack an already-built output directory. Skips install and build | -| `--output=` | `.spacefast/build-output.tgz` | Archive path to write | -| `--dry-run` | off | Print the detected build plan without installing, building, or packing | -| `--stream` / `--no-stream` | `--stream` | With `--json`, emit a JSONL build event stream. `--no-stream` gives a single result blob | - -`sf build --json` streams by default. `sf publish --json` does the opposite and needs `--stream` to opt in. - -### Examples - -```bash -sf build -sf build --root-directory apps/web --output ./apps/web.tgz -sf build --dry-run -``` - -### Output - -Human output is the build plan and the build's own stdout, then the archive path. With `--json --stream` each line is one event (`build.started`, `build.log`, `build.succeeded`, `build.failed`). - -## sf builds list - -List builds. Alias: `sf builds ls`. - -```text -sf builds list -``` - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--space=` | linked Space | Space ID, live URL, domain, or slug. Env `SPACEFAST_SPACE` | -| `-T, --team=` | default team | Team slug, ID, or name. Env `SPACEFAST_TEAM` | -| `--claim-token=` | saved key | Space key (`sfc_…`) for an unclaimed anonymous Space. Env `SPACEFAST_CLAIM_TOKEN` | -| `--limit=` | `20` | Maximum builds to return. 1 to 100 | -| `--cursor=` | none | Pagination cursor from a previous response | - -### Examples - -```bash -sf builds list --space docs -sf builds list --space docs --limit 5 -``` - -### Output - -Newest first, as a table of `ID`, `STATUS`, `INPUT`, `VERSION`, `CREATED`. When more pages exist, the CLI prints the next `--cursor` to pass. `--json` returns `{ data: [...], pagination: { nextCursor, hasMore } }`. - -Build statuses are `waiting_for_source`, `uploading_source`, `queued`, `running`, `succeeded`, `failed`, `canceled`, and `skipped`. The first four are in flight; the rest are terminal. `skipped` means the runner decided not to run the build at all, for example because a newer build for the same branch superseded it. - -## sf builds inspect - -Show a build. - -```text -sf builds inspect BUILD -``` - -### Arguments - -| Argument | Default | What it is | -| --- | --- | --- | -| `` | required | Build ID (`bld_…`) | - -### Example - -```bash -sf builds inspect bld_123 -``` - -### Output - -`Build`, `Space`, `Status`, `Input`, `Root directory`, `Install directory`, `Command`, `Produced version`, `Reused version`, `Created`, `Finished`, then one line per diagnostic. `--json` returns `{ build }`. - -## sf builds logs - -Print build logs. - -```text -sf builds logs BUILD -``` - -Prints build runner log lines, newest first. With `--follow` it streams until the build reaches a terminal state. - -### Arguments - -| Argument | Default | What it is | -| --- | --- | --- | -| `` | required | Build ID (`bld_…`) | - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `-f, --follow` | off | Follow live build logs until the build reaches a terminal state | -| `--limit=` | server default | Maximum number of log lines. 1 to 100 | -| `--cursor=` | none | Pagination cursor from a previous response | -| `--wait-timeout=` | none | With `--follow`, stop following after this many seconds and exit 0 | - -### Examples - -```bash -sf builds logs bld_123 -sf builds logs bld_123 --follow -``` - -### Output - -One line per entry, `timestamp level message`. With `--follow`, `--json` returns `{ build }` for the terminal build once the stream ends. - -## sf builds cancel - -Cancel a build. - -```text -sf builds cancel BUILD -``` - -Idempotent: a build already in a terminal state comes back unchanged. A build that has passed the publish boundary refuses to cancel. - -### Arguments - -| Argument | Default | What it is | -| --- | --- | --- | -| `` | required | Build ID (`bld_…`) | - -### Example - -```bash -sf builds cancel bld_123 -``` - -### Output - -The same build block `sf builds inspect` prints, in its new state. `--json` returns `{ build }`. - -## sf builds retry - -Retry a terminal build. - -```text -sf builds retry BUILD -``` - -Retries a terminal build with the same input, settings, and target. The retry is a new build that reuses the original immutable input. - -### Arguments - -| Argument | Default | What it is | -| --- | --- | --- | -| `` | required | Build ID (`bld_…`) to retry | - -### Example - -```bash -sf builds retry bld_123 -``` - -### Output - -`Retry queued: bld_…` plus the build block, or `Retry waiting for source archive upload` with an `Upload URL` and `Upload expires` when the retry needs its source archive again. `--json` returns `{ build, upload }`. - -### Errors - -| Code | Exit | What to do | -| --- | --- | --- | -| `build_retry_requires_terminal_state` | 2 | The build is still running. Wait, or cancel it first | - -## sf builds upload refresh - -Refresh source archive upload. - -```text -sf builds upload refresh BUILD -``` - -Refreshes the upload instruction for a build waiting on its source archive. Source-archive upload URLs expire after 60 minutes; this mints a new one without creating a new build. - -### Arguments - -| Argument | Default | What it is | -| --- | --- | --- | -| `` | required | Build ID (`bld_…`) waiting for source archive upload | - -### Example - -```bash -sf builds upload refresh bld_123 -``` - -### Output - -`Upload instruction refreshed: bld_…` with the new `Upload URL` and `Upload expires`, or `Build no longer needs source archive upload` when the archive already landed. `--json` returns `{ build, upload }`. - -## sf builds detect - -Detect framework and build settings. - -```text -sf builds detect [DIR] [--local] -``` - -With a selected Space, inspects its repository connection and shows the detected app, ranked candidates when the repository holds more than one, and any platform config it found that Spacefast cannot convert. This reads the repository, not your working directory. - -Pass a directory or `--local` to inspect local files instead, with no sign-in. - -### Arguments - -| Argument | Default | What it is | -| --- | --- | --- | -| `[DIR]` | `.` when no Space is selected | Local project directory to inspect | - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--space=` | linked Space | Space ID, live URL, domain, or slug. Env `SPACEFAST_SPACE` | -| `-T, --team=` | default team | Team slug, ID, or name. Env `SPACEFAST_TEAM` | -| `--claim-token=` | saved key | Space key (`sfc_…`) for an unclaimed anonymous Space. Env `SPACEFAST_CLAIM_TOKEN` | -| `--local` | off | Inspect local files even when the directory is linked to a Space | -| `--connection-type=connected\|hosted` | `connected` | Repository connection type | -| `--ref=` | default branch | Git ref to inspect | -| `--root-directory=` | repository root | App root directory to inspect | -| `--apply-best` | off | Save the highest-ranked detected candidate as the repository build settings | - -### Examples - -```bash -sf builds detect ./apps/web -sf builds detect --space docs -sf builds detect --space docs --root-directory apps/web --apply-best -``` - -### Output - -Two tables. Candidates, as `ROOT`, `INSTALL`, `SCORE`, `FRAMEWORK`, `BUILD`, `OUTPUT`, `REASONS`; and unsupported platform config, as `PLATFORM`, `ROOT`, `BUILD`, `OUTPUT`, `UNSUPPORTED`. Candidates score higher for a matched framework preset and for a build script. - -## sf redeploy - -`sf redeploy` retries the latest build without naming it. It is documented with the other version commands on the [versions page](/cli/versions). diff --git a/content/cli/comments.mdx b/content/cli/comments.mdx deleted file mode 100644 index c4e9a2e6..00000000 --- a/content/cli/comments.mdx +++ /dev/null @@ -1,510 +0,0 @@ ---- -title: sf comments -description: List, read, start, reply to, react to, resolve, and export comment threads, and set where Comments run -sidebar: - order: 13 ---- - -`sf comments` works with a Space's comment threads and its Comments settings. For what Comments do and who can comment, see [Comments](/comments). - -Every command here takes the global flags (`--api-url`, `--profile`, `--token`, `-y`/`--yes`, `--json`) and the space selection flags (`--space`, `-T`/`--team`, `--claim-token`). See [the CLI overview](/cli). - -`sf comments` with no subcommand prints the help for the group. - -Comments need a claimed Space that belongs to a team, with **Page Enhancements** on. `create`, `reply`, `react`, `unreact`, `read`, `resolve`, and `reopen` need a credential that acts as a person. - -## Common arguments and values - -| Value | What it is | -| --- | --- | -| `` | A thread ID, for example `cmt_123` | -| `--version=` | A version ID (`ver_...`), a ref such as `v3`, or a number. `3` matches `v3`. A value that matches no version in the Space fails with `validation_error` (exit 2) | -| `--status=` | `open` or `resolved` | - -The API names the resolved state `archived`. The CLI translates `resolved` to `archived` in requests, and `--json` output keeps `archived`. - -## sf comments list - -List comment threads across a Space. Aliased as `sf comments ls`. Listing never marks a thread read. - -```text -sf comments list [--status open|resolved] [--unread] [--path ] [--version ] - [--author ] [--query ] [--limit ] [--space ] -``` - -### Flags - -| Flag | Default | What it does | -| --- | --- | --- | -| `--status=` | both | Only `open` or only `resolved` threads | -| `--unread` | `false` | Only threads with comments you have not read | -| `--path=` | none | Only threads on this page or file path, for example `/pricing` | -| `--version=` | none | Only threads left on this version | -| `--author=` | none | Only threads started by this author name | -| `--query=` | none | Only threads whose text contains this | -| `--limit=` | every thread | Maximum threads to return. Minimum 1 | - -Without `--limit`, the command reads every page of results. - -```bash -sf comments list --unread -sf comments list --status open --path /pricing -sf comments list --version v3 -``` - -### Output - -A table of `ID | STATUS | ON | REPLIES | COMMENT`. Open threads come first. An unread open thread has `●` in front of its ID. `ON` is the anchor: `page `, `element on `, or `file :`. `COMMENT` is the body on one line, cut to 59 characters and `…` when longer. - -With `--limit`, `More threads match. Raise --limit to see them.` follows the table when more threads match. - -With no threads: `No comments found.`, or `You're all caught up.` with `--unread`. - -With `--json`, the output is `{ data, pagination }`. `data` holds the threads in the [`listSpaceComments`](/api/reference/spaces/listspacecomments) shape. `pagination` is `{ nextCursor, hasMore }`. - -### Errors - -| Code | Exit | When | -| --- | --- | --- | -| `validation_error` | 2 | `--status` is not `open` or `resolved`, or `--limit` is below 1 | -| `validation_error` | 2 | `--version` matches no version in the Space | - -## sf comments inspect - -Show one thread with its replies and reactions. Reading a thread does not mark it read. - -```text -sf comments inspect [--space ] -``` - -### Arguments - -| Argument | What it is | -| --- | --- | -| `` | Thread ID, for example `cmt_123`. Required | - -No command-specific flags. - -```bash -sf comments inspect cmt_123 -``` - -### Output - -```text -cmt_123 open unread -On: element #hero-title on / -Author: Ana, 2026-10-12 17:03 UTC -Page: -Open: -Reactions: 👍 2 - - - -Milo replied 2026-10-12 17:20 UTC: - -``` - -Lines without a value are left out. A thread with no author name shows `Started: