Todos os docs de Dados

CLI command reference

Every command the wayai CLI exposes for working with bases, walked directly from the command tree the binary ships. Options shown on a namespace are honored by every command beneath it.

Install the CLI with npm install -g @wayai/cli, then wayai login.

wayai bases

Manage bases

wayai bases <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json

wayai bases list

List all bases

wayai bases list [options]
OptionDescription
--tag <tag>Filter by tag

wayai bases get

Get a base

wayai bases get <id> [options]

wayai bases create

Create a base

wayai bases create <id> [options]
OptionDescription
--name <name>Base name
--description <desc>Description
--tags <tags>Comma-separated organization tag names (e.g. clinica-medica,billing)
--timezone <tz>Default IANA timezone for datetime canonicalization (e.g. America/Sao_Paulo); a record type's own timezone overrides it
--environment <env>production (default) | preview. Fixed for the life of a base and not changeable on one that exists — but not welded to the id: once a base is permanently deleted and that deletion completes, the id is free and can be created again in either environment, so a preview you prototyped on can become the production base under the same slug. For a base you intend to keep, take the default so the durable id belongs to production, then get a linked preview with create-preview and promote from it. Pass preview for an ephemeral or eval base under a derived id: a preview created here has no production origin, cannot be given one later, and so can never be promoted directly

wayai bases update

Update a base's mutable config (display name, description, tags, default timezone/settings). The id/slug is immutable.

wayai bases update <id> [options]
OptionDescription
--name <name>New display name
--description <desc>Description
--tags <tags>Comma-separated organization tag names — replaces the existing tags. An empty value clears them
--timezone <tz>Default IANA timezone for datetime canonicalization. Merges into existing settings.
--settings <json>Raw settings JSON object (inline JSON or @file.json) — replaces the entire settings object
--integrations <mode>enabled | disabled. Preview-only: disabled neutralizes every external integration edge so the seeded preview behaves natively for production-safe agent evals

wayai bases rename

Rename a base's display name (the id/slug is immutable — it scopes token grants, MCP endpoints, and references)

wayai bases rename <id> [options]
OptionDescription
--name <name>New display name

wayai bases tag

Set tags on a base, from the organization's tag list

wayai bases tag <id> [options]
OptionDescription
--tags <tags>Comma-separated organization tag names (e.g. clinica-medica,billing). An empty value clears them

wayai bases delete

Delete a base. By default this is a tombstone: the base stops being listed, but its storage is retained and recreating the id restores it. Add --purge (preview bases only) to also reclaim the storage

wayai bases delete <id> [options]
OptionDescription
-y, --yesSkip confirmation prompt
--purgePreview bases only. Permanently destroy the stored records, relationships, file metadata and config of this base instead of tombstoning it. The id is retired until the deletion finishes, then frees itself

wayai bases create-preview

Create a preview base by cloning the config of another base. The origin may be a production base or another preview; the new preview id is <origin-id>--<name>, linked to the origin it was cloned from (so a preview of a preview promotes through that origin, never straight to production)

wayai bases create-preview <origin-id> [options]
OptionDescription
--name <name>Preview base name
--description <desc>Description
--integrations <mode>enabled (default) | disabled. disabled makes this preview a seeded, production-safe agent-eval target: every external integration edge is inert and it behaves natively
--create-onlyFail with 409 if the derived preview id already exists, instead of re-applying config onto it. Use for per-session ephemeral bases, where landing on a live sibling would corrupt both runs

wayai bases list-previews

List preview bases cloned from a base (production or preview)

wayai bases list-previews <origin-id> [options]

wayai bases promote

Promote config from a preview base to production (human-only)

wayai bases promote <production-id> [options]
OptionDescription
--from <preview-id>Source preview base id
--dry-runShow what would change without applying
--record-types <ids>Comma-separated record type ids to promote
--triggers <ids>Comma-separated trigger ids to promote
--inbound-webhooks <ids>Comma-separated inbound webhook ids to promote

wayai bases rollback

Roll back a promotion (human-only)

wayai bases rollback <production-id> [options]
OptionDescription
--promotion <promotion-id>Promotion id to roll back

wayai bases promotions

List promotion history for a production base

wayai bases promotions <production-id> [options]

wayai bases use

Deprecated alias of wayai use bases/<id> — scope this worktree to a base

wayai bases use <base> [options]

wayai bases unbind

Deprecated alias of wayai unbind bases/<id> — clear the base scope

wayai bases unbind [options]

wayai bases tokens

Manage API tokens

wayai bases tokens <command> [options]

wayai bases tokens create

Create a scoped API token

wayai bases tokens create [options]
OptionDescription
--name <name>Token name
--grants <json>Grant definitions as JSON array
--token-onlyPrint only the raw rec_ token for secure command substitution (shown once)
--expires-at <date>Expiration date (ISO 8601, e.g. 2026-06-01T00:00:00Z)
--ttl <duration>Relative expiry, e.g. 10m, 2h, 7d (use for disposable probe/test tokens)
--description <text>What holds this token (e.g. "behind credential X"); shown in list and revoke warnings

wayai bases tokens create-for-toolset

Create a toolset-bound (consumer) token whose authorization IS the toolset tool surface — it can call exactly the tools that toolset exposes (those record types + operations, relationships, batch, and sql only if enabled) and nothing else. Binds to the configured --base.

wayai bases tokens create-for-toolset <slug> [options]
OptionDescription
--base <id>Base id (or set WAYAI_BASE)
--name <name>Token name (default: "<slug> consumer")
--token-onlyPrint only the raw rec_ token for secure command substitution (shown once)
--expires-at <date>Expiration date (ISO 8601, e.g. 2026-06-01T00:00:00Z)
--ttl <duration>Relative expiry, e.g. 10m, 2h, 7d (use for disposable probe/test tokens)
--description <text>What holds this token (e.g. "behind credential X"); shown in list and revoke warnings

wayai bases tokens list

List API tokens (status, last_used_at, expires_at, description)

wayai bases tokens list [options]

wayai bases tokens revoke

Revoke an API token (permanent). A recently-used or toolset-bound token requires --force.

wayai bases tokens revoke <token_id> [options]
OptionDescription
--forceRevoke even if the token appears to be in live use

wayai bases tokens prune

Revoke stale tokens, selected by staleness only (expired, or unused past --unused-since) — never by name. Previews by default; revoking requires --yes or an interactive confirmation.

wayai bases tokens prune [options]
OptionDescription
--unused-since <duration>Also prune tokens with no activity for this long (e.g. 30d). Skips toolset-bound and legacy usage-untracked tokens.
--include-boundAllow pruning stale toolset-bound (consumer) tokens
-y, --yesRevoke without prompting (required when non-interactive)

wayai bases credentials

Manage a base's integration credentials

wayai bases credentials <command> [options]
OptionDescription
--base <id>Base id (or set WAYAI_BASE)

wayai bases credentials create

Store a credential on this base (value read from stdin, a masked prompt, or --file)

wayai bases credentials create [options]
OptionDescription
--name <name>Credential name — what a credential:<name> reference resolves
--content-type <mime>MIME type of the value (e.g. application/x-pkcs12)
--expires-at <date>Expiry as ISO-8601 (e.g. 2027-01-01T00:00:00Z) — informational; nothing is auto-disabled
--no-sync-to-productionDo not publish this credential on promote — production owns its own value
--file <path>Read the credential value from a file and base64-encode it (certificates, keystores, service-account JSON)
--value-stdinRead the credential value from stdin (recommended for CI)
--value-promptPrompt for the credential value, masked

wayai bases credentials list

List this base's credentials (values are never returned)

wayai bases credentials list [options]

wayai bases credentials get

Get credential metadata (the value is never returned)

wayai bases credentials get <id> [options]

wayai bases credentials rotate

Install a new caller-supplied value (never auto-generates)

wayai bases credentials rotate <id> [options]
OptionDescription
--expires-at <date>Set the rotated credential's new expiry (ISO-8601)
--file <path>Read the new credential value from a file and base64-encode it (certificates, keystores, service-account JSON)
--value-stdinRead the new credential value from stdin (recommended for CI)
--value-promptPrompt for the new credential value, masked

wayai bases credentials set-sync

Set the promote-time publish flag on a direct credential: on by default, off with --no-sync-to-production

wayai bases credentials set-sync <id> [options]
OptionDescription
--no-sync-to-productionDo not publish this credential on promote

wayai bases credentials delete

Delete a direct credential (an organization-linked one is unlinked instead)

wayai bases credentials delete <id> [options]
OptionDescription
-y, --yesSkip confirmation prompt

Project an organization credential onto this base

wayai bases credentials link [options]
OptionDescription
--org-credential <id>Organization credential id
--name <name>Credential name on the base (default: a slug of the credential's name)

Remove an organization credential's projection from this base

wayai bases credentials unlink <id> [options]
OptionDescription
--org-credential <id>Organization credential id

wayai bases sql

Execute a read-only SQL query against base data

wayai bases sql [query] [options]
ArgumentDescription
querySQL query (SELECT only)
OptionDescription
--base <id>Base id (or set WAYAI_BASE)
--file <path>Read SQL from a file instead of the argument
--param <kv...>Named parameters as key=value pairs (e.g. --param status=issued)

wayai bases import

Bulk historical import: load an NDJSON backfill, list sessions, or undo one

wayai bases import <command> [options]
OptionDescription
--base <id>Base id (or set WAYAI_BASE)

wayai bases import run

Load an NDJSON file into a record type (one JSON object per line, each {external_id, data})

wayai bases import run <record_type> [options]
OptionDescription
--file <path>NDJSON file to import
--chunk-size <n>Rows per request, max 1000. Must match the original run when resuming. (default: 1000)
--request-key <key>Idempotency key for this logical run (default: generated). Re-use it to resume.
--start-chunk <n>Skip chunks before this index — resume a run that stopped partway (default: 0)
--no-finalizeLeave the session open (resume later with the same --request-key)

wayai bases import list

List import sessions, newest first — find a stuck run or the id to undo

wayai bases import list [options]
OptionDescription
--limit <n>Maximum sessions to return
--offset <n>Sessions to skip

wayai bases import rollback

Undo an import — deletes only the rows it CREATED. Re-importing corrected data is usually the better fix.

wayai bases import rollback <import_id> [options]
OptionDescription
--yesSkip the confirmation prompt

wayai bases batch

Execute atomic batch operations (up to 1,000 operations)

wayai bases batch [options]
OptionDescription
--base <id>Base id (or set WAYAI_BASE)
--operations <json>Operations array (inline JSON or @filename)

wayai bases providers

Import/export tool definitions between LLM providers and record types

wayai bases providers <command> [options]
OptionDescription
--base <id>Base id (or set WAYAI_BASE)

wayai bases providers import

Import tool definitions as record types. Providers: openai, anthropic, google, mcp

wayai bases providers import <provider> [options]
OptionDescription
--tools <json>Tool definitions (inline JSON or @filename)

wayai bases providers export

Export record types as tool definitions. Providers: openai, anthropic, google, mcp

wayai bases providers export <provider> [options]
OptionDescription
--record-types <ids>Comma-separated record type ids (omit for all)
--to <file>Write the exported definitions to a file instead of stdout

wayai bases providers import-call

Create a record from a tool call in provider format. Providers: openai, anthropic, google, mcp

wayai bases providers import-call <provider> <record_type> [options]
OptionDescription
--data <json>Tool call data in provider format (inline JSON or @filename)
--external-id <id>External id for idempotent upsert
--external-source <source>External source identifier

wayai bases report

File a report to the Data triage queue and verify the outcome

wayai bases report <command> [options]

wayai bases report create

Submit a report to the Data triage queue (deduplicated)

wayai bases report create [options]
OptionDescription
--title <title>Short summary
--description <text>What happened
--source <source>Origin: cli_report (default) | review | security_audit
--classification <c>Nature: bug (default) | flaky_test | security | enhancement
--dedup-key <key>Stable dedup key (e.g. "<file>::<test>"); collapses repeat occurrences
--severity <level>low | medium | high | critical
--steps <text>Steps to reproduce
--error-message <text>Exact error text if any
--context <text>Additional context (logs, request ids)
--locale <code>Notification locale (en | pt | es) (default: en)
--reporter-email <addr>Override reporter email (defaults to session email)
--base-id <id>Base the error relates to (defaults to the configured base)
--record-type <name>Record type the error relates to
--record-id <id>Record id (UUID) the error relates to
--external-id <id>External id of the related record
--external-source <src>External source of the related record
--relationship-id <id>Relationship id the error relates to

wayai bases report list

List your reports, newest first

wayai bases report list [options]
OptionDescription
--status <s>Filter by status (e.g. shipped — awaiting your verification)

wayai bases report get

Show one of your reports: status + the message thread

wayai bases report get <report_id> [options]

wayai bases report accept

Accept a shipped fix (→ addressed)

wayai bases report accept <report_id> [options]

wayai bases report contest

Contest a shipped fix or a dismissal (→ back to triage)

wayai bases report contest <report_id> [options]
OptionDescription
--reason <text>Why the fix/dismissal is wrong

wayai records

Manage records

wayai records <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai records upsert

Create or update a record

wayai records upsert <record_type> [options]
OptionDescription
--data <json>Record data (inline JSON or @filename)
--id <id>Internal record ID (UUID) to update a known record
--external-id <id>External/agent-supplied ID for idempotent upsert
--external-source <source>Source system for external_id (e.g. stripe)

wayai records query

List/search records: exact filters + fuzzy search, sorting, pagination

wayai records query <record_type> [options]
OptionDescription
--external-source <source>List from an external source (proxy-backed record_type). Combine with --filter when the source forwards filters.
--filter <json>Filter DSL expression (inline JSON or @filename). Use the search operator for fuzzy matching.
--sort <json>Sort expressions (inline JSON or @filename), e.g. [{"field":"data.created","direction":"desc"}]
--fields <list>Comma-separated field projection
--limit <n>Max results
--offset <n>Pagination offset

wayai records get

Get a record by internal ID, or by external_id (pass --external-source to scope it)

wayai records get <record_type> <id> [options]
OptionDescription
--external-source <source>Treat <id> as an external_id scoped to this source system (e.g. stripe)

wayai records delete

Delete a record by internal ID, or by external_id (pass --external-source to scope it)

wayai records delete <record_type> <id> [options]
OptionDescription
-y, --yesSkip confirmation prompt
--external-source <source>Treat <id> as an external_id scoped to this source system (e.g. stripe)

wayai records history

View the change history (audit log) for a record — every version, who changed it, and when

wayai records history <id> [options]
OptionDescription
--limit <n>Max results
--offset <n>Pagination offset
--diffInclude field-level diffs between versions

wayai record-types

Manage record_types

wayai record-types <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai record-types list

List all record_types in a base

wayai record-types list [options]

wayai record-types get

Get a record_type

wayai record-types get <id> [options]

wayai record-types upsert

Create or update a record_type

wayai record-types upsert <id> [options]
OptionDescription
--name <name>RecordType name
--description <desc>Description
--schema <json>JSON Schema (inline JSON or @filename)
--icon <icon>Icon name
--color <color>Hex color
--sources <json>External sources config (inline JSON or @filename)

wayai record-types delete

Delete a record_type

wayai record-types delete <id> [options]
OptionDescription
-y, --yesSkip confirmation prompt

wayai record-types history

View the change history (audit log) for a record_type — every schema/config version, who changed it, and when

wayai record-types history <id> [options]
OptionDescription
--limit <n>Max results
--offset <n>Pagination offset
--diffInclude field-level diffs between versions

wayai relationships

Manage relationships between records

wayai relationships <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai relationships upsert

Create or update a relationship

wayai relationships upsert [options]
OptionDescription
--source <record_type/id>Source record by internal id
--source-external <record_type/external_id>Source record by external_id (the record must exist)
--source-external-source <name>Source system scoping --source-external
--target <record_type/id>Target record by internal id
--target-external <record_type/external_id>Target record by external_id (the record must exist)
--target-external-source <name>Source system scoping --target-external
--type <type>Relationship type
--id <id>Relationship ID
--external-id <key>The relationship's own external key: a retried upsert with the same key updates the first row instead of duplicating it
--external-source <name>Source system scoping the relationship's --external-id
--data <json>Relationship metadata (inline JSON or @filename)

wayai relationships get

Get a relationship by ID (or by its external key: pass the external_id with --rel-type)

wayai relationships get <id> [options]
OptionDescription
--rel-type <type>Treat <id> as the relationship external_id, scoped to this relationship type
--external-source <name>Source system scoping the external_id (with --rel-type)

wayai relationships delete

Delete a relationship by ID (or by its external key: pass the external_id with --rel-type)

wayai relationships delete <id> [options]
OptionDescription
--rel-type <type>Treat <id> as the relationship external_id, scoped to this relationship type
--external-source <name>Source system scoping the external_id (with --rel-type)
-y, --yesSkip confirmation prompt

wayai relationships history

View the change history (audit log) for a relationship — every version, who changed it, and when

wayai relationships history <id> [options]
OptionDescription
--limit <n>Max results
--offset <n>Pagination offset
--diffInclude field-level diffs between versions

wayai relationship-types

Manage relationship types (the schema for a relationship's metadata)

wayai relationship-types <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai relationship-types list

List all relationship types in a base

wayai relationship-types list [options]

wayai relationship-types get

Get a relationship type

wayai relationship-types get <rel_type> [options]

wayai relationship-types upsert

Create or update a relationship type

wayai relationship-types upsert <rel_type> [options]
OptionDescription
--description <desc>Description
--schema <json>JSON Schema for the relationship data (inline JSON or @filename). Omit to allow any data.
--source-record-types <json>JSON array of allowed source record_types (inline JSON or @filename)
--target-record-types <json>JSON array of allowed target record_types (inline JSON or @filename)

wayai relationship-types delete

Delete a relationship type

wayai relationship-types delete <rel_type> [options]
OptionDescription
-y, --yesSkip confirmation prompt

wayai relationship-types history

View the change history (audit log) for a relationship type — every config version, who changed it, and when

wayai relationship-types history <id> [options]
OptionDescription
--limit <n>Max results
--offset <n>Pagination offset
--diffInclude field-level diffs between versions

wayai query-relationships

Query related records

wayai query-relationships <record_type> <id> [options]
ArgumentDescription
record_typeRecordType of the source record
idSource record ID
OptionDescription
--type <type>Filter by relationship type
--direction <dir>Direction: outgoing, incoming, or both (default: both)
--limit <n>Max results (default: 50)
--offset <n>Skip results (default: 0)
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai files

Manage files (path-addressed, versioned content) within a file type

wayai files <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai files put

Upload a local file to a path (e.g. wayai files put reports q3/summary.pdf --file ./summary.pdf)

wayai files put <file_type> <path> [options]
OptionDescription
--file <local>Local file to upload
--content-type <type>MIME type (default: application/octet-stream)

wayai files get

Download a file (or --meta for metadata only). --version N reads a specific retained content version.

wayai files get <file_type> <path> [options]
OptionDescription
--to <local>Local file to save to (defaults to the file basename)
--metaPrint metadata JSON instead of downloading the content
--version <n>Read a specific content version (default: latest)

wayai files history

List the content versions of a file (newest first)

wayai files history <file_type> <path> [options]
OptionDescription
--limit <n>Max versions to return
--offset <n>Pagination offset

wayai files diff

Diff two content versions of a file — metadata delta plus a text content diff

wayai files diff <file_type> <path> [options]
OptionDescription
--from <n>Base version number
--to <n>Target version number

wayai files list

List files by path prefix

wayai files list <file_type> [options]
OptionDescription
--prefix <path>Path prefix filter (e.g. q3/)
--depth <n>Max folder depth below the prefix (1 = immediate children)
--limit <n>Max results
--offset <n>Pagination offset

wayai files mv

Rename/move a file (the blob is untouched)

wayai files mv <file_type> <from> <to> [options]

wayai files rm

Delete a file

wayai files rm <file_type> <path> [options]
OptionDescription
-y, --yesSkip confirmation prompt

wayai files mount

Mint an S3 credential so any harness can mount this file type as a filesystem (s3fs, cloud mount SDKs). Read-only by default; the secret is shown once.

wayai files mount <file_type> [options]
OptionDescription
--expires-in <seconds>Credential lifetime in seconds (default 30 days, max 90)
--mode <mode>read_only (default) or read_write — the whole-bucket mode when no --path is given
--path <prefix>Confine to a path prefix (repeatable); optionally suffix :read_only|:read_write per prefix (e.g. drafts/:read_write) (default: ``)

wayai file-types

Manage file types (Buckets) — storage policy + optional metadata schema for files

wayai file-types <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai file-types list

List all file types in a base

wayai file-types list [options]

wayai file-types get

Get a file type

wayai file-types get <id> [options]

wayai file-types upsert

Create or update a file type (preview bases only)

wayai file-types upsert <id> [options]
OptionDescription
--name <name>File type name
--description <desc>Description
--max-size <bytes>Max bytes per file (0 = unlimited)
--allowed-content-types <json>Allowed content-types, JSON array (inline or @filename)
--metadata-schema <json>JSON Schema for file metadata (inline JSON or @filename)

wayai file-types delete

Delete a file type (cascades its files)

wayai file-types delete <id> [options]
OptionDescription
-y, --yesSkip confirmation prompt

wayai attachments

Manage record attachments

wayai attachments <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai attachments upload

Get a presigned upload URL for a record attachment. With --file, uploads the file content in one step.

wayai attachments upload <record_type> <id> [options]
OptionDescription
--filename <name>File name or path (e.g. docs/guide.md)
--content-type <type>MIME type (default: application/octet-stream)
--file <path>Local file to upload (skips presigned URL output, uploads directly)

wayai attachments url

Get a download URL for an attachment by filename

wayai attachments url <record_type> <id> [options]
OptionDescription
--filename <name>File name or path (e.g. docs/guide.md)

wayai attachments list

List attachments for a record

wayai attachments list <record_type> <id> [options]
OptionDescription
--prefix <path>Filter by path prefix (e.g. docs/)

wayai attachments delete

Delete an attachment

wayai attachments delete <record_type> <id> <attachment-id> [options]
OptionDescription
-y, --yesSkip confirmation prompt

wayai toolsets

Manage MCP toolsets

wayai toolsets <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai toolsets upsert

Create or update an MCP toolset

wayai toolsets upsert <slug> [options]
OptionDescription
--name <name>Toolset display name (required unless using --config)
--description <desc>Toolset description
--action <ref>Reference an Action by id, optionally renamed: <action_id> or <action_id>=<surface_name> (repeatable). Create Actions first with wayai actions upsert. (default: ``)
--relationship <spec>Relationship tool spec: rel_type:op1,op2 (repeatable) (default: ``)
--batch <spec>Batch operation spec: record_type_or_rel:op1,op2 (repeatable) (default: ``)
--sql-queryEnable sql_query tool
--config <json>Full toolset config as JSON. A toolset composes first-class Actions by reference — its actions are refs {action: <action_id>, action_name?, description_override?}. Create the Actions with wayai actions upsert (each carries its own record_type, operation, and guard/shaping config: filterable_fields, writable_fields, precondition, binding). Use @file.json to read from file.
--mint-tokenAfter upsert, also mint a toolset-bound (consumer) token for this base and print it (handy for sandbox-testing the preview toolset)

wayai toolsets get

Get a toolset

wayai toolsets get <slug> [options]
OptionDescription
--resolvedInclude resolved record_type schemas

wayai toolsets list

List all toolsets

wayai toolsets list [options]

wayai toolsets delete

Delete a toolset

wayai toolsets delete <slug> [options]
OptionDescription
-y, --yesSkip confirmation prompt

wayai toolsets url

Get the MCP connection URL for a toolset

wayai toolsets url <slug> [options]

wayai actions

Manage Actions — reusable, named definitions: one record_type + one operation, or a composite of atomic write steps (--config with steps)

wayai actions <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai actions upsert

Create or update an Action — one record_type + one operation, or a composite (--config with steps)

wayai actions upsert <id> [options]
OptionDescription
--record-type <record_type>The record_type this action operates over (single-op; omit for a composite)
--operation <op>The operation: create | get | list | update | delete (single-op; omit for a composite)
--description <desc>Agent-facing description
--config <json>Full Action config as JSON. Single-op: writable_fields, filterable_fields (per field: field (required), param, match, enum, pattern, optional, description — a declared field generates a required param unless optional: true; a range match is always optional), base_filter (a Filter DSL predicate merged server-side into every list call, invisible to the agent; list only, over a native record_type or a source-backed one whose list endpoint declares local_filters; the value "$now" resolves to the instant of each call, on a date-time field with a range op), precondition, binding, external_source, expose_/default_ (machinery params are hidden unless expose_<param>: true). Composite: steps — an ordered list of atomic write steps ({key, record_type|rel_type, operation, writable_fields?, precondition?}) run in one transaction. Use @file.json to read from file.

wayai actions get

Get an Action by id

wayai actions get <id> [options]

wayai actions list

List Actions in this base

wayai actions list [options]

wayai actions delete

Delete an Action

wayai actions delete <id> [options]
OptionDescription
-y, --yesSkip confirmation

wayai triggers

Manage triggers (outbound webhooks, internal writes, external writes)

wayai triggers <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai triggers create

Create a trigger (a webhook, an internal_write that patches a referenced record, or an external_write that mirrors the record to an external source)

wayai triggers create [options]
OptionDescription
--name <name>Trigger name
--events <events>Comma-separated event types
--url <url>Webhook target URL (webhook actions)
--secret-stdinRead the webhook HMAC signing secret from stdin (webhook actions)
--secret-promptPrompt for the webhook HMAC signing secret, masked (webhook actions)
--action <json>Action JSON. webhook {"type":"webhook","url":...,"secret":...}; internal_write {"type":"internal_write","target":"slots","match":{"source_field":"data.slot_id"},"patch":{"status":"busy"},"precondition":{"field":"data.status","op":"eq","value":"free"},"mode":"async"} (mode: "async" applies after the write, "transactional" applies atomically so a precondition miss rolls the write back); external_write {"type":"external_write","record_type":"upstream_appointments","source":"legacy","op":"create","watched_fields":"mapped"} (writes the triggering record through that source's write path — translation, endpoint, auth — and links the upstream-assigned id back as external_id; "record_type" defaults to the triggering record_type, "op" defaults from the event; "watched_fields" scopes UPDATE dispatch to writes that changed an upstream-mapped field — "mapped" = the source's to_external keys, or an explicit array of data fields — so an overlay-only write skips the redundant upstream push; omit to fire on every update)
--id <id>Trigger ID (auto-generated if omitted)
--record-type-scope <record_types>Comma-separated record_type scope
--filter <json>Filter expression (JSON)
--skip-cascade-writes <bool>Skip firing on cascade-originated (internal_write) writes (default true)

wayai triggers get

Get a trigger

wayai triggers get <id> [options]

wayai triggers list

List all triggers

wayai triggers list [options]

wayai triggers deliveries

List trigger delivery attempts (status, retries, errors)

wayai triggers deliveries [options]
OptionDescription
--status <status>Filter by status (pending | delivered | failed | dead)
--trigger-id <id>Filter by trigger id

wayai triggers delete

Delete a trigger

wayai triggers delete <id> [options]
OptionDescription
-y, --yesSkip confirmation prompt

wayai inbound-webhooks

Manage inbound webhook endpoints

wayai inbound-webhooks <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai inbound-webhooks create

Create a new inbound webhook

wayai inbound-webhooks create [options]
OptionDescription
--name <name>Inbound webhook name
--secret-stdinRead the HMAC shared secret from stdin (recommended for CI)
--id <id>Inbound webhook ID (auto-generated if omitted)
--record-type-scope <record_types>Comma-separated record_type scope
--field-mapping <json>Inline mapping applied to the payload before write — a field_mapping JSON, e.g. {"to_external":{"status":"state"}} (to_external renames auto-invert on read); an explicit inbound-rename block and {"computed":{...}} are also accepted. Mutually exclusive with --source-binding.
--source-binding <json>Reuse a record_type source's field_mapping for the inbound translation — {"record_type":"<id>","source":"<name>"}. Mutually exclusive with --field-mapping.
--ingest-auth <json>Inbound auth scheme. Default (omitted) = HMAC signature. Static-header senders: {"type":"static_header","header":"X-Account-Key"} — the configured header is compared to the shared secret (constant-time) instead of an HMAC.
--hydration <json>Make this a reference-style ("notification + fetch") webhook: a thin delivery names a record id; the base fetches the full record via the bound source's read endpoint and stores it. Requires --source-binding and a single native --record-type-scope. JSON: {"id_path":"record_id","event_path":"event","event_map":{"ResourceDeleted":"delete"},"default_op":"upsert","merge":true}. Set "merge":true to refresh only the mapped (upstream-owned) fields on re-sync and preserve the locally-owned fields (status/tags/scores) on the same record.

wayai inbound-webhooks get

Get an inbound webhook

wayai inbound-webhooks get <id> [options]

wayai inbound-webhooks list

List all inbound webhooks

wayai inbound-webhooks list [options]

wayai inbound-webhooks deliveries

List hydration delivery status for reference-style ("notification + fetch") webhooks

wayai inbound-webhooks deliveries [options]
OptionDescription
--status <status>Filter by status (pending|delivered|failed|dead)
--inbound-webhook <id>Filter to one inbound webhook

wayai inbound-webhooks delete

Delete an inbound webhook

wayai inbound-webhooks delete <id> [options]
OptionDescription
-y, --yesSkip confirmation prompt

wayai seed

Apply, reset, or clear a seed fixture on a preview base (hermetic eval data)

wayai seed <command> [options]
OptionDescription
--org <uuid>Organization to operate against (overrides the repo's org binding)
--output <format>Output format: json or table (default: table)
--jsonShorthand for --output json
--base <id>Base id (or set WAYAI_BASE)

wayai seed apply

Idempotently upsert the fixture (keyed by external_id, so re-applying never twins). Preview-only.

wayai seed apply <name> [options]

wayai seed reset

Restore the declared baseline: re-apply in place (fixing trigger-mutated records) and prune owned rows the fixture no longer declares. Record types listed in exclusive_record_types are treated as authoritative — reset also removes their non-declared records (agent-created residue) and any relationships referencing them. Preview-only.

wayai seed reset <name> [options]

wayai seed clear

Delete every row the fixture owns (teardown). Preview-only.

wayai seed clear <name> [options]

wayai seed list

List the seed fixtures defined on a base

wayai seed list [options]

wayai seed get

Show a seed fixture definition (its declared records and relationships)

wayai seed get <name> [options]

wayai seed lease

Coordinate an isolated fixture lease

wayai seed lease <command> [options]

wayai seed lease acquire

Reset a fixture and atomically acquire the preview base for one eval run

wayai seed lease acquire <fixture> [options]
OptionDescription
--lease-id <uuidv7>Client-generated UUIDv7 (permanently single-use)
--owner-ref <ref>Safe ID: 1-200 letters/digits or ._:@/+~=- (descriptive only)

wayai seed lease status

Inspect your lease, or learn only whether another actor has locked the base

wayai seed lease status [options]
OptionDescription
--lease-id <uuidv7>Inspect a specific lease ID

wayai seed lease release

Clear fixture-owned data and release the matching lease

wayai seed lease release <fixture> [options]
OptionDescription
--lease-id <uuidv7>The UUIDv7 used to acquire the lease
--owner-ref <ref>Same safe ID: 1-200 letters/digits or ._:@/+~=-