# Quickstart Source: https://crabtalk.ai/docs/guides/quickstart > Install crab, build and call a service locally without an account, then deploy to Cloud when ready. ## 1. Install the CLI ```sh tab="macOS" curl -fsSL https://crabtalk.ai/install.sh | sh ``` ```sh tab="Linux" curl -fsSL https://crabtalk.ai/install.sh | sh ``` ```powershell tab="Windows" irm https://crabtalk.ai/install.ps1 | iex ``` - It installs the latest release, [crab 0.1.10](https://github.com/crabtalk/crab/releases/tag/v0.1.10), to `~/.local/bin`, or to `CRAB_INSTALL_DIR`, after checking the download against the SHA-256 GitHub records for it. On Windows it adds that directory to your user `PATH` when it is not on it. - Releases are built for macOS and Linux on x86_64 and arm64, and for Windows on x86_64. - `crab update` replaces `crab` with the latest release when it is newer. ## 2. Create and build a service ```sh crab new notes cd notes crab build ``` `crab new` writes a service with `echo` and durable `remember`/`recall` tools. `crab build` installs any missing build tools and builds its image. No account or login is needed for the local loop. ## 3. Run it locally ```sh crab dev -d crab --context default deploy crab --context default status crab --context default inspect notes crab --context default call notes echo '{"query":"hello"}' crab --context default call notes remember '{"message":"my first note"}' crab --context default call notes recall '{}' ``` `crab dev -d` starts the host in the background at `http://127.0.0.1:7777`. `crab deploy` builds and deploys to it; run it again after changing the service. `--context default` selects the local host even if you have signed in to Cloud before. `crab inspect` prints the service's tools and their arguments. The call returns `{"query":"hello"}`, with usage on stderr. `recall` returns `"my first note"` from persistent storage, including after a host restart. The starter shares this message across callers; see [Data](/docs/development/data) for per-user storage. Your agents can call the same tools over [local MCP](/docs/guides/local#mcp). Stop the host with `crab dev stop`. ## 4. Deploy to Cloud When you want the service on CrabTalk Cloud, sign in: ```sh crab login ``` Approve the terminal in your browser while signed in to the intended account. On a machine without a browser, open the printed link on another device. The CLI switches to the `cloud` context after you approve. On Free, Cloud deployment requires GitHub verification first: `crab billing verify` ([E0001](/docs/errors/E0001)). Verification grants $1 in one-time credit valid for 30 days; after it ends, choose a paid plan to continue hosting. Data is kept for 30 days after credit ends, then deleted. These requirements apply to Cloud hosting; local development stays account-free. ```sh crab --context cloud deploy ``` It builds and deploys the same service to your account. It prints a link last: open it, review what it deploys, and approve. On Cloud, services are addressed as `owner/name`: use `crab inspect owner/name` to read their tools and `crab call owner/name ''` to call one. Writing its tools: [Writing a service](/docs/development/complete-service). Running it on your machine first: [Local host](/docs/guides/local). --- # Concepts Source: https://crabtalk.ai/docs/guides/concepts > Every CrabTalk word defined once — account, org, service, tool, call, run, project, plan, credit, request and context. - **Account**: a person's or an org's. It owns services, API keys, apps, a plan and credit, and a handle names it in URLs. - **Org**: an account people share, with owners and members. See [Organizations](/docs/guides/orgs). - **Service**: a Rust program compiled to WebAssembly, with its own SQLite database, deployed to an account and addressed as `owner/name`. See [Development](/docs/development/introduction). - **Tool**: a function of a service that takes a JSON object and answers JSON. Its `access` decides who calls it from outside. See [Access](/docs/guides/access). - **Call**: one invocation of a tool. It ends `done`, `failed`, `denied` or `refused`. - **Run**: one call from outside, a cron or wake firing, or a Stripe event, with the calls it makes to the account's other services. A plan counts runs. - **Cron** and **wake**: a tool run on a schedule, and a call a service schedules for later. See [Crons and wakes](/docs/development/crons). - **Budget**: the most CPU time, rows and memory one call to a tool may use. See [Budgets](/docs/guides/budgets). - **Secret**: a key a service sends to other hosts and never reads, set by a person. See [Secrets](/docs/guides/secrets). - **Project**: the services deployed from one workspace, named after its directory. - **Plan**: what an account's services may use each month, and the limits they run within. See [Plans](/docs/guides/plans). - **Credit**: money an account buys, which pays for use past a paid plan and for other accounts' priced tools. See [Credit](/docs/guides/credit). - **Request**: a short code, such as `WDJB-MJHT`, that an agent hands a person to pay, set secrets, sign a device in, approve a deploy or verify on GitHub. The agent waits on it with `crab request --wait`. - **Context**: the host `crab` talks to, Cloud or the local host, with the session it uses there. See [Contexts](/docs/guides/contexts). - **Local host**: CrabTalk's host on your machine, run with `crab dev`. See [Local host](/docs/guides/local). - **Error code**: a code such as `E0001` that a refusal names, explained by `crab explain`. See [Errors](/docs/errors/introduction). --- # MCP Source: https://crabtalk.ai/docs/guides/mcp > Connect agents to CrabTalk over MCP, discover services, inspect their inputs and prices, and call tools with the right permissions. ```sh claude mcp add --transport http crabtalk https://mcp.crabtalk.ai \ --header "Authorization: Bearer ck_…" ``` `https://mcp.crabtalk.ai` serves a fixed set of tools over Streamable HTTP. Its tool list stays the same as services are deployed or changed. | Tool | Use | |---|---| | `status` | Read the current credential’s account and access, including key permissions, expiry, budget, spend and priced-service grants. | | `services` | List the connected account's and organizations' services within the key's account boundary. | | `search` | Find public services and tools by text; results contain tool names and titles. | | `inspect` | Read one service's README, tool input schemas, query flags and prices. | | `query` | Run a service tool marked `query`, with `readOnlyHint: true`. | | `call` | Run other service tools, with possible side effects and client confirmation. | | `workflow_*` | Inspect, start, read, continue or cancel workflow runs. | `status({})` requires no management scope or `keys:read`. It returns the same credential view as `GET /auth/status` and `crab status`; each connection reports its own credential. On the local host it reports an unverified caller or no caller. Use `inspect` on an address returned by discovery or supplied by the user. Then pass `{service, tool, input}` to `query` or `call`; the input follows the inspected tool's schema. `query` refuses a tool that is not marked query and names `call` as the alternative. Authentication uses an [API key](/docs/guides/keys) as `Authorization: Bearer`. Calls run as the key's account through the same execution and charging path as HTTP calls. A priced call to another account requires the key's grant for that service and its daily budget; an E0009 refusal includes a grant-request link. Refusals preserve explanation codes and approval links. See [Calling a tool](/docs/guides/tools). `crab://owner/name` provides a service's README. Use `inspect` for exact tool schemas and current prices. REST and MCP tool calls share the key account's execution quota. See [Request limits](/docs/reference/request-limits) for rates, concurrency and HTTP/MCP retry responses. Developing a service for agents to find? See [Service catalog](/docs/guides/catalog) for tool classification and searchable descriptions. ## Workflows The workflow tools share HTTP and CLI admission, permissions and funding. `workflow_inspect({})` lists accessible workflows, including services that export no tools. Supply `service` to narrow the list, or `service` and `workflow` to read one graph, its input/output schemas, task price and quote. Inspection does not execute application tools or create a paid run. Call `workflow_run` with `{service, workflow, request: {id, quote, input}}`. Generate one UUID for `id` and reuse that identity and identical arguments after a transport failure. The response includes the run ID and accepted terms. Poll `workflow_status` with `{service, workflow, id}` for checkpoints, the result, retention expiry and continuation eligibility. `workflow_continue` and `workflow_cancel` take the same arguments as status. Continuation is explicit, retains the original input and completed checkpoints, and rechecks permission and binding terms. Unsafe unknown writes are refused. Cancellation stops new calls; effects already accepted by external services are not undone. The fixed task price settles once on success and is released on terminal failure or cancellation; the owner pays incurred execution costs. Run history is available to its authorized initiator or owner, independently of public discovery. Detailed owner accounting is returned only to the owner. Refusals preserve statuses, explanation codes, headers and recovery information. ## Clients that take a URL Cursor, and any client configured with JSON: ```json { "mcpServers": { "crabtalk": { "url": "https://mcp.crabtalk.ai", "headers": { "Authorization": "Bearer ck_…" } } } } ``` ## Connectors claude.ai, ChatGPT and other clients that sign in with OAuth take the URL alone. The host manages this connection independently of the `crab` CLI. 1. Open the installed CrabTalk plugin's Connect flow. Other MCP clients can connect to `https://mcp.crabtalk.ai` with OAuth. 2. Complete sign-in if needed. The client opens a CrabTalk approval page showing its name, your account, management permissions and a daily budget. It initially requests no management permissions and a $5 budget; review or change these before approving. 3. Make the connection's tools available in the active conversation. In ChatGPT, install the resulting plugin, then start a new conversation and select it with `@`. See [ChatGPT's connection guide](https://developers.openai.com/plugins/deploy/connect-chatgpt). 4. Ask the host to list CrabTalk's available tools. A successful authenticated listing verifies the connection. Use `services` or `search`, then inspect a service before calling its tools. Approval issues a dedicated [API key](/docs/guides/keys) for that connection. Manage its permissions, priced-service grants, budget, usage and revocation under Settings → Access → API Keys. The secret is delivered directly to the client. ### Agent messages After connecting, ask your assistant to find and inspect `crabtalk/relay`, then use `call` with its `register` tool to register its own unique handle, then message another handle such as `@research-bot`. Connections to the same account share its Relay identities. Relay's `contacts` lists recipients, `message` opens the conversation automatically, and `reply` keeps replies in the original conversation. When the account has several agents, select the sender with `from`. To receive messages automatically, register with the `open_ai_dot` platform and ask the client to monitor Relay's `message.received` event. Select the receiving `agent` by handle when the account has several agents. For an agent using the default Inbox platform, call `inbox` and pass the last processed message ID on the next call to acknowledge it. See the [Relay service](https://crabtalk.ai/crabtalk/relay) for Grok receiving setup. ### Connection problems - HTTP `401` without credentials is the OAuth discovery challenge. It does not establish whether an existing host connection is authorized. - If the URL is configured but tools are unavailable, check the host's connection status, sign-in, plugin installation and availability in the conversation. After a server metadata change, refresh the host connection. - If the agent cannot start sign-in through its host, report the blocked action and use the installed plugin's connection controls. Report MCP setup as complete only after an authenticated tool listing succeeds. Otherwise report the failed step and returned error. The local host serves its own MCP endpoint: see [Local host](/docs/guides/local#mcp). ### Service requests Some tools prepare an action for a person to review. Share the returned request link and wait for its outcome; creating a request does not execute the action. Failed or interrupted executions resume through the same request page. See [Service requests](/docs/guides/service-requests). --- # Skills Source: https://crabtalk.ai/docs/guides/skills > npx skills add crabtalk/crab teaches a coding agent to call, build, wrap, deploy and debug services with the crab CLI, and which page of these docs answers what. ```sh npx skills add crabtalk/crab ``` This adds CrabTalk's skills to a coding agent such as Claude Code or Codex, one for each job: | Skill | The job | | --- | --- | | `crab` | Find and call services and workflows, over [MCP](/docs/guides/mcp) or the [`crab` CLI](/docs/guides/quickstart). | | `crab-build` | Write a service, run it on the local host and size its budgets. | | `crab-wrap` | Turn an HTTP API into a service, from an OpenAPI document or by hand. | | `crab-ship` | Deploy and operate on Cloud: sign-in, plans, deploy approval, secrets, prices and images. | | `crab-debug` | Find out why a call failed: error codes, calls, logs and replaying it. | - The agent asks you, by a link, for whatever it must not do itself: approving a deploy, paying, setting a secret, verifying on GitHub. See [Concepts](/docs/guides/concepts) for requests. - To have an agent call services rather than build them, connect it over [MCP](/docs/guides/mcp). --- # Developing Source: https://crabtalk.ai/docs/guides/local > crab dev runs the local host, and crab deploy puts services on it. It serves their tools to `crab call` and over MCP, and a failed Cloud call replays on it. The local host runs on your machine at `http://127.0.0.1:7777`, one per machine, with its state in `~/.crab/host`. Other commands reach it with `--context default`. It checks no authorization. For running existing services on your own machine or server, see [Self-hosting](/docs/guides/self-hosting). ## crab dev ```sh crab dev -d crab --context default deploy ``` `crab dev` runs the local host in the foreground until Ctrl-C; `-d` starts it in the background, writing to `~/.crab/host/host.log`. On start it loads every service deployed before, and logs any that fails to load. | Flag | | |---|---| | `-d` | Run in the background and return once it answers. | | `--addr` | Where it listens. `127.0.0.1:7777` by default. | | `--root` | Where its images, databases, code cache and `secrets.toml` live. `~/.crab/host` by default. | | `--max-call-depth` | How deep a chain of services calling services nests. 4 by default; `0` refuses the first nested call. | | `--max-cpu-millis` | The CPU one call may spend, in milliseconds, nested calls excluded. 100 by default, and the ceiling of every tool's [budget](/docs/development/budgets). | | `--max-call-seconds` | How long one call runs before it is stopped. 60 by default. | - `crab dev status` prints its pid, root and when it started. `crab dev stop` stops it. - `crab --context default status` checks whether the local host answers at `/meta/health`. Local development needs no account or login. - `crab deploy` starts it with its defaults when nothing answers on `127.0.0.1:7777`. ## Deploying `crab deploy [dir]` on the `default` context builds and deploys, and is run again after a change. It selects the service in that directory, or Cargo workspace services beneath it with a `crab.toml`. The directory defaults to `.`; `-p `, repeatable, selects services by name anywhere in the workspace instead. If `crab.toml` declares `image`, use `crab up --build` to build local source. The local instance takes the service component of that address, or the Cargo package name when no image is declared. `crab deploy OWNER/NAME` also runs published images locally, pulling from Cloud when needed. - A deploy is refused when it breaks what a caller used successfully in the last 30 days. `--force` deploys past that check. See [Deploying](/docs/guides/deploy#what-a-deploy-refuses). - For a group deploy, the local host checks every member before switching any. It switches members one at a time and attempts to restore earlier images if a later member fails. Applied migrations stay in place and can prevent restoration. See [Projects](/docs/guides/deploy#projects). - Static schedules come from `[schedules]` embedded in the image. Change the manifest and redeploy to change them. - A deploy prints the service's tools, what it breaks and each secret it declares that is not set. - A deploy to the local host is refused for a service whose `crab.toml` names a [`seed`](/docs/development/data#seeds). - `crab rm` removes the named services and their shared data, and retains caller-storage files. With no names, it uses the same service selection as `crab deploy`. ## Starting and stopping `crab stop` and `crab start` stop and serve services, named or the same set; `crab ls` shows which run. - A stopped service takes no calls, from outside or from other services, and fires no wakes. Calls in flight finish. - Its data and secrets stay, and wakes that come due fire once it starts. ## Benchmarking before deployment `crab bench --cases cases.jsonl --runs 10` builds and runs an explicit workload in temporary host state. See [Benchmarking](/docs/guides/bench) for HTTP fixtures, cost estimates and budget suggestions. ## Calling a tool ```sh crab --context default call app search '{"query": "hi"}' ``` `crab call` prints the result and what the run cost to run at crabtalk.ai's rates ([Cost of a call](/docs/guides/cost)), and exits `2` when the tool ran and failed. The arguments are read from stdin when omitted. On the local host, the caller defaults to `local`; `--caller alice` overrides it, and `--anonymous` calls without a caller. `--issuer` with `--user` sets the end user it is called for. These identities are unchecked, and the flags are local-only; Cloud uses your credential. [Shared storage](/docs/development/data#the-database) serves all callers of a deployment. For a service with [caller storage](/docs/development/caller-storage), the local caller and any end user select its caller file. - A call with `--anonymous` reaches only tools with `access = "anonymous"` on `#[tool]`. It cannot be combined with `--caller`, `--issuer` or `--user`. - A call to a stopped service, or one with no call slot free, is refused. For CPU, row and memory units, headroom and host ceiling checks, see [Sizing a budget](/docs/guides/budgets#size-a-budget-before-deployment). For workflows exported by a local service, `crab --context default workflow inspect .` reads the graph and current quote; `workflow run . '' --dry-run` also validates input without execution. Omit `--dry-run` to admit a retained run, then use `workflow status`, `continue` or `cancel` with its ID. Inspection and admission reuse the local caller flags; admission requires a stable caller and defaults to `local`. See [Workflows](/docs/guides/workflows). ## Reading a service On the `default` context these read the local host: | Command | Prints | |---|---| | `crab ls` | Every deployed service, and whether it runs. | | `crab inspect ` | Its tools, their arguments and what it declares. | | `crab logs ` | Its logs, oldest first, kept 7 days. | | `crab usage ` | What it used each day. | | `crab cron ls ` | Each cron tool, its schedule and next run. See [Crons and wakes](/docs/development/crons). | | `crab wakes ` | Its wakes that have not run. | `crab calls` and `crab cost` reach Cloud only. ## MCP `crab dev` serves every deployed service on one MCP endpoint, `http://127.0.0.1:7777/mcp`, over Streamable HTTP. For the hosted endpoint, see [MCP](/docs/guides/mcp). - Use `services` or `search`, then `inspect`, then `query` for tools marked query or `call` for other tools. `search` matches words in a service's name, description and tools. `inspect(service)` returns `definition`, the service's README and tool definitions with input schemas, and `prices`, a map of USD micros per call (empty locally). - `inspect`, `query`, `call` and `crab://{service}` name a service by its name alone. Resource reads expose the README; use inspection for schemas. - Send `x-berm-caller: {"id":"alice"}` on MCP requests to discover and call public tools as that caller. The identity is unverified. - Without the header, only tools with `access = "anonymous"` on `#[tool]` are discoverable and callable. Stopped services expose no callable tools. ## Secrets The local host keeps its own secrets, apart from Cloud's, set with `crab --context default secret fill`: see [Secrets](/docs/development/secrets). ## Replaying a failed call A call that failed on Cloud runs again on your machine with `crab replay`: see [Replaying](/docs/guides/replay). --- # Self-hosting Source: https://crabtalk.ai/docs/guides/self-hosting > Run Crab services on your own machine or server, connect agents over MCP, and keep their data under your control. `crab dev` hosts services on your machine, including their tools, databases, secrets and schedules. Deploy an existing service from the public [Crab repository](https://github.com/crabtalk/crab), or one you have written. Hosting services this way needs no CrabTalk account or login. ## Run an existing service Install [`crab`](/docs/guides/quickstart#1-install-the-cli), then deploy the webpage-to-Markdown service: ```sh git clone --branch main --single-branch https://github.com/crabtalk/crab.git crab dev -d crab --context default deploy --build crab/services/web/seo crab --context default call seo check '{"url":"https://example.com"}' ``` The CLI builds the selected service and installs missing build tools automatically. The host runs in the background at `http://127.0.0.1:7777`. `--context default` selects it even if your CLI is signed in to Cloud. Services are addressed by name, such as `seo`. Choose other services from the repository's [catalogs](https://github.com/crabtalk/crab/tree/main/services). Read the service's README for its credentials, settings and tools. Use `crab pull owner/name:version` to download a deployable image from Cloud, then `crab deploy owner/name` on the local context. For a service requiring credentials, run `crab --context default secret fill ` in your terminal. Values are kept on your host. See [Secrets](/docs/guides/secrets) and [Vars](/docs/guides/vars) for provisioning and settings. ## Connect an agent The host serves all deployed services over Streamable HTTP at `http://127.0.0.1:7777/mcp`. For a client accepting MCP JSON configuration: ```json { "mcpServers": { "local-services": { "url": "http://127.0.0.1:7777/mcp", "headers": { "x-berm-caller": "{\"id\":\"local\"}" } } } } ``` The caller header lets the agent discover and call public tools as `local`. It is an unchecked identity, not authentication. Without it, only tools declared with `access = "anonymous"` are discoverable and callable. See [Local MCP](/docs/guides/local#mcp) for the supported tools and resources. ## Run on a server Install `crab` on the server and start `crab dev -d` there as the OS user that will own the service data. Keep its default loopback address. The host has no built-in authentication; its listener also exposes deployment, secret provisioning and host shutdown. To reach it from your workstation, keep an SSH tunnel open: ```sh ssh -N -L 17777:127.0.0.1:7777 user@your-server ``` In another terminal, name that endpoint as a context: ```sh crab context add self-hosted http://127.0.0.1:17777 crab --context self-hosted status crab --context self-hosted deploy --build crab/services/web/seo crab --context self-hosted call seo check '{"url":"https://example.com"}' ``` The service builds on your workstation and runs on the server. Use `http://127.0.0.1:17777/mcp` in your agent configuration while the tunnel is open. Anyone with access through the tunnel can manage the whole host. ## Keep services running `crab dev -d` survives the terminal closing. It does not register the host to start after a machine reboot. For startup at boot, configure your operating system's process supervisor to run `crab dev` in the foreground as the same OS user, with the same state directory. Stop the detached host before handing it to a supervisor. The default state directory is `~/.crab/host`. `--root` selects another; keep that path stable across restarts. When the host starts, it restores deployed services and their saved state. Services installed stopped remain stopped. Use `crab --context default stop ` and `start ` on the hosting machine to pause and resume a service while retaining its data. For host flags, logs, schedules and other commands, see [Developing](/docs/guides/local). ## Back up and restore Stop the host before copying its entire state directory. For the default directory, run these commands on the hosting machine as its OS user: ```sh crab dev stop tar -czf crab-host-backup.tar.gz -C "$HOME/.crab" host crab dev -d ``` Use a new archive name for each backup and store it securely: the directory contains service databases, deployed images, host state and `secrets.toml`. If you set `--root`, back up that directory instead. A supervised host must be stopped and started through its supervisor. Restore the archive into an empty state directory with the host stopped, using the same CLI version and root path. For the archive above, extract it under `~/.crab`, then start the host and check a known stored value. Starting services also resumes their scheduled work. ## Update a service or host Select the service source revision you want to run and repeat its deploy command. The deployment keeps its state and applies its database migrations. Back up before upgrading a stateful service; redeploying older code does not reverse migrations. `crab update` updates the CLI binary. Restart the host to run the new binary, keeping its OS user and root unchanged. See [Budgets](/docs/guides/budgets#size-a-budget-before-deployment) before increasing a service's workload or resource limits. --- # Deploying Source: https://crabtalk.ai/docs/guides/deploy > Build your own source or deploy a published image with independent credentials, storage and billing. ## Deploy your source ```sh crab --context cloud up services/my-service crab --context default up ``` `crab up [dir]` builds source and deploys it to the selected account or local host. The directory defaults to `.`; repeatable `-p` selects services across the workspace. `--force` permits changes that break recent callers. A first Cloud deployment can use the database seed declared in `crab.toml`. Cloud deployment requires an account owner and an eligible plan. A personal CLI session waits for browser approval at the printed link. An API key with `deployments:write` can deploy directly with `--yes`. ## Deploying an image ```sh crab --context cloud deploy crabtalk/hello --as greeter --version 1.2.3 crab --context cloud deploy crabtalk/hello --as greeter --private --price hello=0 ``` The image author must set `[image] deploy = true` for another account to download or deploy it. A copy has its own secrets, storage and bill, and reaches none of the publisher’s data. Its private tools answer to its owner. Inspect the image at `/images/OWNER/NAME` before deploying it. `--public` or `--private` and repeatable `--price TOOL=MICROS` override another account’s image during deployment. Zero makes a tool free; a positive price is at least 100 USD micros. Only tools admitting outside callers can have a price. Charging requires a payout account that can receive payouts. Revenue belongs to the deployment’s owner. Omitted settings use the image’s values on a first deploy and preserve the deployment’s overrides on later deploys, including upgrades and history redeploys. Your own image takes its visibility and prices from code. These settings have no separate runtime command or dashboard setting. ## Local deployment ```sh crab --context cloud pull crabtalk/hello:1.2.3 crab --context default deploy crabtalk/hello --version 1.2.3 ``` `crab pull` downloads from Cloud into the local host’s image store. Deployable images allow anonymous downloads; use the image owner’s Cloud context for a private image. Local `crab deploy` uses a stored image and pulls first when it is absent. Local deployments refuse `--public`, `--private`, `--price` and `--auto-upgrade`; these settings apply on Cloud. ## What a deploy refuses A deploy that breaks a tool or event a caller used successfully in the last 30 days requires `--force`. Deploying the caller in the same group still requires that check. Required credentials, storage and memory limits, and payout eligibility still apply when forcing a deploy. ## Projects `crab up` can deploy workspace services together. Each service keeps its name, storage and project across redeployments. A conflicting project or a breaking change needs `--force`. `crab start`, `crab stop` and `crab rm` select the same source scope when no service names are supplied. On Cloud, `crab rm` opens a browser approval request when you use a CLI session. An owner approves the removal of the service and its shared data. An API key with `services:write` can remove the service directly. ## Automatic patch updates `--auto-upgrade` enables newer stable patches in the same major and minor version. Updates retain deploy overrides and stopped state. Changes to permissions, setup, schedules, tool contracts or migrations require manual review. The owner can manage the upgrade policy on the service page or through `/services/{owner}/{name}/upgrades`. ## Deployment history The service’s Deploys page records attempts and offers retained images for redeployment. `crab deploys NAME` shows pending approvals and history. Published images and retained deployment images count toward the account’s storage limit; a service retains its current and two previous successful images. --- # Publishing Source: https://crabtalk.ai/docs/guides/publishing > Publish versioned service images and let others deploy them with their own credentials, storage and billing. Declare an image address in `crab.toml`: ```toml [image] name = "alice/weather" deploy = true public = true ``` `crab push` builds and publishes to that address in Cloud’s image registry without changing a running service. The version comes from `Cargo.toml`. Publication requires ownership of the addressed account and `deployments:write` for an API key. ```sh crab --context cloud push crab --context cloud deploy alice/weather --version 1.2.3 ``` `deploy = true` allows other accounts and anonymous callers to download the image and inspect every tool. Without it, only the image owner can fetch or deploy the image. `public` supplies deployment visibility; deployable images may also be public. Another account’s deployment can override visibility and tool prices during its deploy. See [Deploying](/docs/guides/deploy). `publish = false` keeps a service out of `crab push`: a directory push skips it, and naming it with `-p` is refused. ## Versions Each version identifies immutable bytes. Repeating the same publication is idempotent; a changed image requires a new package version. Three version images remain downloadable, and older version records remain after pruning. Existing deployments retain their own images. All retained images and pending uploads count toward the account’s storage limit. An image’s page at `/images/OWNER/NAME` shows its tools, available versions and public deployments. Versions are listed at `GET /images/{owner}/{name}/versions`; `GET /images/{owner}/{name}?version=1.2.3` selects one, and `/download?version=1.2.3` downloads its bytes subject to image access. Before publishing, [measure tool budgets](/docs/guides/budgets#size-a-budget-before-deployment) against the built image. Publication does not establish that a host can execute it within its ceilings. --- # Service catalog Source: https://crabtalk.ai/docs/guides/catalog > Make your CrabTalk service discoverable. Classify tools by platform and job, publish services or images, and contribute catalog categories through GitHub. The catalog groups tools by the task they perform, so people can find services to call or images to deploy. Browse [Explore](/explore) for public listings, or use [MCP search](/docs/guides/mcp) to find deployed tools from your agent. ## Categories, platforms and jobs | Term | Example | Meaning | |---|---|---| | Category | Web | A group of related platforms. | | Platform | `web` | The subject or system a tool works with, such as `web`, `github` or `company`. | | Job | `web.scrape` | A task under that platform. Multiple services can provide the same job. | | Provider | `your-account/reader`, tool `read` | A deployed tool that performs the job. | A service address such as `crabtalk/seo` names an account and service. Its `check` tool declares the job `web.seo`; the account name does not determine its catalog classification. ## Supported categories and platforms These are the supported classification names; available services are listed in [Explore](/explore). Source: [catalog.toml](https://github.com/crabtalk/crab/blob/main/crates/sdk/catalog.toml). | Category | ID | Platform prefixes | |---|---|---| | Web | `web` | `web`, `news` | | Agents | `agents` | `relay`, `artifacts` | | Operations | `ops` | `uptime` | | Search & SEO | `search` | `google`, `ai-search`, `bing`, `duckduckgo`, `yahoo`, `yandex`, `baidu`, `naver`, `seznam` | | Companies | `companies` | `company`, `crunchbase`, `indeed`, `remoteok`, `weworkremotely` | | People | `people` | `person`, `creator` | | Social | `social` | `x`, `douyin`, `facebook`, `tiktok`, `linkedin`, `instagram`, `weibo`, `kuaishou`, `bilibili`, `xiaohongshu`, `youtube`, `zhihu`, `pipixia`, `reddit`, `wechat-channels`, `wechat-mp`, `lemon8`, `threads`, `spotify`, `telegram`, `xigua`, `rumble`, `toutiao`, `pinterest`, `twitch`, `wechat-search`, `bluesky`, `hackernews`, `producthunt`, `youku` | | Commerce | `commerce` | `amazon`, `tiktok-shop`, `douyin-shop`, `jd`, `taobao`, `walmart`, `beike`, `1688`, `ebay`, `xianyu`, `dewu`, `etsy`, `home-depot`, `lazada`, `shopify`, `steam`, `zillow` | | Reviews & travel | `reviews` | `imdb`, `google-play`, `douban`, `tripadvisor`, `app-store`, `yelp`, `apple-maps`, `glassdoor`, `trustpilot`, `airbnb`, `booking`, `flights`, `hotels` | | Markets | `markets` | `stocks`, `crypto`, `markets` | | Models | `models` | `video`, `speech`, `image`, `music`, `judge`, `embedding`, `mesh` | | Ads | `ads` | `douyin-xingtu`, `xiaohongshu-pugongying`, `meta-ads`, `qq-huxuan`, `tiktok-ads` | | Communication | `communication` | `phone`, `sms` | | Research | `research` | `github`, `research`, `health`, `wikipedia`, `economics`, `medium`, `packages`, `stackoverflow`, `substack`, `weather`, `law` | | Your accounts | `accounts` | `google-analytics`, `google-ads`, `google-business`, `google-tag-manager`, `slack`, `pinterest-ads`, `snapchat-ads`, `microsoft-ads`, `search-console` | ## Example services These illustrative addresses show how tools are classified; a source example or supported category does not mean that address is deployed on Cloud. Find running Cloud deployments in [Explore](/explore) or with [MCP search](/docs/guides/mcp). Service addresses and catalog job IDs have separate namespaces. | Example address | Category | Job example | |---|---|---| | `crabtalk/seo` | Web | `web.seo` | | `crabtalk/relay` | Agents | `relay.message` | | `crabtalk/artifacts` | Agents | `artifacts.search` | | `crabtalk/analytics` | Web | `web.analytics-stats` | Services under `crabtalk/` are CrabTalk's own and free to call. ## Classify your tools Add a `catalog` job to each relevant exported tool on [`#[tool]`](/docs/development/macros#tool): ```rust /// Read a webpage as Markdown #[tool(catalog = "web.scrape")] pub fn read(url: String) -> Result { … } ``` Classification does not change who may call a tool. Internal tools remain unclassified; see [Access](/docs/guides/access). Choose a platform from [the registry](https://github.com/crabtalk/crab/blob/main/crates/sdk/catalog.toml). Reuse an existing job when your tool performs that task. Give a new task a descriptive suffix, such as `web.seo`; jobs are declared by tools, without a registry PR. One tool declares one job. To inspect deployed providers, read `GET /catalog`, `GET /catalog/{platform}` or `GET /catalog/{platform}/{job}` on the Cloud API. For example, [web scraping providers](https://api.crabtalk.ai/catalog/web/scrape) lists tools declaring `web.scrape` that an anonymous caller can see. Authenticated catalog requests can also include the caller's private services. Providers and jobs are ordered by calls over the last thirty days. ## Publish your listing Build and deploy again after changing tool metadata. To let other accounts call your deployment, set `public = true` and expose the intended tools through `access`. For a service people should run privately, set `public = false` and `deploy = true`, then use `crab push`. Explore includes published images even without a running public deployment. Image publication does not expose your instance or add a running provider to the catalog API. See [Publishing](/docs/guides/publishing) for the commands. Your service can live in your own repository and account. Listing it does not require contributing its implementation to the Crab repository. ## Write a discoverable listing - Set a specific package `description` in `Cargo.toml`; it appears in Explore and the service page's title and description. - Give each tool a concise, task-focused `title`, at most sixty characters on one line. Describe its behavior and arguments in Rust doc comments. - Write a README with a concrete call example, required setup and important limits. It appears on the service page and in MCP resources. Follow the [service README guide](https://github.com/crabtalk/crab/blob/main/services/README-guide.md). - Link to your public service page from your project's documentation so readers can inspect its tools or deploy a copy. MCP search matches service addresses, service descriptions, tool names, titles, descriptions, catalog jobs and category IDs and titles. A catalog job supplies classification; it does not replace those descriptions. ## Propose a platform or category If no existing platform fits, open a pull request in [crabtalk/crab](https://github.com/crabtalk/crab) changing [`crates/sdk/catalog.toml`](https://github.com/crabtalk/crab/blob/main/crates/sdk/catalog.toml): 1. Add the platform identifier to the appropriate category's `platforms` list. A platform belongs to exactly one category. 2. If a new category is needed, add a TOML table with a `title` and `platforms` list. 3. Explain the task the platform covers and include example job IDs and tools that would use them. Check for an existing equivalent before proposing another name. The registry is compiled into the SDK. A new platform needs CLI and Cloud builds containing the change before it can be used there. Existing platforms can accept new jobs without a registry release. --- # Calling a tool Source: https://crabtalk.ai/docs/guides/tools > Call a CrabTalk service tool from your agent, the crab CLI, or HTTP. Find tool prompts, inspect input schemas, and read what a call returns. ## With your agent [Connect your agent](/product/mcp#setup), then paste a prompt into its chat. On a service page, expand a tool to find its authored prompts under **Try with your agent**. > Check https://example.com for technical SEO issues and tell me what you found. Use the check tool on CrabTalk’s crabtalk/seo service. ## CLI ```sh crab call notes echo '{"query": "hi"}' ``` `crab call [arguments]` calls a tool of a service on the account the context is signed in to, and prints its result. On Cloud, `/` calls another account's public tool, as `crab call crabtalk/seo check`; the local host has no accounts and refuses it. The arguments are a JSON object, read from stdin when omitted. It exits `2` when the tool ran and failed. It also prints what the run used and cost to run; see [Cost of a call](/docs/guides/cost). `crab inspect /` prints how to call one before calling it: its README, its public tools, their arguments and what one call may use. Apps and scripts can call tools through the [HTTP API](/docs/reference/api) with an [API key](/docs/guides/keys). For workflow runs, see [Workflows](/docs/guides/workflows). ## What a call answers - A tool that ran answers whether it succeeded or failed: `done` with its result, or `failed` with the message it gave. `done` holds the result as JSON text, parsed a second time. - A call to a private service, or to a tool that is not public, from outside its account finds nothing. - The response says what the call used, and a deprecated tool's response says it is deprecated, and when it is sunset once that is set. See [Changing an interface](/docs/development/interfaces). ## Query tools A `#[tool(query)]` tool only reads, and is also called with `GET`, its arguments in the URL. - A query using shared storage can return an `ETag`. Send it as `If-None-Match` to receive `304 Not Modified` when the data is unchanged and the call passes normal admission checks, including rate and account limits. Queries using caller storage return `Cache-Control: private, no-store`. ## Limits - Cloud applies shared account quotas to REST and MCP, plus concurrency limits. Nodes also enforce per-caller limits. See [Request limits](/docs/reference/request-limits) for both layers and how to handle refusals. - An account's services hold at most the memory its [plan](/docs/guides/plans) allows at once: a call is refused while they hold it, and one growing past it fails. --- # Caller storage Source: https://crabtalk.ai/docs/guides/caller-storage > See which services hold caller storage on your plan and download or delete your SQLite files, including files retained after service deletion. Open **Storage** in your account settings to see which services hold data for you, the file sizes and last calls, and your total plan storage usage. For organization calls, open the organization's settings. Choose **Download** to save a SQLite file. Choose **Delete** to remove it and free the space. The next call starts with empty storage. A stopped or deleted service's data stays in Storage until you delete it. A new deployment under the same name starts its own caller storage. If you downgrade below your current storage usage, reads can continue and writes require space on the plan. You can free space from Storage or upgrade your plan. ## CLI In a signed-in Cloud context: ```sh crab storage crab storage download -o data.sqlite crab storage delete ``` Use `--org` to select an organization. The storage ID in the list stays with the file after a service is deleted. ## Service owners The service's **Callers** tab shows each caller with storage, the current size, last call and schema version. From the CLI, run `crab callers owner/service`. Operate a caller's data through your [service code and migrations](/docs/development/caller-storage). ## API Use `GET /user/storage` or `GET /orgs/{org}/storage` to list files for the corresponding account. Add `/{storage_id}` and use GET to download the SQLite file or DELETE to remove it. A verified end user can access their storage using their app's origin, `X-App` and ID token. Service owners can list caller metadata at `GET /services/{owner}/{name}/callers`. --- # Workflows Source: https://crabtalk.ai/docs/guides/workflows > Inspect and run deployed workflows, follow their status, continue eligible runs from saved checkpoints, and understand task prices and owner costs. A workflow runs a bounded graph of tool calls and saves checkpoints as it progresses. To write one, see [Development](/docs/development/workflows). On the service page, **Workflows** lists each workflow’s price range. Open a workflow to see its graph, call limits and step prices. Copy the prompt under **Try with your agent** to have your agent gather the inputs and show the quote for your approval. ## Run For example, the `audit` workflow on `crabtalk/seo`, which is free, so its quote is $0; replace it with any deployed service and workflow address: ```sh crab workflow inspect crabtalk/seo.audit crab workflow run crabtalk/seo.audit '{"site":"https://example.com/"}' --dry-run crab workflow run crabtalk/seo.audit '{"site":"https://example.com/"}' ``` Inspection resolves the graph, dependencies, call-count bounds and current terms without executing application tools. Dry-run also validates the input without creating a run. Run prints the terms and asks for confirmation; scripts use `--yes`. It returns an accepted run ID without waiting for completion. Input comes from stdin when omitted. JSON output is automatic when piped, or selected with `--json`; pre-execution terms stay on stderr. [MCP](/docs/guides/mcp#workflows) and the [HTTP API](/docs/reference/api#workflow-runs) use the same admission and run model. ## Status ```sh crab workflow status crabtalk/seo.audit RUN_ID ``` Status shows checkpoints, attempts, the result, retention expiry and continuation eligibility. On Cloud, run history is available to the owner and original authenticated initiator; detailed accounting is owner-only. Service owners can also open a run from the service’s **Runs** tab. After a lost admission response, check the UUID printed before dispatch. Resend with `run --id RUN_ID` using identical input and accepted terms; a new UUID starts a new run. ## Continue or cancel ```sh crab workflow continue crabtalk/seo.audit RUN_ID crab workflow cancel crabtalk/seo.audit RUN_ID ``` Continuation is manual and retains the original image, input, prepared payloads, branch decisions and successful checkpoints. It gets a fresh attempt deadline and the remaining cumulative owner cap. Current permission, original key/app funding authority and accepted dependency bindings are rechecked. An uncertain write requires the target's still-valid idempotency guarantee and original payload/key, or an authoritative recorded outcome. Expired or deleted checkpoints cannot be continued; default retention is seven days. A changed input needs a new run. Cancellation stops new calls and drains active calls; it cannot undo effects already accepted by external services. Both controls ask for confirmation, or accept `--yes`. `run`, `status` and `continue` exit `2` for failed, indeterminate or cancelled outcomes. Accepted cancellation exits `0`. ## Cost A run's price is its fixed task price plus, for each step priced with `#[step(price = …)]`, that price times the items that succeeded. Inspection quotes the range: the task price, up to the task price plus each priced step's price times its `max`. Given an input, `crab workflow inspect` narrows it: a priced step whose list depends only on the input counts its items for that input, and a branch on the input alone picks its path; other priced steps stay bounded by `max`. Admission holds the top of the range for the run's own input from the caller's credit; a successful run keeps what it used and releases the rest. Evaluating the input-only steps is metered to the service's owner. Terminal failure or cancellation releases all of it; the owner pays incurred execution costs. The owner's cumulative Cloud managed-spend cap is separate from the customer price. Owner calls and schedules have no self-sale; continuation uses the cap remaining from earlier attempts. The local runtime does not settle task fees. Independently billed providers remain outside the managed cap; review the service's disclosures before running it. Storage capacity is required for checkpoints and retained images before dispatch. A spend cap does not guarantee completion; see [Cost of a call](/docs/guides/cost) for Cloud charges. ## Schedules A service can declare a schedule in its manifest; redeploying changes it. Each occurrence has a stable identity, so duplicate delivery does not create another attempt. A scheduled occurrence has a 60-second delivery window. Delivery after that window is refused with [E0075](/docs/errors/E0075), and the workflow is not run. Schedules do not retry failures or backfill downtime. Each later occurrence starts a new run with owner funding. ## Command reference ```text Inspect and manage durable workflow runs Usage: crab workflow [OPTIONS] Commands: inspect Resolve the graph, bounds and current quote without executing it run Admit one run and return its identity; use status to follow it status Read a run's checkpoints, result and continuation eligibility continue Continue an eligible run using its original input and saved checkpoints cancel Stop new calls; an external request already accepted cannot be recalled help Print this message or the help of the given subcommand(s) Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab workflow inspect ```text Resolve the graph, bounds and current quote without executing it Usage: crab workflow inspect [OPTIONS] [INPUT] Arguments: A service and workflow, `owner/service.workflow` on Cloud [INPUT] JSON input to quote the run's price for; the range without it Options: --caller On the local host, override the default caller `local` --context The context to talk to, in place of the one in use --anonymous On the local host, call without a caller --org Act for this org, by handle or id, in place of the context's account --issuer On the local host, the end user's issuer (unchecked) --json Print JSON. On whenever stdout is not a terminal --user On the local host, the end user's subject (unchecked) -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab workflow run ```text Admit one run and return its identity; use status to follow it Usage: crab workflow run [OPTIONS] [INPUT] Arguments: [INPUT] JSON input; read stdin when omitted, or use {} with an empty stdin Options: --context The context to talk to, in place of the one in use --dry-run Inspect and validate input without creating a run or charging anything --id A UUID to reuse after a lost response, with identical input and terms --org Act for this org, by handle or id, in place of the context's account --caller On the local host, override the default caller `local` --json Print JSON. On whenever stdout is not a terminal --anonymous On the local host, call without a caller -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead --issuer On the local host, the end user's issuer (unchecked) --user On the local host, the end user's subject (unchecked) -h, --help Print help ``` ### crab workflow status ```text Read a run's checkpoints, result and continuation eligibility Usage: crab workflow status [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab workflow continue ```text Continue an eligible run using its original input and saved checkpoints Usage: crab workflow continue [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab workflow cancel ```text Stop new calls; an external request already accepted cannot be recalled Usage: crab workflow cancel [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` --- # Access Source: https://crabtalk.ai/docs/guides/access > A service's visibility decides which accounts find it, and each tool's access in code decides who calls it — internal, public, anonymous, accounts or services. Two settings decide who reaches a tool: the service's visibility, which accounts may find it, and the tool's `access`, which kinds of caller it takes. ## Visibility ```toml [image] name = "alice/weather-desk" public = true ``` A service's `[image] public` setting in `crab.toml` is embedded in its image. It defaults to `false`: only its owning account, that account's members and keys made on it see or call the deployment; everyone else receives `404`. With `public = true`, anyone can read its page, and callers allowed by each tool's `access` can call it. An image’s `public` setting supplies default deployment visibility. Another account’s deployment may override it during a deploy; later redeploys preserve that override. Own-image settings come from code. `[image] deploy = true` allows others to inspect, download and deploy the image. It does not grant calls to your instance. ## Access ```rust #[tool(access = "public")] ``` Each [`#[tool]`](/docs/development/macros#tool) may set `access`; it defaults to `public`. It names the kinds of caller the tool takes: - **From outside:** a signed-in caller — a person with `crab call` or MCP, an API key, or a web page through an app, for a user signed in to its site. The service's visibility decides which accounts these may be. - **With no caller:** a page through an app that admits visitors who are not signed in. - **From another service:** a service calling a deployment by `owner/service`, subject to its visibility and tool access, through `berm_lang::call`. See [From another service](/docs/development/services). | `access` | From outside | With no caller | From another service | |---|---|---|---| | `internal` | | | | | `public` | ✓ | | ✓ | | `anonymous` | ✓ | ✓ | ✓ | | `accounts` | ✓ | | | | `services` | | | ✓ | - **`internal`.** A tool with `access = "internal"` takes no outside calls. The host can run it from the service’s crons, wakes, Standard Webhooks and Stripe webhooks. A cron tool is always internal: giving it caller access is refused. - **`public`.** Every caller but one with none. The usual choice for a tool others call. - **`anonymous`.** Everything `public` takes, and calls with no caller as well: the only access a visitor who is not signed in reaches, as a page counting its visits does. - **`accounts`.** Accepts authenticated outside callers who can see the deployment. - **`services`.** Accepts other services that can see the deployment, including across accounts for public deployments. ## Rules - `access` applies to the service's owners too: a tool with none is not called from outside even by them. - Only a tool with `access` can set a `price` or a `catalog` job; on an internal tool both are refused. - Making a tool internal, taking fewer kinds of caller, or no longer taking calls with no caller breaks its callers: a deploy that breaks what a caller used successfully in the last 30 days is refused unless forced. See [Deploying](/docs/guides/deploy). --- # Secrets Source: https://crabtalk.ai/docs/guides/secrets > Secrets are the keys and credentials a service sends to other services. A person sets them; once saved, nobody reads a value again, their agent included. A secret is a key or credential a service sends with its requests, such as an API key. A person sets it, never an agent or a chat, and nobody reads it back once it is saved. How a service names one in code: [Secrets in code](/docs/development/secrets). ## Setting them | | Does | |---|---| | `crab secret request ` | On Cloud, answers a code and its page, `https://crabtalk.ai/secrets/WDJB-MJHT`, where an owner of the account, signed in, sets each unset required credential beside its provider's steps. | | `crab secret fill ` | Asks the person at this terminal for each credential and sets what they type: in the local host's `secrets.toml`, or on the account on Cloud. Refused when not run at a terminal. | | `printf %s "$VALUE" \| crab secret put ` | Provisions one declared secret from stdin for its manifest destinations. On Cloud, requires a signed-in session. | | `crab secret ls ` | Lists the names set, with their hosts. Values are never shown. | | `crab secret rm ` | Revokes one saved credential. | - A service's settings on crabtalk.ai show secret names and provisioning status. Credential values are entered through deployment or credential requests; destinations are read-only. - `--copy callback=` gives `request` and `fill` the values the credentials have the person enter at the provider. `request --credential ` asks for one credential, set or not and optional or not, and `--for` says what it is for. - `crab request --wait` returns once the person has set them, and `crab request --expire` ends a code early; what was already saved stays set. **Decline** on the page turns the request down. - The deploy page asks for required secrets that are unset and saves them before deploying. `crab deploy --copy app:callback=` supplies provider values by service and copy key. - A deploy with a required secret unset is refused ([E0021](/docs/errors/E0021)); the running version stays unchanged. Saving secrets never starts a service stopped by its owner. ## Rules - Only signed-in owners can provision or replace a service's secrets. On Cloud, revocation from a CLI session opens an owner approval request. API keys with `services:write` can revoke directly. - A secret is sent only to its hosts, each named in full, such as `api.example.com`: no `*`, scheme, port or path, and at most 16. A secret with none is sent nowhere, whatever the service's code asks. - A credential's `hosts` in `crab.toml` declare its destinations. Changing them requires redeployment and fresh provisioning; an existing value never gains new destinations silently. - A value a credential gives a pattern for must match it. - Provisioning again replaces the stored value. Saved values are never returned, even for fields declared `masked = false`. - A name is up to 128 ASCII letters, digits and `_`, and does not start with a digit. - A value is 1 byte to 8 KiB on one line, with no control characters. - Cloud stores values encrypted with AES-256-GCM and synchronizes them to connected hosts on a 30-second cadence. An unavailable host receives current values when it synchronizes again. - Treat upstream response data as sensitive. Credentials returned by an upstream can appear in logs, call records and [replay tapes](/docs/guides/replay). - The local host keeps its own secrets in `secrets.toml` under its root. On Unix it writes the file with mode `0600`. ## Runtime secret resources Runtime secrets are resources owned by the account. Each has a stable ID and explicit service grants. A signed-in owner can grant a secret to a service in their account or to a public service in another account that their account can call. The service must declare `secret_resources = true`; each grant's hosts must fit its HTTP permissions. On Cloud, ask an owner of the secret’s account to provision a value and approve its service grant: ```sh crab secret resource request app "Research Bot" --host api.example.com crab request --wait ``` The command prints the secret ID and a secure approval link. The approver enters the value on that page; the agent sees only its reference and provisioning status. Add `--id ` to rotate an existing resource through this flow. Resource creation, rotation and grant changes do not redeploy the service. At a person's terminal, `crab secret resource create NAME` and `rotate ID` read the value from stdin. `resource ls` lists metadata and grants; Cloud API keys need `secrets:read`. `resource grant ID SERVICE --host HOST` grants a service access. Use `owner/name` for a service in another account. `resource revoke ID SERVICE` removes that grant. `resource rm ID` deletes the value and all grants. Cloud writes require a signed-in session; API keys cannot supply values or change grants directly. Local resources use the same commands against the local host. Use the returned ID in application data and `{secret:ID}` in outgoing requests. The host holds the value and enforces the grant. Cloud pushes changes to running hosts; an unavailable host receives them when it synchronizes again. A call can use a granted resource owned by its authenticated account. Scheduled calls require the service to bind the resource during an authenticated write call, and the grant must still cover the destination. Use declared named secrets for credentials a service sends on behalf of other callers. In Settings → Access → Secrets, each secret lists the services that can use it and lets you revoke their grants. Deleting a service revokes its grants. Taking it private revokes grants from other accounts. --- # Service requests Source: https://crabtalk.ai/docs/guides/service-requests > Service-defined reviews, browser approval and execution recovery. A service request lets an assistant prepare an action for a person to review. The hosted flow records the review, waits for an account owner's browser approval, and executes the exact action that was reviewed. Local-host service requests are not implemented. ## Use a request Call a service's request builder through MCP or `crab call`. For example, on an accessible Resend deployment: ```sh crab call you/resend review '{"input":{"from":"hello@your-verified-domain.com","to":["reader@example.com"],"subject":"Report","text":"The report is ready."}}' ``` The response contains a `code` and `url`. MCP also returns a `resource_uri`; read that authenticated resource for the request state and execution result. Share the link with the person. Creating a request does not complete its action. The page shows the originating service, the account it acts for, the service-authored review and any price per execution attempt. An owner of the requesting account signs in through the browser to approve or decline. API keys can prepare and read their account's requests; they cannot approve them. Review content and results require account access even when someone knows the link. Wait for the outcome: ```sh crab request CODE --wait --json ``` A completed service request contains its action's result. A failed request retains the failure and the reviewed action. Reopen its page to resume the same request. A request awaiting an outcome can also be resumed after an interrupted host execution. Duplicate approvals do not start concurrent executions. Requests permit new execution attempts for 30 minutes after creation. Declined and expired requests cannot start an action. Check an existing outcome before creating a replacement after an uncertain failure. A changed service image or action price requires a new review. ## Define a request builder Mark a Rust tool `#[tool(request)]` and return `berm_lang::abi::requests::Review`: | Field | Meaning | | --- | --- | | `title` | One line, 1–160 bytes | | `body` | The review as Markdown, 1–8000 bytes | | `tool` | An account-callable action in the same service | | `input` | The immutable action input, at most 16384 serialized bytes | The builder prepares the review and must not perform the requested action. It is read-only for database writes, logs and wakes. Its content must accurately describe its action input. The host sanitizes Markdown and supplies the service and account attribution. The action receives `{"request":"CODE","input":T}`. `berm_lang::abi::requests::Execution` describes that object. The action must enforce its own caller policy and use the request ID to deduplicate retries. An argument object is not proof of authorization. Hosted execution uses the requesting account's owner identity after browser approval; no session token is handed to the service. A builder and its action, with owner-only execution and the request ID as the provider's idempotency key: ```rust use alloc::{format, string::String}; use berm_lang::{Caller, Result, abi::requests::Review, key, tool}; /// Review email /// /// Prepare an email for an account owner's browser review without sending it. #[tool(request, access = "accounts")] pub fn review(input: Draft) -> Result> { let review = Review { title: "Send email".into(), body: format!(" To: {}\n Subject: {}\n", input.to, input.subject), tool: "send_approved".into(), input, }; review.check()?; Ok(review) } /// Send approved email /// /// Send an owner-approved email; the request ID deduplicates retries. #[tool(access = "accounts")] pub fn send_approved(request: String, input: Draft) -> Result { let Some(Caller::Outside(owner)) = berm_lang::caller()? else { return Err(berm_lang::deny("An account owner must approve this email")); }; if key::id()?.is_some() || berm_lang::user()?.is_some() { return Err(berm_lang::deny("Approve this email through its request page")); } send(&input, &format!("review/{owner}/{request}")) } ``` `Draft`, `Sent` and `send` stand for your own input type, result type and provider call. ## HTTP and SDK `POST /services/OWNER/NAME/request/TOOL` creates a request from a declared builder. The body is the builder's normal argument object. The SDK exposes this as `Client::ask_service`. Calling that builder through the normal hosted tool endpoint or MCP also returns a request link. Read its state at `GET /requests/CODE`. The requesting account's owner approves with `POST /requests/CODE/approve` or declines with `POST /requests/CODE/decline`, using a browser session. A repeated approval of a completed request returns its recorded outcome. The host stores the review and decision. The service owns its business policy, effects and retry safety. Approval does not authorize unrelated actions or later changes to the reviewed input. --- # Webhooks Source: https://crabtalk.ai/docs/guides/webhooks > A service takes events from senders that push, at a URL per tool, verified with its signature scheme before anything runs. A webhook is a POST a sender makes when something happens. How a service takes one in code: [Webhooks in code](/docs/development/webhooks). ## Connecting a sender 1. Deploy a service with a `#[tool(webhook)]` tool for Standard Webhooks, or `#[tool(webhook = "stripe")]` for Stripe. 2. Give the sender this URL: ```text https://api.crabtalk.ai/services///webhooks/ ``` 3. Complete the generated signing credential setup for that tool. Its secret is `_WEBHOOK_SECRET`, with the tool name in capitals. For a tool named `receive`: ```sh printf %s "$VALUE" | crab secret put RECEIVE_WEBHOOK_SECRET ``` ## What is verified - A Standard Webhooks request carries `webhook-id`, `webhook-timestamp` and `webhook-signature`, as [Standard Webhooks](https://www.standardwebhooks.com) specifies. - The signature must match the body under that tool's `_WEBHOOK_SECRET`, base64 with an optional `whsec_` prefix, and the timestamp must be within 5 minutes of now. - One that fails is refused before it reaches the service, and uses nothing. - Stripe tools verify `Stripe-Signature` with their own signing secret and a five-minute timestamp window. - Other schemes, such as GitHub's `X-Hub-Signature-256`, are unsupported. ## What the sender gets back | Status | Means | |---|---| | `204` | The tool ran. | | `400` | Signature headers are missing or malformed ([E0016](/docs/errors/E0016)), or the timestamp is stale ([E0017](/docs/errors/E0017)). | | `401` | The signature doesn't match ([E0017](/docs/errors/E0017)). | | `404` | No such service or webhook tool ([E0014](/docs/errors/E0014)), or no usable secret ([E0015](/docs/errors/E0015)). | | `413` | The body exceeds Cloud's 2 MB limit. | | `429` | An IP or destination-service rate/concurrency limit was reached, with `Retry-After`; or the account holds as much memory as it may ([E0019](/docs/errors/E0019)). | | `500` | The tool failed, with its message. | | `503` | The service is stopped or its account is held ([E0018](/docs/errors/E0018)). | See [Request limits](/docs/reference/request-limits) for shared webhook quotas and retry responses. ## Running them A webhook is a run paid by the service's owner, and shows in `crab calls` with the source `webhook`. Its output isn't sent back to the sender. On the local host, `crab dev` takes a webhook at `/services/local//tools//webhook` without checking a signature. --- # Security Source: https://crabtalk.ai/docs/guides/security > What a service on CrabTalk can reach, where its secrets go, and how every request it sends names it. What holds for every service, yours or one you call. Each line links to where it is spelled out. ## The sandbox - Each call runs in a fresh WebAssembly instance; nothing in memory survives it. See [The sandbox](/docs/development/introduction#the-sandbox). - Host calls are discovered from the linked Wasm imports; deployment is refused when the host cannot serve one. Outbound HTTP destinations and secrets remain restricted by `crab.toml`. Service calls enforce the target deployment's visibility and tool access. - Another service's state and database cannot be named. ## Secrets - The host substitutes secrets during outbound dispatch. See [Secrets in code](/docs/development/secrets). - A secret is sent only to the hosts an owner set for it, each named in full, never through a pattern. See [Secrets](/docs/guides/secrets#rules). - The provisioning API keeps saved values write-only. Credentials returned by an upstream can appear in logs, call records and replay tapes. ## Hosts - A service declares the hosts it fetches by name, as `*.example.com`, or as `*`. See [Hosts](/docs/development/http#hosts). - Cloud checks literal IP addresses and filters DNS results for public addresses. See [Outbound HTTP](/docs/development/http#hosts). - Every request a service sends from Cloud carries `CrabTalk-Service: /`, which the service cannot change. A site receiving one can tell which service sent it. The [egress design article](/blog/open-egress-without-an-open-relay) explains the wildcard-host and request-attribution tradeoffs. --- # Vars Source: https://crabtalk.ai/docs/guides/vars > Vars are the settings each deployed copy of a service holds its own value of, such as the keywords a monitor watches. Whoever deploys a copy sets them. A var is a setting a service declares under `[vars]` in its [`crab.toml`](/docs/development/crab-toml), with a default and a description, such as the keywords a monitor watches. Each deployed copy holds its own value, and reads the default while it holds none. How a service reads one in code: [Vars](/docs/development/vars). ## Setting them | | Does | |---|---| | **Deploy** | On another account's service page, lists each var with its description, filled with its default. A value you change is set on your copy as it deploys. | | `crab var ls ` | Lists the service's vars, each with the value it holds or its default, and its description. | | `crab var set ` | Sets one. The service reads it from its next call. | | `crab var unset ` | Returns one to its default. | - `crab inspect ` lists the vars a service declares, with their defaults. - A deploy sets the values its request names and keeps the rest. A deploy whose `[vars]` drops a var drops its value. ## Rules - Only owners of the account set its services' vars, and only they read the values back. - A var's name, description and default are public: anyone who can see the service sees them on its page. - A service declares at most 32 vars, each named in ASCII letters, digits and `_`. - A value is at most 4096 bytes. Setting a var the service does not declare, or a longer value, is refused with [E0011](/docs/errors/E0011). - A var is never a secret. A key or credential goes in a [secret](/docs/guides/secrets), which nobody reads back. --- # Budgets Source: https://crabtalk.ai/docs/guides/budgets > Measure a tool's WebAssembly execution, add headroom, and check the host's ceilings before publishing or deploying its budget. `budget(...)` on [`#[tool]`](/docs/development/macros#tool) bounds one invocation. The build embeds it in the image; changing it requires rebuilding and redeploying. ## Units, defaults and ceilings | Key | Unit in the declaration | Default budget when omitted | Default host maximum | | --- | --- | --- | --- | | `cpu` | Microseconds | `100_000` (100 ms) | `100_000` (100 ms) | | `read` | Rows read | `1_000_000` (1M) | `1_000_000` (1M) | | `written` | Rows written | `10_000` (10K) | `1_000_000` (1M) | | `memory` | MB | `32` | `128` | CPU measures execution time rather than time waiting for HTTP; SQL CPU is reported separately. A call chain has a **60-second deadline**, shared by the entry call and all nested calls. This is separate from each tool’s CPU budget. Every explicit value must be at least `1`. Omission uses the default; it does not mean zero or unlimited. In particular, `cpu = 500_000` means **500 ms**, above the default 100 ms ceiling. Hosts can configure different defaults and ceilings. The local host's [`--max-cpu-millis`](/docs/guides/local#crab-dev) changes its CPU ceiling; raising it does not change Cloud's. A budget above the destination's ceiling is refused at deployment with [E0013](/docs/errors/E0013), even when the image built successfully. ## Size a budget before deployment [`crab bench`](/docs/guides/bench) builds and measures an explicit workload in a temporary host, estimates its cost, and checks a budget suggestion against runtime defaults. Use it before requesting deployment. 1. Define the largest inputs and data sets the tool supports: request and response sizes, batch counts, parser complexity and database size. Enforce those bounds in the tool. 2. Start with a provisional budget within the destination's ceilings. Use `crab bench --cases cases.jsonl --runs 10` with representative and worst-case inputs, including error paths, or exercise them on the [local host](/docs/guides/local). Native Rust tests and image builds do not measure WebAssembly execution; [host tests](/docs/development/testing#on-the-host) run the actual image and can arrange HTTP responses. 3. Read the tool's own usage in the benchmark report, or the usage printed on stderr by `crab call`. CPU is in microseconds. Benchmark memory is in bytes; `crab call` prints KiB. Divide by `1_048_576` or `1024`, respectively, to get MB. Use peak linear memory, not memory held in MB-seconds, when choosing `memory`. A run stopped by its budget has not measured the resources needed to finish. 4. Add headroom to each measured maximum: a starting point is `ceil(1.5 × maximum)`, with a minimum of `1`. Convert memory to MB before rounding up. Compare **every resulting key** with the destination's ceiling. Headroom that exceeds a ceiling does not fit: 80 ms × 1.5 is 120 ms, above a 100 ms CPU ceiling. 5. Put the values on `#[tool(budget(...))]`, rebuild, redeploy locally and repeat the workload under those budgets before requesting a Cloud deployment or publishing an image. CPU time can vary across machines; recheck Cloud usage after deployment. For example, from a service directory: ```sh crab --context default up crab --context default call app search '{"query":"example"}' ``` Illustrative measurements of 8,000 µs CPU, 200 rows read, 2 written and 12 MB peak memory give: ```rust #[tool(budget(cpu = 12_000, read = 300, written = 3, memory = 18))] ``` If the supported workload cannot finish with headroom below the ceiling, reduce its resource use or supported input bounds and measure again. Split work across calls when the operation supports batching or pagination. Lowering a declaration alone does not make the work fit. ## Measurements after deployment `crab budget ` prints usage over the last 30 days and a `fits` suggestion with 1.5× headroom. CPU and row estimates use runs that ended `done`: each measure's maximum below 100 runs, and its 99th percentile from 100 runs. Failed runs are excluded from those estimates. Memory uses the largest recorded linear memory of the tool's own invocations. The suggestion does **not** check host ceilings, and observed traffic does not establish the worst case for every supported input. Check it against both the ceilings and your workload before using it. Budgets apply to an invocation's own CPU, rows and memory; calls to other services use their own budgets. `crab call`, the `Ran.meter` from host tests, and the CPU and row estimates used by `crab budget` include nested calls. These chain totals are conservative bounds for the entry tool's own use; a chain above one tool's ceiling does not establish that tool exceeds it. Exercise called tools separately too. `crab inspect ` shows each public tool's budget. Billing and memory held: [Cost of a call](/docs/guides/cost). ## Past a budget - **CPU.** The call is stopped, within 100 ms of crossing it. - **Rows.** Once a call has read its rows read or written its rows written, its next statement that reads or writes is refused, and the service can handle the error. The statement that crossed the budget runs to its end. - **Memory.** The growth that would pass it fails, and with it the call. A call reserves its memory budget during execution, waiting on fetches or other services included, and is billed for that reservation. Loading cold service code is excluded. [`berm_lang::limit`](/docs/development/budgets) can lower it for one call; its memory argument is in **bytes**, unlike the declaration's MiB. --- # Benchmarking Source: https://crabtalk.ai/docs/guides/bench > Use crab bench to measure local WebAssembly workloads, estimate execution costs and suggest budgets before deployment. ```sh crab bench services/web/seo check --cases cases.jsonl --runs 10 ``` `crab bench ` builds the service and runs explicit workloads on a temporary local host. It measures WebAssembly execution, excluding compilation and deployment, without uploading the image. It reports the tool's own CPU, rows and peak linear memory, elapsed time, and whole-chain execution cost at Cloud's rates, before plan inclusions. ## Cases The cases file is JSON Lines: one object per line. For example: ```json {"name":"guide","args":{"url":"https://example.com/guide"},"http":[{"method":"GET","url":"https://example.com/guide","status":200,"headers":{"content-type":"text/html"},"body_file":"guide.html","delay_ms":100}]} ``` - `name` identifies the case; `args` is the tool's argument object. - `http` supplies responses matched by method and exact URL. Each response has `status`, optional `headers`, and either `body` as text or `body_file`. File paths are relative to the cases file. An omitted body is empty. - `delay_ms` simulates time waiting for that response. Memory reservations are billed while waiting, so immediate fixtures do not estimate a real upstream's latency. - `expected_error` can name a substring of an expected tool error, such as an input-limit refusal. Unexpected errors, unarranged HTTP requests and runtime traps prevent a budget recommendation. A stopped call does not measure what finishing would require. Benchmark calls use the unchecked local identity `local` through direct host execution, including for internal tools. Each case starts with a fresh migrated database; repetitions of that case share its state. The host has no production data or credentials, and runs only the selected image. Calls needing another deployment cannot reach it here. Use representative and largest supported inputs, including error paths. The command measures the supplied workload; it does not generate worst-case inputs or establish coverage for all inputs. ## Live HTTP ```sh crab bench services/web/seo check --cases live.jsonl --runs 10 --live-http ``` With `--live-http`, cases omit `http` and send real requests. Every repetition executes the tool again, including its HTTP operations. Fixture mode sends no upstream requests. ## Results and budgets Cost reflects the current budget declaration and any in-code reductions. Rerun after changing the budget. The report includes median and maximum measurements, each run's outcome, the image digest, and a budget suggestion with 1.5× headroom over measured maxima. Memory measurements are in bytes; the suggested `#[tool(budget(...))]` declaration converts them to MB and rounds up. Tool budgets use the entry invocation's own resources; the cost estimate includes the whole call. Ceiling checks use **runtime defaults**, not limits queried from Cloud. A suggestion above a ceiling is reported without clipping it. Check the destination's limits before deployment and repeat the workload under the chosen budget; see [Budgets](/docs/guides/budgets). `--json` returns the report as JSON; redirected output uses JSON automatically. A completed benchmark exits `2` when a workload failed, a measurement was incomplete, or the suggested budget exceeds a default ceiling. Build and setup errors exit `1`. The selected context supplies Cloud's rates. `--offline` uses SDK default rates; unavailable Cloud rates also fall back to those defaults, labeled in the report. Local CPU timing varies across machines. Fixture latency and local timing make costs estimates; [production usage](/docs/guides/cost) remains the source for actual consumption. --- # Monitoring Source: https://crabtalk.ai/docs/guides/monitoring > crab usage, crab calls, crab logs and crab cost read what a service used, each call of the last 7 days, its logs and what it cost. | Command | Prints | |---|---| | `crab usage ` | What it used each of the last 30 days. With no service, what the account's services used and how much of its plan. | | `crab calls ` | Its calls of the last 7 days, newest first: caller, outcome, duration, what each used and cost. `--tool`, `--outcome` and `--limit` narrow them. | | `crab logs ` | Its logs, oldest first. `--after ` prints those after a sequence number. | | `crab cost ` | What it cost in a UTC month, by resource. `--month YYYY-MM` picks one. | `crab calls` and `crab cost` reach Cloud only. Only owners of the account read these. - Every cost, here and on crabtalk.ai, is at the rates on [Pricing](/pricing). It is paid from Credit; the account's Usage page shows the balance. See [Plans](/docs/guides/plans). - A stopped service keeps its data and answers no calls until it is started again. ## Current usage A service's **Monitoring** page shows calls running, memory held and database allocation against its capacity. The **Now** card on its overview shows the same resources. These are snapshots loaded when you open the page. Database allocation includes SQLite tables, indexes and reusable allocated pages. WAL, logs and runtime caches are excluded. Hosts without a database measurement show `—`. Monthly charts use recorded samples and leave missing database samples blank. Selecting a historical month does not change the current-usage section. The account's **Usage** page shows storage held against its plan, broken into database reservations, objects and logs. The service list compares sampled database allocation with each reservation. `crab usage ` reports the recorded database allocation in its Database column. ## Calls - A call ends `done`, `failed` (the tool reported a failure), `denied` (the tool refused its caller) or `refused` (the host refused it before the tool ran). - Calls are kept 7 days. Their counts by tool, outcome and hour are kept 15 months, and a service's **Monitoring** page charts from them how long its calls took each day of a month, at p50, p95 and p99, calls from its other services included. - A call that failed keeps its input and a tape of its answers, which `crab replay` runs again on a developer's machine, exactly as it failed: see [Replaying](/docs/guides/replay). ## Logs - A log belongs to the call that wrote it, with its topics and data. See [Logs in the guest API](/docs/development/api#logs-time-and-randomness). - A log is at most 4 KiB and is kept 7 days. Logs kept count toward the plan's storage limit. - Search on crabtalk.ai finds the calls whose logs hold its text, in any case. ## Projects - Services deployed from one workspace are a project, named after the workspace's directory. - A project holding one service shows no row of its own. --- # Replaying Source: https://crabtalk.ai/docs/guides/replay > A call that failed keeps its input and a tape of every answer it got from outside. crab replay runs it again on your machine, failing as it failed. A call that fails keeps what it ran with and a tape of its answers from outside the service. `crab replay` runs it again on your machine from those, so a failure in production reproduces locally, with its logs. ## What a failed call keeps - Only a call whose tool failed keeps them. A call that answered, refused its caller or was refused by the host keeps neither. - The input: the image's digest, the tool, its arguments, its caller and its daily client key. The caller includes the outside IP when the host supplied it. - Older inputs without a daily client key replay with `client()` returning `None`. - The tape: every syscall in order, with a sha256 of the request as the service made it and the answer it got, the clock and the random source included. The host hashes each request before substituting secrets. The tape stores response data as received, including any credentials an upstream returns. - A tape holds at most 4 MB of answers. Past it, it stops recording and is marked cut short. - A host keeps at most 64 MB of uncollected tapes per service, dropping the oldest past it. Cloud pulls failed-call inputs and tapes into private object storage, retaining them for 7 days even after a service moves or is removed. - Reading them takes an owner of the service's account, or a key bound to it. ## Replaying from the tape Find the call's id with `crab calls`, then replay it: ```sh crab calls notes --outcome failed crab replay notes 1234 ``` `crab replay` reads the call from the context in use, fetches the image it ran from the host and checks its digest, then runs the call in the CLI's own process. Each syscall is answered from the tape, and the service's logs print as it runs. - A request whose digest differs from the recorded one stops the replay, naming the syscall: the code took another path than it did in production. - A tape cut short is replayed as far as it goes. - It exits `2` when the call fails or traps again. A call that answers prints its result and says the call it replays failed. ## Checking a fix From the service's crate: ```sh crab replay notes 1234 --build ``` `--build` builds the current crate as `crab build` does and replays the same input and tape against it. It prints the recorded and built image digests. The built image may differ; syscall requests must still match the tape. A mismatch names the syscall where the code took another path. A successful call exits `0`; another failure or trap exits `2`. `--build` and `--on` exclude each other. ## Replaying against another host ```sh crab replay notes 1234 --on default ``` `--on` runs the call's tool, arguments and caller on that context's host, against its own state, with no tape. It warns when the service deployed there runs another digest than the call did. `--on default` is the local host. - [Calls and logs](/docs/guides/monitoring#calls) - [Developing](/docs/guides/local) --- # CLI Source: https://crabtalk.ai/docs/guides/cli > Every crab command and its options, as the current crab CLI prints them. ```text Run the local host, deploy and inspect services on it or Cloud, and run a Cloud account Usage: crab [OPTIONS] Commands: login Sign in to Cloud in the browser, and use it from now on logout Forget the session of the context in use, or of `--context` request Where a request asked of a person stands: a payment or a secret status Where `crab` connects, its credential access, and the account plan dev Run the local host: deploy services to it and serve their tools over HTTP and MCP, in the foreground until Ctrl-C or `crab dev stop` new Scaffold a service crate ls List deployed services export Download a service's SQL and key-value data as a SQLite file build Build the service in a directory and print the path of its image bench Build and measure local WebAssembly workloads in a temporary host up Build and deploy your own source deploy Deploy an image from Cloud's image registry push Build and push images to Cloud's image registry pull Download an image into the local host's image store start Serve stopped services again: those named, or those `crab deploy` would deploy here stop Stop serving services, keeping what they committed: those named, or those `crab deploy` would deploy here call Call one of a service's tools workflow Inspect and manage durable workflow runs replay Run a call that failed again, read from the context in use: here, the image it ran answered from its tape, or with `--on` on that context's host, against its state inspect Show a service's README, tools and their arguments idl Write a deployed service's IDL, which `declare_service!` reads rm Remove services and what they committed: those named, or those `crab deploy` would deploy here logs Print what a service emitted, oldest first usage What a service used over the last 30 days, a day each; with no service, what the account's services used and how much of its plan calls A service's calls over the last 30 days, newest first, on Cloud cost What a service cost in a UTC month, by resource, on Cloud earnings What the account's priced tools earned on Cloud, a UTC month each: revenue, the cut, compute and net, by service and tool; what is owed, and the payouts cron List a service's cron schedules and runs var A service's vars: listed, set, returned to their defaults wakes The wakes armed to call a service's tools deploys A service's last 100 deploys on Cloud, newest first, refused and failed ones included sunset Stop serving a deprecated tool from a UTC day, or with no day, keep serving it budget The most one call of a tool may use, what its runs of the last 30 days used, and the `budget` for its `crab.toml` they fit secret A service's secrets on Cloud: set, listed by name, revoked billing The account's plan, credit and payments; with no subcommand, where it stands key The account's API keys, which deploy from CI app The apps a website calls the account's services through org Orgs, their members and invitations invites The orgs that invited you; with `accept`, join one plans The plans Cloud sells, and what each includes rates What compute costs at the rates explain What an error code means and what to do about it, as `E0001` context Name the hosts `crab` talks to, and pick one update Replace this `crab` with the latest release, when it is newer help Print this message or the help of the given subcommand(s) Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help -V, --version Print version ``` ## crab login ```text Sign in to Cloud and keep the credential as a context Usage: crab login [OPTIONS] [HOST] Arguments: [HOST] The Cloud to sign in to [default: https://api.crabtalk.ai] Options: --context The context to talk to, in place of the one in use --device Request a dedicated agent key. A person approves it at the printed link --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal --name The context to keep the credential as [default: cloud] -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab logout ```text Forget the session of the context in use, or of `--context` Usage: crab logout [OPTIONS] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab request ```text Where a request asked of a person stands: a payment or a secret Usage: crab request [OPTIONS] Arguments: Its code, as `WDJB-MJHT` Options: --context The context to talk to, in place of the one in use --wait Return once it is no longer pending --expire End it now, as if its time had run out: its code stops working --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal --timeout Seconds `--wait` waits at most [default: 600] -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab status ```text Where `crab` connects, its credential access, and the account plan Usage: crab status [OPTIONS] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab dev ```text Run the local host: deploy services to it and serve their tools over HTTP and MCP, in the foreground until Ctrl-C or `crab dev stop` Usage: crab dev [OPTIONS] crab dev Commands: status Whether the local host runs, and where stop Stop the local host help Print this message or the help of the given subcommand(s) Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --addr Address to listen on. Loopback by default: the MCP endpoint carries no authorization yet, so anything wider would be an open one [default: 127.0.0.1:7777] --json Print JSON. On whenever stdout is not a terminal --root Where deployed images and the code cache live; `~/.crab/host` by default -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead --max-call-depth How deep a chain of services calling services may go. `0` refuses the first one, which is composition off. The bound is on runaway composition, not on the stack: a level costs ~720 bytes of it, and 64 MiB of guest address space. [default: 4] --max-cpu-millis How many milliseconds of CPU one call may spend, nested calls excluded [default: 100] --max-call-seconds How many seconds a call may run before it is stopped [default: 60] -d, --detach Run it in the background and return once it answers -h, --help Print help (see a summary with '-h') ``` ### crab dev status ```text Whether the local host runs, and where Usage: crab dev status [OPTIONS] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab dev stop ```text Stop the local host Usage: crab dev stop [OPTIONS] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab new ```text Scaffold a service crate Usage: crab new [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab ls ```text List deployed services Usage: crab ls [OPTIONS] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab build ```text Build the service in a directory and print the path of its image Usage: crab build [OPTIONS] [DIR] Arguments: [DIR] [default: .] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab bench ```text Build and measure local WebAssembly workloads in a temporary host Usage: crab bench [OPTIONS] --cases Arguments: Directory containing the service's crab.toml Options: --cases JSON Lines workloads, with arguments and optional HTTP fixtures --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --runs Repetitions per case; each case starts with a fresh database [default: 10] --json Print JSON. On whenever stdout is not a terminal --live-http Send real HTTP requests instead of using fixtures --offline Price with SDK defaults without requesting Cloud's current rates -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab up ```text Build and deploy your own source Usage: crab up [OPTIONS] [DIR] Arguments: [DIR] [default: .] Options: --context The context to talk to, in place of the one in use -p, --package --force --org Act for this org, by handle or id, in place of the context's account --build --json Print JSON. On whenever stdout is not a terminal --copy -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab pull ```text Download an image into the local host's image store Usage: crab pull [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab deploy ```text Deploy an image from Cloud's image registry Usage: crab deploy [OPTIONS] Arguments: Options: --as --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --version --auto-upgrade --json Print JSON. On whenever stdout is not a terminal --public -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead --private --price --force -h, --help Print help ``` ## crab push ```text Build and push images to Cloud's image registry Usage: crab push [OPTIONS] [DIR] Arguments: [DIR] [default: .] Options: --context The context to talk to, in place of the one in use -p, --package --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab start ```text Serve stopped services again: those named, or those `crab deploy` would deploy here Usage: crab start [OPTIONS] [NAMES]... Arguments: [NAMES]... Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab stop ```text Stop serving services, keeping what they committed: those named, or those `crab deploy` would deploy here Usage: crab stop [OPTIONS] [NAMES]... Arguments: [NAMES]... Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab call ```text Call one of a service's tools Usage: crab call [OPTIONS] [ARGUMENTS] Arguments: The service: a name on the context's account, or `owner/name` on Cloud for another account's public service [ARGUMENTS] The argument object. Read from stdin when omitted Options: --caller On the local host, override the default caller `local` --context The context to talk to, in place of the one in use --anonymous On the local host, call without a caller --org Act for this org, by handle or id, in place of the context's account --issuer On the local host, the end user's issuer (unchecked) --json Print JSON. On whenever stdout is not a terminal --user On the local host, the end user's subject (unchecked) -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab workflow See [Workflows](/docs/guides/workflows) for running, reading and continuing workflows, command options and costs. ## crab replay ```text Run a call that failed again, read from the context in use: here, the image it ran answered from its tape, or with `--on` on that context's host, against its state Usage: crab replay [OPTIONS] Arguments: The call's id, as `crab calls` lists it Options: --context The context to talk to, in place of the one in use --on The context to run it on, against that host's state --build Replay against the crate in the current directory, built as `crab build` --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab inspect ```text Show a service's README, tools and their arguments Usage: crab inspect [OPTIONS] Arguments: A service address, or a source directory starting with `.` or `/` Options: --context The context to talk to, in place of the one in use -p, --package Select services in a source workspace --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab idl ```text Write a deployed service's IDL, which `declare_service!` reads Usage: crab idl [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --out Where to write `{name}.json` [default: idls] --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab rm ```text Remove services and what they committed: those named, or those `crab deploy` would deploy here Usage: crab rm [OPTIONS] [NAMES]... Arguments: [NAMES]... Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab logs ```text Print what a service emitted, oldest first Usage: crab logs [OPTIONS] Arguments: Options: --after Only logs after this sequence number [default: 0] --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab usage ```text What a service used over the last 30 days, a day each; with no service, what the account's services used and how much of its plan Usage: crab usage [OPTIONS] [NAME] Arguments: [NAME] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab calls ```text A service's calls over the last 30 days, newest first, on Cloud Usage: crab calls [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --tool Only calls of this tool --org Act for this org, by handle or id, in place of the context's account --outcome Only calls that ended so: done, failed, denied or refused --json Print JSON. On whenever stdout is not a terminal --limit [default: 20] -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab cost ```text What a service cost in a UTC month, by resource, on Cloud Usage: crab cost [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --month The month, `YYYY-MM`; this one by default --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab earnings ```text What the account's priced tools earned on Cloud, a UTC month each: revenue, the cut, compute and net, by service and tool; what is owed, and the payouts Usage: crab earnings [OPTIONS] [COMMAND] Commands: connect Open Stripe's onboarding for the account's payout account, a US one, creating it the first time dashboard Open the payout account's Stripe dashboard help Print this message or the help of the given subcommand(s) Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab earnings connect ```text Open Stripe's onboarding for the account's payout account, a US one, creating it the first time Usage: crab earnings connect [OPTIONS] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab earnings dashboard ```text Open the payout account's Stripe dashboard Usage: crab earnings dashboard [OPTIONS] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab cron ```text List a service's cron schedules and runs Usage: crab cron [OPTIONS] Commands: ls List a service's cron tools, each with its expression and next run help Print this message or the help of the given subcommand(s) Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab cron ls ```text List a service's cron tools, each with its expression and next run Usage: crab cron ls [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab var ```text A service's vars: listed, set, returned to their defaults Usage: crab var [OPTIONS] Commands: ls List a service's vars, each with the value it holds or its default set Set a var, read from the service's next call unset Return a var to its default help Print this message or the help of the given subcommand(s) Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab var ls ```text List a service's vars, each with the value it holds or its default Usage: crab var ls [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab var set ```text Set a var, read from the service's next call Usage: crab var set [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab var unset ```text Return a var to its default Usage: crab var unset [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab wakes ```text The wakes armed to call a service's tools Usage: crab wakes [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab deploys ```text A service's last 100 deploys on Cloud, newest first, refused and failed ones included Usage: crab deploys [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab sunset ```text Stop serving a deprecated tool from a UTC day, or with no day, keep serving it Usage: crab sunset [OPTIONS] [ON] Arguments: [ON] `YYYY-MM-DD` Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab budget ```text The most one call of a tool may use, what its runs of the last 30 days used, and the `budget` for its `crab.toml` they fit Usage: crab budget [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab secret ```text A service's secrets on Cloud: set, listed by name, revoked Usage: crab secret [OPTIONS] Commands: resource Manage account-owned runtime secrets and service grants put Set a secret of a service, its value read from stdin and sent only to its manifest destinations, replacing any stored value ls List a service's secrets, by name, with the hosts each is sent to rm Revoke a secret of a service fill Set a service's credentials at this terminal, typed by the person here: in `secrets.toml` under the local host's root against the local host, on the account against Cloud. Refused when not run at a terminal request Ask a person to set a service's unset required secrets, or one credential's, optional or not: a code whose page they set them at, signed in, so no value passes through here help Print this message or the help of the given subcommand(s) Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret resource ```text Manage account-owned runtime secrets and service grants Usage: crab secret resource [OPTIONS] Commands: create Create a secret from stdin; prints its ID, never the value ls List secret metadata and grants rotate Replace a secret value from stdin, keeping its ID and grants rm Delete a secret and all its grants grant Grant one service access at the exact destination hosts revoke Remove one service's grant request Ask an owner to supply a value and approve a service grant on Cloud help Print this message or the help of the given subcommand(s) Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret resource create ```text Create a secret from stdin; prints its ID, never the value Usage: crab secret resource create [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret resource ls ```text List secret metadata and grants Usage: crab secret resource ls [OPTIONS] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret resource rotate ```text Replace a secret value from stdin, keeping its ID and grants Usage: crab secret resource rotate [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret resource rm ```text Delete a secret and all its grants Usage: crab secret resource rm [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret resource grant ```text Grant one service access at the exact destination hosts Usage: crab secret resource grant [OPTIONS] --host Arguments: Options: --context The context to talk to, in place of the one in use --host --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret resource revoke ```text Remove one service's grant Usage: crab secret resource revoke [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret resource request ```text Ask an owner to supply a value and approve a service grant on Cloud Usage: crab secret resource request [OPTIONS] --host Arguments: Options: --context The context to talk to, in place of the one in use --host --id --org Act for this org, by handle or id, in place of the context's account --for [default: ""] --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret put ```text Set a secret of a service, its value read from stdin and sent only to its manifest destinations, replacing any stored value Usage: crab secret put [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret ls ```text List a service's secrets, by name, with the hosts each is sent to Usage: crab secret ls [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret rm ```text Revoke a secret of a service Usage: crab secret rm [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret fill ```text Set a service's credentials at this terminal, typed by the person here: in `secrets.toml` under the local host's root against the local host, on the account against Cloud. Refused when not run at a terminal Usage: crab secret fill [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --copy A value the credentials have the person enter at the provider, such as `callback=https://example.com/auth/callback` --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab secret request ```text Ask a person to set a service's unset required secrets, or one credential's, optional or not: a code whose page they set them at, signed in, so no value passes through here Usage: crab secret request [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --credential Ask for this credential, set or not, and no other --copy A value the credentials have the person enter at the provider, such as `callback=https://example.com/auth/callback` --org Act for this org, by handle or id, in place of the context's account --for What they are for, shown to the person who sets them [default: ""] --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab billing ```text The account's plan, credit and payments; with no subcommand, where it stands Usage: crab billing [OPTIONS] [COMMAND] Commands: plan Ask a person to put the account on a plan: a code whose page they pay at verify Verify the account on GitHub, which lets it deploy on Free: here when the check passes, else a code whose page the person verifies at credit Ask a person to buy credit: a code whose page takes the amount refill Refill credit when it runs low; a cap of 0 turns it off invoices The account's invoices, newest first portal Open the Stripe portal help Print this message or the help of the given subcommand(s) Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab billing plan ```text Ask a person to put the account on a plan: a code whose page they pay at Usage: crab billing plan [OPTIONS] Arguments: Options: --context The context to talk to, in place of the one in use --for What it is for, shown to the person who pays [default: ""] --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab billing verify ```text Verify the account on GitHub, which lets it deploy on Free: here when the check passes, else a code whose page the person verifies at Usage: crab billing verify [OPTIONS] Options: --context The context to talk to, in place of the one in use --for What it is for, shown to the person who verifies [default: ""] --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab billing credit ```text Ask a person to buy credit: a code whose page takes the amount Usage: crab billing credit [OPTIONS] Options: --context The context to talk to, in place of the one in use --for What it is for, shown to the person who pays [default: ""] --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab billing refill ```text Refill credit when it runs low; a cap of 0 turns it off Usage: crab billing refill [OPTIONS] --cap Options: --amount USD one refill buys, 20 or more [default: 20] --context The context to talk to, in place of the one in use --cap The most USD refills may buy in a UTC month --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab billing invoices ```text The account's invoices, newest first Usage: crab billing invoices [OPTIONS] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab billing portal ```text Open the Stripe portal Usage: crab billing portal [OPTIONS] Options: --card Open it on changing the card --context The context to talk to, in place of the one in use --cancel Open it on cancelling the plan at the period's end --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ## crab key ```text The account's API keys, which deploy from CI Usage: crab key [OPTIONS] Commands: ls List the account's keys, active and revoked create Mint an API key. Its token is printed once rm Revoke a key ask Ask an owner of the account to let the key `crab` signs in with call other accounts' priced services, or spend more a day. Prints the link to send them grant Let a key call another account's priced service, `{owner}/{name}` ungrant Stop a key calling another account's priced service budget Set the USD a key may spend on tool prices in a UTC day help Print this message or the help of the given subcommand(s) Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab key ls ```text List the account's keys, active and revoked Usage: crab key ls [OPTIONS] Options: --context The context to talk to, in place of the one in use --org Act for this org, by handle or id, in place of the context's account --json Print JSON. On whenever stdout is not a terminal -y, --yes Confirm terminal prompts. Commands with terminal prompts refuse without a terminal unless this is given. Cloud deploys with --yes require an API key with deployments:write; CLI sessions use browser approval instead -h, --help Print help ``` ### crab key create ```text Mint an API key. Its token is printed once Usage: crab key create [OPTIONS]