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 loop once on your machine.

CommandCategorySurface
stitch createResourcesDefault
stitch deleteResourcesDefault
stitch editResourcesDefault
stitch findResourcesDefault
stitch generateResourcesDefault
stitch getResourcesDefault
stitch captureActions & CanvasDefault
stitch connectActions & CanvasWorkspace
stitch openActions & CanvasDefault
stitch serveActions & CanvasDefault
stitch uploadActions & CanvasDefault
stitch urlActions & CanvasDefault
stitch configAuth & ConfigDefault
stitch disableAuth & ConfigDefault
stitch enableAuth & ConfigDefault
stitch githubAuth & ConfigWorkspace
stitch loginAuth & ConfigDefault
stitch logoutAuth & ConfigDefault
stitch privacyAuth & ConfigWorkspace
stitch statusAuth & ConfigDefault
stitch agent-skillsAdvancedDefault
stitch apiAdvancedWorkspace
stitch mcpAdvancedDefault

Global flags

These flags work with any stitch command:

FlagTypeDescription
--access-tokenstringOAuth 2.0 access token (env: STITCH_ACCESS_TOKEN)
--api-keystringPass an API key for this command run (flag: —api-key, env: STITCH_API_KEY)
--base-urlstringAPI base URL (env: STITCH_BASE_URL)
--debugbooleanShow debug information, including stack traces
--expandbooleanShow full content in detail views (e.g., context get, solutions get)
--fieldsstringComma-separated field mask
--formatenumOutput format (default: auto-detect)
--jsonbooleanOutput JSON
--no-cachebooleanBypass the local cache and fetch everything from the network
--quiet, -qbooleanSuppress non-essential output and banners
--schemabooleanIntrospect: show schema (write) or field list (read)
--tracebooleanOutput raw HTTP network traces and cURL reproductions to stderr
--workspace, -wstringWorkspace ID (run ‘stitch find workspaces’ to list; env: STITCH_WORKSPACE)

stitch create

Create a Stitch resource

stitch create [resource] [flags]

Positional arguments

ArgumentRequiredDescription
resourcefalseResource type to create

Command flags

Also accepts all global flags.

FlagTypeDescription
--autonomy-levelstringAutonomy level: CREATE_SUGGESTIONS, CREATE_ASSETS, or SUBMIT_ASSETS (priority resources only)
--descriptionstringPriority description (priority resources only)
--dry-runbooleanValidate payload and preview mutation without making API calls
--interactive, -ibooleanSelect from recommended starter templates (priority resources only)
--objectivestringPriority objective statement (priority resources only)
--project, -pstringStitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID)
--template, -tstringTemplate ID, title, or 1-based index to create from (priority resources only)
--templatesbooleanList recommended starter templates without creating anything (priority resources only)
--titlestringProject title (project resources only)

Supported resources

ResourceSurfaceDescription
projectDefaultA Stitch canvas holding generated screens.
screenDefaultA single generated design on a Stitch canvas.
design-systemDefaultA shared visual language applied to generated screens.
workspaceWorkspaceA repository paired with Stitch, holding its priorities, insights, and context.
contextWorkspaceExternal material attached to a workspace so Stitch can reason about more than the code.
skillWorkspaceInstructions that shape how Stitch agents read a workspace. Not the same as ‘stitch agent-skills’, which writes local SKILL.md files.
priorityWorkspaceA standing order: an objective plus an autonomy level that Stitch keeps working against.
webhookWorkspaceAn HTTP callback fired when workspace events occur.
connectionWorkspaceAn 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

ArgumentRequiredDescription
resourcefalseResource type to delete

Command flags

Also accepts all global flags.

FlagTypeDescription
--dry-runbooleanValidate payload and preview deletion without making API calls
--forcebooleanForce deletion without confirmation
--idstringResource ID to delete
--project, -pstringStitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID)
--yes, -ybooleanBypass confirmation prompt

Supported resources

ResourceSurfaceDescription
projectDefaultA Stitch canvas holding generated screens.
workspaceWorkspaceA repository paired with Stitch, holding its priorities, insights, and context.
contextWorkspaceExternal material attached to a workspace so Stitch can reason about more than the code.
fileWorkspaceAn individual file uploaded to a workspace.
skillWorkspaceInstructions that shape how Stitch agents read a workspace. Not the same as ‘stitch agent-skills’, which writes local SKILL.md files.
priorityWorkspaceA standing order: an objective plus an autonomy level that Stitch keeps working against.
webhookWorkspaceAn HTTP callback fired when workspace events occur.
connectionWorkspaceAn 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

ArgumentRequiredDescription
resourcefalseTarget resource type to edit
idfalseTarget resource ID (or repeatable —id <id>)

Command flags

Also accepts all global flags.

FlagTypeDescription
--add-repostringAdd a repository to a workspace (URL, owner/repo shorthand, or ID)
--design-systemstringDesign system asset ID to apply to the target screen(s)
--devicestringTarget screen device type (DESKTOP or MOBILE)
--dry-runbooleanValidate payload and preview mutation without making API calls
--modelstringModel for Stitch screen editing (GEMINI_3_8_FLASH or GEMINI_3_5_FLASH_LITE)
--project, -pstringStitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID)
--promptstringArt-direction prompt for Stitch screen editing
--remove-repostringRemove a repository from a workspace (URL, owner/repo shorthand, or ID)

Supported resources

ResourceSurfaceDescription
screenDefaultA single generated design on a Stitch canvas.
design-systemDefaultA shared visual language applied to generated screens.
workspaceWorkspaceA repository paired with Stitch, holding its priorities, insights, and context.
contextWorkspaceExternal material attached to a workspace so Stitch can reason about more than the code.
fileWorkspaceAn individual file uploaded to a workspace.
skillWorkspaceInstructions that shape how Stitch agents read a workspace. Not the same as ‘stitch agent-skills’, which writes local SKILL.md files.
priorityWorkspaceA standing order: an objective plus an autonomy level that Stitch keeps working against.
webhookWorkspaceAn 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

ArgumentRequiredDescription
resourcefalseResource type to find

Command flags

Also accepts all global flags.

FlagTypeDescription
--filterstringFilter expression
--insightstringFilter by insight ID (or comma-separated insight IDs)
--limitstringMaximum number of results
--page-sizestringMaximum items per page requested from the API
--page-tokenstringToken for retrieving the next page of results
--prioritystringFilter by priority ID (or comma-separated priority IDs)
--project, -pstringStitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID)

Supported resources

ResourceSurfaceDescription
projectDefaultA Stitch canvas holding generated screens.
screenDefaultA single generated design on a Stitch canvas.
design-systemDefaultA shared visual language applied to generated screens.
workspaceWorkspaceA repository paired with Stitch, holding its priorities, insights, and context.
contextWorkspaceExternal material attached to a workspace so Stitch can reason about more than the code.
fileWorkspaceAn individual file uploaded to a workspace.
skillWorkspaceInstructions that shape how Stitch agents read a workspace. Not the same as ‘stitch agent-skills’, which writes local SKILL.md files.
priorityWorkspaceA standing order: an objective plus an autonomy level that Stitch keeps working against.
webhookWorkspaceAn HTTP callback fired when workspace events occur.
insightWorkspaceA specific, route-anchored opportunity Stitch found while mining your codebase against a priority.
solutionWorkspaceA proposed change answering an insight.
connectionWorkspaceAn integration linking a workspace to an external tool such as GitHub or Slack.
organizationWorkspaceYour 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

ArgumentRequiredDescription
resourcefalseResource type to generate (screen, variants, insights, solutions)

Command flags

Also accepts all global flags.

FlagTypeDescription
--aspectsstringComma-separated aspects to vary (LAYOUT, COLOR_SCHEME, IMAGES, TEXT_FONT, TEXT_CONTENT)
--countstringNumber of variants to generate (1-5)
--creative-rangestringHow far variants stray from the source (REFINE, EXPLORE, REIMAGINE)
--delaybooleanDelay insight generation execution
--device, -dstringTarget screen device type (DESKTOP or MOBILE)
--dry-runbooleanValidate payload and preview action without calling the backend
--insightstringInsight ID or comma-separated insight IDs for solution generation
--intervalstringWith —watch, polling interval in milliseconds (default: 2000, up to 60000 while queued)
--modelstringGeneration model ID (GEMINI_3_8_FLASH or GEMINI_3_5_FLASH_LITE)
--new-projectstringCreate a new Stitch project with optional title
--notifybooleanWith —watch, send a desktop notification when it ends
--prioritystringPriority ID or comma-separated priority IDs for insight generation
--project, -pstringStitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID)
--promptstringArt-direction prompt for screen or variant generation
--replace-existingbooleanReplace existing unassigned solutions when generating solutions
--screenstringSource screen ID for variant generation
--timeoutstringWith —watch, seconds to wait before giving up (default: 3600)
--titlestringOptional screen title
--watchbooleanWait until insight generation finishes. Exit code: 0 completed, 1 failed, 124 timed out

Supported resources

ResourceSurfaceDescription
screenDefaultA single generated design on a Stitch canvas.
variantDefaultDesign variations generated from an existing Stitch screen.
insightWorkspaceA specific, route-anchored opportunity Stitch found while mining your codebase against a priority.
solutionWorkspaceA 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

ArgumentRequiredDescription
resourcefalseResource type (or ‘status’ for diagnostic FSM)
idfalseResource ID

Command flags

Also accepts all global flags.

FlagTypeDescription
--project, -pstringStitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID)

Supported resources

ResourceSurfaceDescription
projectDefaultA Stitch canvas holding generated screens.
screenDefaultA single generated design on a Stitch canvas.
design-systemDefaultA shared visual language applied to generated screens.
statusDefaultThe 11-state onboarding and diagnostic state machine for a workspace.
workspaceWorkspaceA repository paired with Stitch, holding its priorities, insights, and context.
contextWorkspaceExternal material attached to a workspace so Stitch can reason about more than the code.
fileWorkspaceAn individual file uploaded to a workspace.
skillWorkspaceInstructions that shape how Stitch agents read a workspace. Not the same as ‘stitch agent-skills’, which writes local SKILL.md files.
priorityWorkspaceA standing order: an objective plus an autonomy level that Stitch keeps working against.
webhookWorkspaceAn HTTP callback fired when workspace events occur.
insightWorkspaceA specific, route-anchored opportunity Stitch found while mining your codebase against a priority.
solutionWorkspaceA proposed change answering an insight.
connectionWorkspaceAn integration linking a workspace to an external tool such as GitHub or Slack.
organizationWorkspaceYour 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

SubcommandSurfaceDescription
capture browserDefaultCapture evaluated DOM using headless Chrome or an open DevTools tab (supports client-rendered SPAs)
capture portDefaultCapture HTML over HTTP from a live local dev server port
capture fileDefaultCapture and normalize a pre-rendered local HTML file or standard input
capture routesDefaultScan 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

ArgumentRequiredDescription
toolIdfalseTool or provider ID (e.g. github, slack). Omit or pass —list to see available options.

Command flags

Also accepts all global flags.

FlagTypeDescription
--allbooleanList all available integrations without capping to top 25 popular
--connectedbooleanShow only connected integrations
--list, -lbooleanList available tool and provider IDs that can be connected
--no-browserbooleanDo not launch the browser automatically
--search, -sstringFilter integrations by ID, display name, or description
--timeoutstringTimeout 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

ArgumentRequiredDescription
resourcefalseTarget resource type (‘project’
idfalseProject 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.

FlagTypeDescription
--project, -pstringStitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID)
--url, -printbooleanPrint the URL instead of opening (env: STITCH_NO_BROWSER, BROWSER)

Supported resources

ResourceSurfaceDescription
projectDefaultA Stitch canvas holding generated screens.
screenDefaultA 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.

FlagTypeDescription
--dry-runbooleanVerify server configuration without blocking
--portstringLocal port to listen on (default: 3000)
--project, -pstringStitch project ID to preview

stitch upload

Upload files, codebase archives, or design assets

stitch upload [flags]

Subcommands

SubcommandSurfaceDescription
upload codeWorkspaceUpload codebase archive (.zip or directory)
upload designDefaultUpload a DESIGN.md file to a Stitch Canvas project
upload fileWorkspaceUpload a file to the workspace
upload screenDefaultUpload 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

ArgumentRequiredDescription
resourcefalseTarget resource type (‘project’
idfalseProject 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.

FlagTypeDescription
--project, -pstringStitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID)

Supported resources

ResourceSurfaceDescription
projectDefaultA Stitch canvas holding generated screens.
screenDefaultA 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

SubcommandSurfaceDescription
config listDefaultShow resolved config from the full priority chain
config getDefaultGet a single config value by key
config setDefaultSet a config value (writes to .stitch.json)
config unsetDefaultRemove a config key

stitch disable

Disable an experimental feature globally (e.g. ‘stitch disable loop’)

stitch disable [feature] [flags]

Positional arguments

ArgumentRequiredDescription
featurefalseExperimental feature to disable globally (e.g. loop)

Command flags

Also accepts all global flags.

FlagTypeDescription
--dry-runbooleanPreview mutation without executing

stitch enable

Enable an experimental feature globally (e.g. ‘stitch enable loop’)

stitch enable [feature] [flags]

Positional arguments

ArgumentRequiredDescription
featurefalseExperimental feature to enable globally (e.g. loop)

Command flags

Also accepts all global flags.

FlagTypeDescription
--dry-runbooleanPreview 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

SubcommandSurfaceDescription
github authWorkspaceAuthenticate with GitHub (opens browser OAuth authorization page)
github configureWorkspaceConfigure GitHub App organization installation and repository access permissions
github statusWorkspaceCheck 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.

FlagTypeDescription
--portstringLocal 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

SubcommandSurfaceDescription
privacy statusWorkspaceCheck the current Privacy Notice acknowledgment status on the server
privacy acceptWorkspaceOpen the Stitch Terms of Service on the web and wait for acceptance
privacy showDefaultDisplay 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

ArgumentRequiredDescription
flowArgfalseOptional flow to evaluate (design

Command flags

Also accepts all global flags.

FlagTypeDescription
--cwdstringWorking directory used when evaluating a flow
--flowstringEvaluate an onboarding flow and return its current step (design
--tokenbooleanPrint 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

SubcommandSurfaceDescription
agent-skills addDefaultInstall the Stitch agent skill for the current mode
agent-skills listDefaultShow the current mode and where the Stitch skill is installed
agent-skills updateDefaultResync 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

ArgumentRequiredDescription
pathfalseAPI endpoint path (e.g. workspaces or /v2alpha/workspaces)

Command flags

Also accepts all global flags.

FlagTypeDescription
--filterstringFilter items by keyword or criteria
--forcebooleanForce execution without confirmation
--method, -XstringHTTP method (GET, POST, PATCH, PUT, DELETE)
--yes, -ybooleanBypass confirmation prompt

stitch mcp

Manage and run the Stitch MCP server

stitch mcp [flags]

Subcommands

SubcommandSurfaceDescription
mcp startDefaultStart the Stitch MCP server over stdio
mcp installDefaultRegister 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.