> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent and workspace customization

> Struct CLI reference: agent and workspace customization.

Use the Struct CLI to inspect and configure the workspace from your terminal. Commands run with the permissions of the active login.

Use these commands after [claiming or signing in to a workspace](https://docs.struct.ai/reference/cli-auth.md). Each operation still checks the person's role, login scope and enabled features. Read current settings before changing them, and obtain authorization before enabling automatic actions or sending messages.

## Fix, memories, skills and automations

| Command | What it does |
| - | - |
| `struct build-agent settings show` | Show who writes the fix (Struct Build Agent, Cursor or Devin), when Struct opens a pull request, the confidence an automatic one needs, the sources that open them, and whether Cursor and Devin keys are saved (never the keys). |
| `struct build-agent settings set` | Workspace admins: `--provider <struct\|cursor\|devin>`, `--trigger <manual\|auto>`, `--min-confidence <4\|5>`, `--devin-org-id <org-…>`. Cursor needs a saved Cursor API key and Devin a Devin API key and organization ID (codes `cursor_api_key_required`, `devin_api_key_required`, `devin_org_id_required`). With `--provider cursor` or `devin`, the key in `CURSOR_API_KEY` or `DEVIN_API_KEY` is sent in the same change and never printed. |
| `struct build-agent keys set <cursor\|devin>` | Workspace admins: save or replace a provider API key from `--stdin`, else `CURSOR_API_KEY` / `DEVIN_API_KEY`, else a hidden prompt in a terminal. Never printed; Struct only reports whether one is saved. |
| `struct build-agent keys remove <cursor\|devin>` | Workspace admins: remove a provider API key. Removing the selected provider's key switches Fix to the Struct Build Agent. |
| `struct build-agent repos list` / `repos available` | List repository configurations (repository, name, Node.js version, id), or the GitHub repositories Struct can reach (`--search <text>`; configured ones are marked). |
| `struct build-agent repos add --repo <owner/name>` | Workspace admins: set up a repository. `--name <name>`, `--node <18\|20\|22\|24>` (default 24). Needs a GitHub connection that reaches the repository (`github_not_connected`, `github_repository_not_accessible`); one configuration per repository (`repository_already_configured`). |
| `struct build-agent repos set <repo>` / `repos remove <repo>` | Workspace admins: change `--node` or `--name`; or delete the configuration with its scripts and prompt (`--yes` without a terminal). `<repo>` is `owner/name`, a configuration name or id. |
| `struct build-agent scripts show\|set\|delete <repo> --pre\|--post` | The pre-execution script (prepares the machine) or post-execution script (checks the change). `show` prints it on stdout, and nothing (exit 0, `"set": false` with `--json`) when none is set; `set --file <path>` (`-` for stdin) and `delete` (`--yes`) need a workspace admin. |
| `struct build-agent prompt show\|set\|delete <repo>` | The custom prompt added to the agent's instructions (at most 1,000 characters). Same rules as `scripts`. |
| `struct memory struct-md show` | Print the STRUCT.md body on stdout; title, version and generation status go to stderr (all of it with `--json`). |
| `struct memory struct-md generate` | Workspace admins: have an agent write STRUCT.md while it is empty, or again after a failed attempt. `--wait` waits until it finishes (`--timeout <seconds>`, default 900, which also bounds each check). |
| `struct memory struct-md edit` | Workspace admins: `--title <title>` and/or `--file <path>` (`-` for stdin; at most 4,000 tokens), `--reason <text>` saved with the version. `--expected-version <n>` refuses the edit if STRUCT.md changed since (`memory_version_conflict`): take the body and version from the same `show --json` answer, for example `struct memory struct-md show --json > s.json`, `jq -j .body s.json > STRUCT.md`, edit, then `struct memory struct-md edit --file STRUCT.md --expected-version "$(jq .version s.json)"`; edits are refused while a generation is running (`struct_md_generating`). Memories are available to every workspace; older servers can still return `memories_not_enabled` (exit `1`). |
| `struct automations list` / `show <id>` | List automations, or show one: schedule in plain words, cron, timezone, the next run time from Struct's scheduler, source, delivery and instructions. Any member can use automations when the plan includes them (`plan_required` otherwise). |
| `struct automations runs <id>` | Recent runs, newest first: status (`success`, `failed`, `no_result`, `running`, or `delivery_unavailable` when Struct could not post in the Slack channel and charged no credits), start, duration, Slack link and error. `--limit <1-50>` (default 10). |
| `struct automations presets` | List the ready-made tasks, for `--preset`. |
| `struct automations create` | Create an automation. Instructions: `--instructions-file <path>` (`-` for stdin) and/or `--preset <id>`. Source: `--source slack:<#channel>` or `--all-sources` (default). Delivery: `--deliver-slack <#channel>` (repeat it or comma-separate for several) and/or `--deliver-email a@x,b@y` with `--email-subject`. Schedule: `--cron "<expr>"`, `--daily HH:MM` or `--weekly mon@HH:MM`, in `--tz <IANA zone>` (default when left out: this machine's timezone); with fixed times (random `R` values are refused). New or changed cron schedules need at least an hour between occurrences; retries, manual triggers and unchanged legacy schedules are exceptions. Struct joins public Slack channels itself and refuses with `channel_private`, `channel_archived`, `channel_not_found`, `slack_missing_scope`, `invalid_cron`, `schedule_too_frequent`, `invalid_timezone` or `invalid_email`. |
| `struct automations edit <id>` | Change only the flags you pass (same flags as `create`; `--tz` is left unchanged unless given). Targets of a kind you do not name are kept: `--deliver-slack` (repeatable or a comma list) replaces every Slack target, `--deliver-email` replaces every email target with one, `--email-subject` alone sets the subject of every email target (`""` clears it), `--no-deliver-slack` / `--no-deliver-email` remove every target of that kind; `--title ""` clears the title. |
| `struct automations enable\|disable\|run <id>` | Turn an automation on or off, or start a run now (uses credits; `run_in_progress` while one is running). After three runs in a row skipped as `delivery_unavailable`, Struct turns the automation off and emails its creator. |
| `struct automations delete <id>` | Delete an automation; its past runs stop showing in Struct. Asks first; pass `--yes` without a terminal. Retries when Struct asks it to (`delete_unavailable`). |
| `struct skills list` | List the workspace's native skills (the Markdown instructions Struct's agents follow), newest first: id, created, title and description. `--page <n>` (from 0), `--limit <1-200>` (default 50). External sources are not listed here; use `skills search` or `skills browse`. Any member can use the skills commands. |
| `struct skills search "<words>"` | Search native skills and every configured external source. Repeat `--source struct` or `--source <source-id>` to narrow it; `--source-offset <n>` continues through sources, not result pages. `--limit <1-20>` (default 10); the query is at most 500 characters. JSON returns `skills` (each with a canonical `ref`), `sources`, `partial` and `nextSourceOffset`; check `partial` and source notices even when matches return. |
| `struct skills show <id>` | `<id>` is a native id, `struct:<id>` or `notion:<source-id>:<page-id>` (the `ref` from search). A native id prints the title, description and Markdown; `--markdown` prints only the Markdown exactly as stored; `--json` prints the whole skill. A canonical reference returns one chunk with its source, URL, revision and completeness: continue with `--offset <n>` and the same `--revision <revision>`. With a reference, `--markdown` assembles every chunk of one revision, warns on stderr when completeness is unknown, and writes nothing if the content is incomplete or changed. A missing skill fails with `skill_not_found`. |
| `struct skills browse` | Browse one source: `--source <id>` (default `struct`). An external source can return containers; expand one with `--parent <page-id>` and continue with `--offset <n>`. |
| `struct skills sources list` / `show <id>` | List or show external skill sources. `list --offset <n>` continues the list. |
| `struct skills sources add notion` | `--connection <connection-id> --root <page-id>` adds a Notion parent; every child page becomes a skill candidate. Pick the parent with `struct notion pages <connection-id>`, which stays within the connection's configured scope. A parent that is already a source is refused. External skills are read-only in Struct; edit them in Notion. |
| `struct skills sources update <id>` / `remove <id>` | `update` replaces `--connection` and/or `--root` and keeps omitted settings. Both accept `--expected-generation <n>` to refuse a concurrent change. `remove` deletes only Struct's source configuration, leaving Notion unchanged; it asks first, or pass `--yes` without a terminal. |
| `struct skills create` | `--title <title>`, optional `--description <text>` (when to use it; search matches it) and `--file <path>` with the skill in Markdown (`-` for stdin). Global by default. **Available in the next CLI release:** `--scope <channel-id>` keeps it to that channel's teammate, and needs Configure permission. Running it twice makes two skills. |
| `struct skills edit <id>` | Change a native skill's `--title`, `--description` (or `--clear-description` to remove it) and/or the Markdown (`--file <path>` replaces the whole body). **Available in the next CLI release:** `--scope <channel-id>` moves it to a channel and `--global` makes it global. Any change to a scoped skill, including moving it to global, needs Configure permission. `--expected-version <n>` refuses the edit if the skill changed since (`skill_version_conflict`): take the Markdown and version from the same `show --json` answer, for example `struct skills show <id> --json > skill.json`, `jq -j .markdownBody skill.json > skill.md`, edit, then `struct skills edit <id> --file skill.md --expected-version "$(jq .version skill.json)"`. Notion references are refused with their URL. |
| `struct skills delete <id>` | Delete a skill. `--yes` is required without a terminal. |
| `struct build-agent secrets list` | Workspace admins (an ordinary login is enough): list the names of the environment variables the Struct Build Agent gets (never the values). |
| `struct build-agent secrets set <name>` | Save or replace a variable. `<name>` must be an environment variable name (a letter or underscore, then letters, digits or underscores). The value comes from stdin (`--stdin`), a named environment variable (`--from-env <var>`) or a hidden prompt in a terminal; it is never printed. |
| `struct build-agent secrets remove <name>` | Remove a variable (`secret_not_found` if it is not saved). |

STRUCT.md commands cover that named memory only. Other shared or scoped memory files use their supported app/agent surfaces and access rules. A Struct skill is a runbook its agents follow; it is separate from instructions installed into an external coding agent.

## Saved reports

| Command | What it does |
| - | - |
| `struct artifacts list` | List the reports you can read (your team's and your own private ones), most recently changed first. Options: `--search <words>`, `--kind <kind>`, `--since <7d\|2026-10-01\|time with zone>`, `--limit <1-100>` (default 25), `--cursor <nextCursor>` (with the same filters; the next-page hint includes them). |
| `struct artifacts show <id>` | Print a report's Markdown on stdout (its title, kind, version and link go to stderr), or the whole report with `--json`. `--version <n>` reads a saved version. |
| `struct artifacts versions <id>` | List a report's saved versions, newest first. `--before <n>`, `--limit <1-100>`. |
| `struct artifacts pdf <id>` | Save a report as a PDF with its charts (diagrams are left out, with a note in their place). `-o <file>` (default `<id>.pdf`, or `<id>-v<n>.pdf` with `--version`), `--version <n>`, `--force` to replace an existing file. |
| `struct artifacts attachment <id> <version> <attachment-id>` | Save one attachment (a file or image) of a saved version. `<version>` is positional, unlike the `--version` option on `show` and `pdf`; take the attachment id from `struct artifacts show <id> --version <n> --json`. `-o <file>` (default: the attachment's file name), `--force` to replace an existing file. |
| `struct artifacts visibility <id> <team\|private>` | Change sharing of a report you own; needs a write login. |

Reports are saved artifacts, not a replacement API for Issues or investigation controls.

## Workspace administration

| Command | What it does |
| - | - |
| `struct members list` | List the workspace's members and their role (`admin` or `member`), admins first. Any member can run it. |
| `struct members invite <email> --role <admin\|member>` | Send a workspace invitation; requires an admin with an admin-scoped login. |
| `struct members invites list` | List pending invitations; admin-scoped login required. |
| `struct members invites revoke <id>` | Revoke a pending invitation. |
| `struct members set-role <user> <admin\|member>` | Change another member's role. |
| `struct members remove <user> --yes` | Remove another member; confirm before running. |
| `struct settings connections-access get` | Read whether setup changes are restricted to admins and whether the current person can manage them. |
| `struct settings connections-access set --admins-only=true` | Restrict connection/setup changes to admins; `false` restores the default policy. Requires an admin. |

You cannot remove or change your own membership with these commands or remove the last admin. Billing changes remain in the web app. See [Workspace and billing](https://docs.struct.ai/account/settings.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.