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 | Default |
stitch status | Auth & Config | Default |
stitch agent-skills | Advanced | Default |
stitch api | Advanced | Workspace |
stitch mcp | Advanced | Default |
stitch cache | Other | Workspace |
stitch download | Other | Default |
stitch feedback | Other | 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) |
--color | enum | When to emit ANSI color codes: auto, always, or never (default: auto) |
--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, -f | enum | Output format: table, markdown, json, or ndjson (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) |
Environment variables
| Variable | Description |
|---|---|
STITCH_API_KEY | API key to use instead of an OAuth login (same as --api-key) |
STITCH_ACCESS_TOKEN | OAuth 2.0 access token (same as --access-token) |
STITCH_PROJECT_ID | Default Stitch project ID (same as --project) |
STITCH_WORKSPACE | Default workspace ID (same as --workspace) |
STITCH_BASE_URL | API base URL (same as --base-url) |
STITCH_CANVAS_URL | Stitch web host used for every generated Canvas link (default: https://stitch.google.com) |
STITCH_FORMAT | Default output format (same as --format) |
STITCH_QUIET | Suppress non-essential output and banners (same as --quiet) |
STITCH_NO_CACHE | Set to 1 to turn off the local cache |
STITCH_NO_BROWSER | Never launch a browser; print URLs instead |
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Operational failure: network, authentication, or API error |
2 | Usage error: unknown command or flag, missing required argument, or an invalid value or JSON payload |
124 | stitch generate insights --watch timed out (see --timeout) |
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 |
|---|---|---|
--apply | boolean | Automatically apply the created design system to screens in the project (design-system only) |
--autonomy-level | string | Autonomy level: CREATE_SUGGESTIONS or CREATE_ASSETS (loop resources only) |
--description | string | Loop description, or context content (loop and context resources only) |
--dry-run | boolean | Validate payload and preview mutation without making API calls |
--interactive, -i | boolean | Select from recommended starter templates (loop resources only) |
--name | string | Workspace name (workspace resources only; --title is also accepted) |
--objective | string | Loop objective statement (loop resources only) |
--project, -p | string | Stitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID) |
--provider | string | Provider ID from ‘stitch find connections’ (e.g. slack, linear) (connection resources only) |
--screen | string | Screen ID(s) (comma-separated) to apply the created design system to (design-system only) |
--template, -t | string | Template ID, title, or 1-based index to create from (loop resources only) |
--templates | boolean | List recommended starter templates without creating anything (loop resources only) |
--title | string | Project title, or context label (project and context 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 loops, 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. |
loop | 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 Slack or an MCP server (GitHub is linked with ‘stitch github install’). |
Examples
stitch create project --title "Checkout Redesign"
stitch create workspace --name "Acme Web App"
stitch create loop --workspace <workspace-id> --template ui-prototyping
stitch create context --workspace <workspace-id> --title "Q3 Metrics" --description "Weekly active users grew 12% quarter over quarter."
stitch create connection --workspace <workspace-id> --provider slack
To create a design system from a DESIGN.md file, use stitch upload design.
stitch delete
Delete a Stitch resource by ID
stitch delete [resource] [id] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
resource | false | Resource type to delete |
id | false | Resource ID to delete (or --id) |
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 loops, 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. |
loop | 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 Slack or an MCP server (GitHub is linked with ‘stitch github install’). |
Examples
stitch delete project <project-id> --force
stitch delete loop <loop-id> --workspace <workspace-id> --force
stitch delete context <context-id> --workspace <workspace-id> --force
Outside an interactive terminal, stitch delete fails unless you pass --yes (or --force), so add it in scripts and CI.
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) |
--objective | string | New objective. Objectives are immutable, so this replaces the loop with a new one that has a new ID (loop resources only) |
--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 loops, 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. |
loop | 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 screen <screen-id> --project <project-id> --design-system <design-system-id>
stitch edit workspace <workspace-id> --add-repo <owner>/<repo>
stitch edit loop <loop-id> --workspace <workspace-id> --json '{"description":"Focus on mobile schedule views"}'
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 |
--loop | string | Filter by loop ID (or comma-separated loop IDs) |
--page-size | string | Maximum items per page requested from the API |
--page-token | string | Token for retrieving the next page of results |
--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 loops, 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. |
loop | 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 loop. |
solution | Workspace | A proposed change answering an insight. |
connection | Workspace | An integration linking a workspace to an external tool such as Slack or an MCP server (GitHub is linked with ‘stitch github install’). |
organization | Workspace | Your organization’s settings and GitHub App installation. |
Examples
stitch find projects --limit 10
stitch find screens --project <project-id>
stitch find design-systems
stitch find loops --workspace <workspace-id>
stitch find insights --workspace <workspace-id> --loop <loop-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) |
--loop | string | Loop ID or comma-separated loop IDs for insight generation |
--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 |
--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 | Screen title, requested in the prompt (Stitch may choose another; you get a warning if so). With –new-project and no –project, names the new project instead |
--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 loop. |
solution | Workspace | A proposed change answering an insight. |
Examples
stitch generate screen --project <project-id> --prompt "Minimalist vinyl music player"
stitch generate screen --new-project "Mobile Onboarding" --prompt "Sign-up step with email verification" --device MOBILE
stitch generate variants --screen <screen-id> --project <project-id> --count 2 --creative-range EXPLORE --prompt "Try warm editorial typography"
stitch generate insights --workspace <workspace-id> --loop <loop-id> --watch
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 loops, 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. |
loop | 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 loop. |
solution | Workspace | A proposed change answering an insight. |
connection | Workspace | An integration linking a workspace to an external tool such as Slack or an MCP server (GitHub is linked with ‘stitch github install’). |
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 loop <loop-id> --workspace <workspace-id>
stitch capture
Capture a page as self-contained HTML for Canvas: stitch capture <url|path> [-o file], or --tab for the open tab
stitch capture [target] [flags]
stitch capture <subcommand> [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
target | false | URL to load and capture, or path to a local HTML file (omit with –tab) |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--allow-redirect | boolean | Save the page even if it ended on a different route than requested |
--auth | string | Sign-in state file (Playwright storageState JSON) |
--origin | string | For a file: origin that serves its root-relative assets (e.g. http://localhost:3000) |
--output, -o | string | Where to save the HTML (default: .stitch/captures/<route>.html; “-” prints it to stdout) |
--prepare | string | Path to a JS file run inside page before capture (sign in, seed state). Await app state with __stitchWaitFor("#selector") |
--settle-timeout | string | Max ms to wait for loading indicators (skeletons, aria-busy, spinners) to clear (default: 15000) |
--tab | string | Capture an open chrome-devtools tab as it is, without loading a URL (optional tab id) |
--wait-for | string | CSS selector to wait for before capturing (ensures dynamic DOM is rendered) |
--wait-until | string | Hydration barrier condition: networkidle0 (default), networkidle2, load, domcontentloaded |
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
capture browser | Default | (advanced) Capture a URL in Chrome, or an open tab with –tab. Same as stitch capture <url> |
capture port | Default | (advanced) Fetch server-rendered HTML over HTTP without running JavaScript |
capture file | Default | (advanced) Make a local HTML file or stdin self-contained. Same as stitch capture <path> |
capture routes | Default | List the app’s routes found in the codebase |
Examples
stitch capture http://localhost:3000/library
stitch capture --tab --output .stitch/dashboard.html
stitch capture .stitch/page.html --origin http://localhost:3000
stitch capture http://localhost:3000/studio --auth .stitch/storage.json
stitch capture 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 <subcommand> [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 (.md and .txt files are stored as a context) |
upload screen | Default | Upload an HTML or image file as a screen on Stitch Canvas |
Subcommand flags
| Subcommand | Flag | Type | Description |
|---|---|---|---|
upload code | --name, -n | string | Display name for the uploaded codebase archive |
upload code | --description | string | Description for the uploaded codebase |
upload code | --dry-run | boolean | Preview mutation without executing |
upload design | --project, -p | string | Target Stitch Canvas project ID (defaults to manifest project ID) |
upload design | --apply | boolean | Automatically apply the uploaded design system to screens in the project |
upload design | --screen | string | Screen ID(s) (comma-separated) to apply the uploaded design system to |
upload design | --cwd | string | Target working directory context |
upload design | --dry-run | boolean | Validate payload and preview upload without making API calls |
upload file | --name, -n | string | Display name for the uploaded file |
upload file | --description | string | Description of the file |
upload file | --mime-type, -m | string | MIME type of the file (inferred from extension if omitted) |
upload file | --dry-run | boolean | Preview mutation without executing |
upload screen | --project, -p | string | Target Stitch Canvas project ID (defaults to the linked project) |
upload screen | --title | string | Screen title (default: the file’s name) |
upload screen | --route | string | Record the screen as the manifest’s reference screen for this route |
upload screen | --cwd | string | Target working directory context |
upload screen | --dry-run | boolean | Validate the upload without calling Stitch |
Examples
stitch upload design DESIGN.md --project <project-id> --apply
stitch upload screen .stitch/checkout.html --route /checkout --title Checkout
stitch upload file ./docs/architecture.pdf --name "Architecture Doc"
stitch upload code .
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 <subcommand> [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
config list | Default | Show resolved config from the full priority chain (--global for global config only) |
config get | Default | Get a single config value by key |
config set | Default | Set a config value (writes to .stitch.json; --global writes to ~/.stitch.json) |
config unset | Default | Remove a config key (--global removes from ~/.stitch.json) |
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: loop (enables workspace commands like api, connect, and resources like workspaces, loops) |
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 <subcommand> [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
github login | Workspace | Authenticate with GitHub (opens browser OAuth authorization page). Alias: github auth. Pass --reauth to force re-authentication |
github install | Workspace | Configure GitHub App organization installation and repository access permissions. Alias: github configure |
github status | Workspace | Check GitHub integration status, linked organizations, and accessible repositories |
github repos | Workspace | List GitHub repositories the Stitch GitHub App can access, to attach to a workspace |
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
stitch privacy <subcommand> [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
privacy status | Default | Check the current Privacy Notice acknowledgment status on the server |
privacy accept | Default | 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 (--open opens it in your browser) |
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 <subcommand> [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 |
Subcommand flags
| Subcommand | Flag | Type | Description |
|---|---|---|---|
add | --project, -p | boolean | Install into .agents/skills in this project (default) |
add | --user, -u | boolean | Install into ~/.agents/skills for every project (alias: --global, -g) |
add | --dir | string | Skills directory inside this project (or inside your home directory with -u) |
add, list, update | --target | string | Target client: claude, antigravity, or all |
add | --overwrite | boolean | Replace an existing stitch folder not installed by the CLI (originals are backed up) |
update | --overwrite | boolean | Replace locally edited skill files (a backup is kept) |
add, update | --dry-run | boolean | Preview mutation without executing |
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 or Discovery method ID (e.g. /v2alpha/workspaces or workspaces.list) |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--dryRun | boolean | Validate payload and preview request without making API calls |
--filter | string | Filter items by keyword or criteria |
--force | boolean | Force execution without confirmation |
--method, -X | string | HTTP method (GET, POST, PATCH, PUT, DELETE) (default: GET) |
--yes, -y | boolean | Bypass confirmation prompt |
stitch mcp
Manage and run the Stitch MCP server
stitch mcp <subcommand> [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
mcp start | Default | Start the Stitch MCP server over stdio. Alias: mcp run |
mcp install | Default | Register the Stitch MCP server in your AI editor |
Subcommand flags
| Subcommand | Flag | Type | Description |
|---|---|---|---|
install | --target | string | Target client: antigravity, claude, cursor, vscode, or all (default: all) |
install | --dry-run | boolean | Preview mutation without executing |
stitch cache
Inspect and clean the local cache of insights, solutions and other read-only resources
Requires workspace features to be enabled via
stitch enable loop.
stitch cache <subcommand> [flags]
Subcommands
| Subcommand | Surface | Description |
|---|---|---|
cache stats | Workspace | Show what the local cache holds: entries, size, resource types and files left by interrupted writes |
cache prune | Workspace | Remove files left by interrupted cache writes; with --max-bytes, also evict least recently used entries |
Both subcommands cover every workspace’s cache unless you pass --workspace.
stitch download
Download HTML and screenshot image artifacts from a Stitch screen
stitch download [resource] [id] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
resource | false | Target resource type (‘screen’) |
id | false | Screen ID or resource name |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--format, -f | enum | Artifact or output format: html, png, jpg, jpeg, image, json, table, markdown, or ndjson |
--html | boolean | Download the screen HTML payload |
--image, -screenshot | boolean | Download the screen screenshot image (PNG/JPEG) |
--output, -o | string | Output file or directory path (writes raw artifact bytes to stdout when omitted) |
--project, -p | string | Stitch Project ID (run ‘stitch find projects’ to list; env: STITCH_PROJECT_ID) |
Examples
stitch download screen <screen-id> --project <project-id>
stitch download screen <screen-id> --project <project-id> --format png
stitch download screen <screen-id> --project <project-id> --html --image --output ./screens
stitch feedback
Submit product feedback or create a Listnr ticket
stitch feedback [message] [flags]
Positional arguments
| Argument | Required | Description |
|---|---|---|
message | false | Feedback text (an optional leading ‘submit’ is ignored) |
Command flags
Also accepts all global flags.
| Flag | Type | Description |
|---|---|---|
--description | string | Feedback text description |
--dry-run | boolean | Preview feedback payload without submitting |
--product-data, -data | string | Optional product metadata as JSON or key=value,key2=val2 |
--screenshot | string | Path to screenshot image file to attach |
--sentiment | string | Sentiment rating: positive, negative, or unspecified |
Examples
stitch feedback "Loving the CLI"
stitch feedback --description "Loving the CLI tool" --sentiment positive
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.