CLI Commands
Complete command and flag reference for the Stitch CLI.
The @google/stitch CLI exposes resource verbs (find, get, create, edit, delete, generate, open, url) alongside Canvas, capture, and configuration commands.
Commands and resources marked Workspace require running
stitch enable looponce on your machine.
| Command | Category | Surface |
|---|---|---|
stitch create | Resources | Default |
stitch delete | Resources | Default |
stitch edit | Resources | Default |
stitch find | Resources | Default |
stitch generate | Resources | Default |
stitch get | Resources | Default |
stitch capture | Actions & Canvas | Default |
stitch connect | Actions & Canvas | Workspace |
stitch open | Actions & Canvas | Default |
stitch serve | Actions & Canvas | Default |
stitch upload | Actions & Canvas | Default |
stitch url | Actions & Canvas | Default |
stitch config | Auth & Config | Default |
stitch disable | Auth & Config | Default |
stitch enable | Auth & Config | Default |
stitch github | Auth & Config | Workspace |
stitch login | Auth & Config | Default |
stitch logout | Auth & Config | Default |
stitch privacy | Auth & Config | Workspace |
stitch status | Auth & Config | Default |
stitch agent-skills | Advanced | Default |
stitch api | Advanced | Workspace |
stitch mcp | Advanced | Default |
Global flags
These flags work with any stitch command:
| Flag | Type | Description |
|---|---|---|
--access-token | string | OAuth 2.0 access token (env: STITCH_ACCESS_TOKEN) |
--api-key | string | Pass an API key for this command run (flag: —api-key, env: STITCH_API_KEY) |
--base-url | string | API base URL (env: STITCH_BASE_URL) |
--debug | boolean | Show debug information, including stack traces |
--expand | boolean | Show full content in detail views (e.g., context get, solutions get) |
--fields | string | Comma-separated field mask |
--format | enum | Output format (default: auto-detect) |
--json | boolean | Output JSON |
--no-cache | boolean | Bypass the local cache and fetch everything from the network |
--quiet, -q | boolean | Suppress non-essential output and banners |
--schema | boolean | Introspect: show schema (write) or field list (read) |
--trace | boolean | Output raw HTTP network traces and cURL reproductions to stderr |
--workspace, -w | string | Workspace ID (run ‘stitch find workspaces’ to list; env: STITCH_WORKSPACE) |
stitch create
Create a Stitch resource
stitch create [resource] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
resource | false | Resource type to create |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--autonomy-level | string | Autonomy level: CREATE_SUGGESTIONS, CREATE_ASSETS, or SUBMIT_ASSETS (priority resources only) |
--description | string | Priority description (priority resources only) |
--dry-run | boolean | Validate payload and preview mutation without making API calls |
--interactive, -i | boolean | Select from recommended starter templates (priority resources only) |
--objective | string | Priority objective statement (priority resources only) |
--project, -p | string | Stitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID) |
--template, -t | string | Template ID, title, or 1-based index to create from (priority resources only) |
--templates | boolean | List recommended starter templates without creating anything (priority resources only) |
--title | string | Project title (project resources only) |
Supported resources
| Resource | Surface | Description |
|---|---|---|
project | Default | A Stitch canvas holding generated screens. |
screen | Default | A single generated design on a Stitch canvas. |
design-system | Default | A shared visual language applied to generated screens. |
workspace | Workspace | A repository paired with Stitch, holding its priorities, insights, and context. |
context | Workspace | External material attached to a workspace so Stitch can reason about more than the code. |
skill | Workspace | Instructions that shape how Stitch agents read a workspace. Not the same as ‘stitch agent-skills’, which writes local SKILL.md files. |
priority | Workspace | A standing order: an objective plus an autonomy level that Stitch keeps working against. |
webhook | Workspace | An HTTP callback fired when workspace events occur. |
connection | Workspace | An integration linking a workspace to an external tool such as GitHub or Slack. |
Examples
stitch create project --title "Checkout Redesign"
stitch create design-system --project <project-id> --from-file DESIGN.md
stitch create priority --workspace <workspace-id> --title "Audit mobile nav"
stitch create context --workspace <workspace-id> --title "Q3 Metrics" --body-file metrics.md
stitch delete
Delete a Stitch resource by ID
stitch delete [resource] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
resource | false | Resource type to delete |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--dry-run | boolean | Validate payload and preview deletion without making API calls |
--force | boolean | Force deletion without confirmation |
--id | string | Resource ID to delete |
--project, -p | string | Stitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID) |
--yes, -y | boolean | Bypass confirmation prompt |
Supported resources
| Resource | Surface | Description |
|---|---|---|
project | Default | A Stitch canvas holding generated screens. |
workspace | Workspace | A repository paired with Stitch, holding its priorities, insights, and context. |
context | Workspace | External material attached to a workspace so Stitch can reason about more than the code. |
file | Workspace | An individual file uploaded to a workspace. |
skill | Workspace | Instructions that shape how Stitch agents read a workspace. Not the same as ‘stitch agent-skills’, which writes local SKILL.md files. |
priority | Workspace | A standing order: an objective plus an autonomy level that Stitch keeps working against. |
webhook | Workspace | An HTTP callback fired when workspace events occur. |
connection | Workspace | An integration linking a workspace to an external tool such as GitHub or Slack. |
Examples
stitch delete screen <screen-id> --project <project-id> --force
stitch delete priority <priority-id> --workspace <workspace-id> --force
stitch delete context <context-id> --workspace <workspace-id> --force
stitch edit
Update mutable fields on a Stitch resource
stitch edit [resource] [id] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
resource | false | Target resource type to edit |
id | false | Target resource ID (or repeatable —id <id>) |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--add-repo | string | Add a repository to a workspace (URL, owner/repo shorthand, or ID) |
--design-system | string | Design system asset ID to apply to the target screen(s) |
--device | string | Target screen device type (DESKTOP or MOBILE) |
--dry-run | boolean | Validate payload and preview mutation without making API calls |
--model | string | Model for Stitch screen editing (GEMINI_3_8_FLASH or GEMINI_3_5_FLASH_LITE) |
--project, -p | string | Stitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID) |
--prompt | string | Art-direction prompt for Stitch screen editing |
--remove-repo | string | Remove a repository from a workspace (URL, owner/repo shorthand, or ID) |
Supported resources
| Resource | Surface | Description |
|---|---|---|
screen | Default | A single generated design on a Stitch canvas. |
design-system | Default | A shared visual language applied to generated screens. |
workspace | Workspace | A repository paired with Stitch, holding its priorities, insights, and context. |
context | Workspace | External material attached to a workspace so Stitch can reason about more than the code. |
file | Workspace | An individual file uploaded to a workspace. |
skill | Workspace | Instructions that shape how Stitch agents read a workspace. Not the same as ‘stitch agent-skills’, which writes local SKILL.md files. |
priority | Workspace | A standing order: an objective plus an autonomy level that Stitch keeps working against. |
webhook | Workspace | An HTTP callback fired when workspace events occur. |
Examples
stitch edit screen <screen-id> --project <project-id> --prompt "Switch to a compact header"
stitch edit design-system <asset-id> --project <project-id> --from-file DESIGN.md
stitch edit priority <priority-id> --workspace <workspace-id> --state ACTIVE
stitch find
Find Stitch resources matching filter criteria
stitch find [resource] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
resource | false | Resource type to find |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--filter | string | Filter expression |
--insight | string | Filter by insight ID (or comma-separated insight IDs) |
--limit | string | Maximum number of results |
--page-size | string | Maximum items per page requested from the API |
--page-token | string | Token for retrieving the next page of results |
--priority | string | Filter by priority ID (or comma-separated priority IDs) |
--project, -p | string | Stitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID) |
Supported resources
| Resource | Surface | Description |
|---|---|---|
project | Default | A Stitch canvas holding generated screens. |
screen | Default | A single generated design on a Stitch canvas. |
design-system | Default | A shared visual language applied to generated screens. |
workspace | Workspace | A repository paired with Stitch, holding its priorities, insights, and context. |
context | Workspace | External material attached to a workspace so Stitch can reason about more than the code. |
file | Workspace | An individual file uploaded to a workspace. |
skill | Workspace | Instructions that shape how Stitch agents read a workspace. Not the same as ‘stitch agent-skills’, which writes local SKILL.md files. |
priority | Workspace | A standing order: an objective plus an autonomy level that Stitch keeps working against. |
webhook | Workspace | An HTTP callback fired when workspace events occur. |
insight | Workspace | A specific, route-anchored opportunity Stitch found while mining your codebase against a priority. |
solution | Workspace | A proposed change answering an insight. |
connection | Workspace | An integration linking a workspace to an external tool such as GitHub or Slack. |
organization | Workspace | Your organization’s settings and GitHub App installation. |
Examples
stitch find projects
stitch find screens --project <project-id>
stitch find design-systems
stitch find priorities --workspace <workspace-id>
stitch generate
Trigger generative creation of Stitch screens, variants, insights, or solutions
stitch generate [resource] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
resource | false | Resource type to generate (screen, variants, insights, solutions) |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--aspects | string | Comma-separated aspects to vary (LAYOUT, COLOR_SCHEME, IMAGES, TEXT_FONT, TEXT_CONTENT) |
--count | string | Number of variants to generate (1-5) |
--creative-range | string | How far variants stray from the source (REFINE, EXPLORE, REIMAGINE) |
--delay | boolean | Delay insight generation execution |
--device, -d | string | Target screen device type (DESKTOP or MOBILE) |
--dry-run | boolean | Validate payload and preview action without calling the backend |
--insight | string | Insight ID or comma-separated insight IDs for solution generation |
--interval | string | With —watch, polling interval in milliseconds (default: 2000, up to 60000 while queued) |
--model | string | Generation model ID (GEMINI_3_8_FLASH or GEMINI_3_5_FLASH_LITE) |
--new-project | string | Create a new Stitch project with optional title |
--notify | boolean | With —watch, send a desktop notification when it ends |
--priority | string | Priority ID or comma-separated priority IDs for insight generation |
--project, -p | string | Stitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID) |
--prompt | string | Art-direction prompt for screen or variant generation |
--replace-existing | boolean | Replace existing unassigned solutions when generating solutions |
--screen | string | Source screen ID for variant generation |
--timeout | string | With —watch, seconds to wait before giving up (default: 3600) |
--title | string | Optional screen title |
--watch | boolean | Wait until insight generation finishes. Exit code: 0 completed, 1 failed, 124 timed out |
Supported resources
| Resource | Surface | Description |
|---|---|---|
screen | Default | A single generated design on a Stitch canvas. |
variant | Default | Design variations generated from an existing Stitch screen. |
insight | Workspace | A specific, route-anchored opportunity Stitch found while mining your codebase against a priority. |
solution | Workspace | A proposed change answering an insight. |
Examples
stitch generate screen --project <project-id> --prompt "Minimalist vinyl music player"
stitch generate variants <screen-id> --project <project-id> --count 2 --range EXPLORE --prompt "Try warm editorial typography"
stitch generate design-system --project <project-id>
stitch generate insights --workspace <workspace-id>
stitch get
Get a Stitch resource by ID or evaluate the diagnostic status FSM (flows: stitch status —flow)
stitch get [resource] [id] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
resource | false | Resource type (or ‘status’ for diagnostic FSM) |
id | false | Resource ID |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--project, -p | string | Stitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID) |
Supported resources
| Resource | Surface | Description |
|---|---|---|
project | Default | A Stitch canvas holding generated screens. |
screen | Default | A single generated design on a Stitch canvas. |
design-system | Default | A shared visual language applied to generated screens. |
status | Default | The 11-state onboarding and diagnostic state machine for a workspace. |
workspace | Workspace | A repository paired with Stitch, holding its priorities, insights, and context. |
context | Workspace | External material attached to a workspace so Stitch can reason about more than the code. |
file | Workspace | An individual file uploaded to a workspace. |
skill | Workspace | Instructions that shape how Stitch agents read a workspace. Not the same as ‘stitch agent-skills’, which writes local SKILL.md files. |
priority | Workspace | A standing order: an objective plus an autonomy level that Stitch keeps working against. |
webhook | Workspace | An HTTP callback fired when workspace events occur. |
insight | Workspace | A specific, route-anchored opportunity Stitch found while mining your codebase against a priority. |
solution | Workspace | A proposed change answering an insight. |
connection | Workspace | An integration linking a workspace to an external tool such as GitHub or Slack. |
organization | Workspace | Your organization’s settings and GitHub App installation. |
Examples
stitch get project <project-id>
stitch get screen <screen-id> --project <project-id>
stitch get design-system <asset-id>
stitch get priority <priority-id> --workspace <workspace-id>
stitch capture
Capture a headless browser DOM, live dev server port, local HTML file, or discovered routes
stitch capture [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
capture browser | Default | Capture evaluated DOM using headless Chrome or an open DevTools tab (supports client-rendered SPAs) |
capture port | Default | Capture HTML over HTTP from a live local dev server port |
capture file | Default | Capture and normalize a pre-rendered local HTML file or standard input |
capture routes | Default | Scan codebase and list detected application routes |
stitch connect
Connect a tool or integration to a workspace via the provider OAuth flow
Requires workspace features to be enabled via
stitch enable loop.
stitch connect [toolId] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
toolId | false | Tool or provider ID (e.g. github, slack). Omit or pass —list to see available options. |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--all | boolean | List all available integrations without capping to top 25 popular |
--connected | boolean | Show only connected integrations |
--list, -l | boolean | List available tool and provider IDs that can be connected |
--no-browser | boolean | Do not launch the browser automatically |
--search, -s | string | Filter integrations by ID, display name, or description |
--timeout | string | Timeout in seconds to wait for connection (default: 120) |
stitch open
Open a Stitch project or screen in the browser (strictly project | screen)
stitch open [resource] [id] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
resource | false | Target resource type (‘project’ |
id | false | Project or screen ID, projects/<p>/screens/<s> name, or canvas URL (default: this directory’s project or reference screen) |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--project, -p | string | Stitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID) |
--url, -print | boolean | Print the URL instead of opening (env: STITCH_NO_BROWSER, BROWSER) |
Supported resources
| Resource | Surface | Description |
|---|---|---|
project | Default | A Stitch canvas holding generated screens. |
screen | Default | A single generated design on a Stitch canvas. |
Examples
stitch open project <project-id>
stitch open screen <screen-id> --project <project-id>
stitch serve
Launch local preview dev server for Stitch project screens
stitch serve [flags]
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--dry-run | boolean | Verify server configuration without blocking |
--port | string | Local port to listen on (default: 3000) |
--project, -p | string | Stitch project ID to preview |
stitch upload
Upload files, codebase archives, or design assets
stitch upload [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
upload code | Workspace | Upload codebase archive (.zip or directory) |
upload design | Default | Upload a DESIGN.md file to a Stitch Canvas project |
upload file | Workspace | Upload a file to the workspace |
upload screen | Default | Upload an HTML or image file as a screen on Stitch Canvas |
stitch url
Print the canonical Stitch Canvas web URL for a project or screen (never guess URLs)
stitch url [resource] [id] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
resource | false | Target resource type (‘project’ |
id | false | Project or screen ID, projects/<p>/screens/<s> name, or canvas URL (default: this directory’s project or reference screen) |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--project, -p | string | Stitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID) |
Supported resources
| Resource | Surface | Description |
|---|---|---|
project | Default | A Stitch canvas holding generated screens. |
screen | Default | A single generated design on a Stitch canvas. |
Examples
stitch url project <project-id>
stitch url screen <screen-id> --project <project-id>
stitch config
Read and write Stitch CLI configuration
stitch config [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
config list | Default | Show resolved config from the full priority chain |
config get | Default | Get a single config value by key |
config set | Default | Set a config value (writes to .stitch.json) |
config unset | Default | Remove a config key |
stitch disable
Disable an experimental feature globally (e.g. ‘stitch disable loop’)
stitch disable [feature] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
feature | false | Experimental feature to disable globally (e.g. loop) |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--dry-run | boolean | Preview mutation without executing |
stitch enable
Enable an experimental feature globally (e.g. ‘stitch enable loop’)
stitch enable [feature] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
feature | false | Experimental feature to enable globally (e.g. loop) |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--dry-run | boolean | Preview mutation without executing |
stitch github
Manage GitHub account connection, OAuth authorization, and GitHub App organization installations
Requires workspace features to be enabled via
stitch enable loop.
stitch github [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
github auth | Workspace | Authenticate with GitHub (opens browser OAuth authorization page) |
github configure | Workspace | Configure GitHub App organization installation and repository access permissions |
github status | Workspace | Check GitHub integration status, linked organizations, and accessible repositories |
stitch login
Authenticate with Google OAuth 2.0 PKCE or save a permanent API key
stitch login [flags]
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--port | string | Local loopback callback port (default: 8085) |
stitch logout
Log out and remove local OAuth credentials and saved API keys
stitch logout [flags]
stitch privacy
Manage and inspect Stitch Privacy Notice & Terms of Service acknowledgment
Requires workspace features to be enabled via
stitch enable loop.
stitch privacy [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
privacy status | Workspace | Check the current Privacy Notice acknowledgment status on the server |
privacy accept | Workspace | Open the Stitch Terms of Service on the web and wait for acceptance |
privacy show | Default | Display the Stitch Privacy Notice and Terms of Service web page URL |
stitch status
Show auth, Canvas credential, and GitHub status, or evaluate an onboarding flow with —flow
stitch status [flowArg] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
flowArg | false | Optional flow to evaluate (design |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--cwd | string | Working directory used when evaluating a flow |
--flow | string | Evaluate an onboarding flow and return its current step (design |
--token | boolean | Print a valid OAuth bearer access token (auto-refreshes if expired) |
stitch agent-skills
Install and update the local Stitch agent skill. For workspace skills, use ‘stitch find skills’
stitch agent-skills [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
agent-skills add | Default | Install the Stitch agent skill for the current mode |
agent-skills list | Default | Show the current mode and where the Stitch skill is installed |
agent-skills update | Default | Resync the installed Stitch skill to the current mode and CLI version |
stitch api
Execute direct REST API calls against Stitch endpoints, or inspect OpenAPI/Discovery schema
Requires workspace features to be enabled via
stitch enable loop.
stitch api [path] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
path | false | API endpoint path (e.g. workspaces or /v2alpha/workspaces) |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--filter | string | Filter items by keyword or criteria |
--force | boolean | Force execution without confirmation |
--method, -X | string | HTTP method (GET, POST, PATCH, PUT, DELETE) |
--yes, -y | boolean | Bypass confirmation prompt |
stitch mcp
Manage and run the Stitch MCP server
stitch mcp [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
mcp start | Default | Start the Stitch MCP server over stdio |
mcp install | Default | Register the Stitch MCP server in your AI editor |
Original: https://stitch.withgoogle.com/docs/cli/reference/commands/
Translated from the official Google Stitch documentation. Original content © Google LLC. This is an independent, unofficial translation.