Boat.API key reference
ApiKey
Section titled “ApiKey”Source:
packages/boat/src/ApiKey.ts
A scoped Boat API key: the actions it may take, and the sandboxes or environments it reaches. Give each app or CI system its own key with only what it needs.
Boat shows a key once, when it is created, so Alchemy keeps it in state
as a Redacted value. Changing any prop creates a new key and revokes
the old one; destroying the resource revokes it.
Creating a key needs an account key with account.admin (made under
your personal account in the dashboard, not an organization’s keys,
which cannot change account settings), stored with
alchemy profile edit --add Boat. Boat never gives a browser sign-in’s
key account.admin. A new key cannot
have more actions, more sandboxes or a later expiry than the key
creating it, so keys expire no later than the profile’s key. An expired
key is minted again on the next deploy.
ApiKey: Creating an API key
Section titled “ApiKey: Creating an API key”A key for CI that manages the sandboxes it creates
export const Ci = Boat.ApiKey("Ci", { preset: "ci", ttl: "90d" });A key that only runs commands in one sandbox
const box = yield* Boat.Sandbox("Box", {});const key = yield* Boat.ApiKey("BoxExec", { actions: ["sandbox.read", "exec", "file.read", "file.write"], sandboxIds: [box.sandboxId],});