Site commands
The bricks site commands handle everything between your terminal and your WordPress site. Pull page content as JSON, push changes back, take snapshots before risky edits, and roll back when things go sideways.
Get site info
Section titled “Get site info”Check your connection and see what’s running on the other end.
bricks site infobricks site info --format jsonSite: https://example.comBricks: 1.11.1WordPress: 6.5.2PHP: 8.2.18ACSS: 3.0.2Frames: 2.2.0Breakpoints: base (1280), tablet (1024), mobile_landscape (768), mobile_portrait (480)This is a good first command to run after bricks config init. If something is misconfigured, you’ll know right away.
Get machine-discoverable site features
Section titled “Get machine-discoverable site features”Use this when you want a quick capability summary instead of raw version data.
bricks site featuresbricks site features --format jsonBricks: true (1.12.2)WordPress: 6.9Plugin: 2.1.0Abilities API: trueFrameworks: 2Query Elements: 5WooCommerce: true (9.8.1)This is the fastest way to check whether a site exposes query-capable Bricks elements, WooCommerce discovery routes, and the WordPress Abilities API.
List query-capable element types
Section titled “List query-capable element types”Query-aware builds often depend on knowing which Bricks elements actually expose a query control. This command gives you that list directly from the site.
bricks site query-elementsbricks site query-elements posts --controls --format json| Flag | Description |
|---|---|
--controls | Include the control schema for each query-capable element type |
--format json | Output result as JSON |
--json | Shorthand for --format json |
Example
Section titled “Example”bricks site query-elementsNAME LABEL CATEGORYaccordion Accordion generalcarousel Carousel mediamap Map mediaposts Posts queryslider Slider mediaWhen you pass a specific element name, the CLI prints that element’s control metadata so an agent or developer can inspect its query settings without scraping help text.
Pull page elements
Section titled “Pull page elements”Download all Bricks elements from a page as JSON.
bricks site pull <page-id>| Flag | Description |
|---|---|
-o <file> | Write output to a file instead of stdout |
Examples
Section titled “Examples”Print elements to the terminal:
bricks site pull 1460Save to a file for editing:
bricks site pull 1460 -o homepage.jsonThe output includes a contentHash field at the top level. You’ll need this hash for push operations. It prevents you from accidentally overwriting someone else’s changes.
Push page elements
Section titled “Push page elements”Replace all elements on a page with the contents of a JSON file. This is a full replacement, not a merge.
bricks site push <page-id> [file.json]The JSON must include the contentHash from a recent pull. If the page has changed since you pulled it, the push will fail with a conflict error. Pull again, re-apply your changes, and try the push again.
The file argument is optional — if omitted, the command reads JSON from stdin.
| Flag | Description |
|---|---|
--format json | Output result as JSON |
--json | Shorthand for --format json |
Examples
Section titled “Examples”Push from a file:
bricks site pull 1460 -o homepage.json# ... edit homepage.json ...bricks site push 1460 homepage.jsonPush from stdin (pipe from another command):
cat homepage.json | bricks site push 1460bricks convert html --stdin | bricks site push 1460Pushed 24 elements to page 1460Patch specific elements
Section titled “Patch specific elements”Update individual elements without replacing the entire page. Useful when you want to change a headline or swap out an image without touching anything else.
bricks site patch <page-id> [-f <patch.json>]| Flag | Description |
|---|---|
-f <file> | Path to the patch JSON file (reads from stdin if omitted) |
--format json | Output result as JSON |
--json | Shorthand for --format json |
Examples
Section titled “Examples”Patch from a file:
{ "patches": [ { "id": "abc123", "settings": { "text": "New headline text" } } ], "contentHash": "e3b0c44298fc1c14..."}bricks site patch 1460 -f headline-fix.jsonPatch from stdin:
echo '{"patches":[{"id":"abc123","settings":{"text":"Updated"}}],"contentHash":"e3b0c44298fc1c14..."}' | bricks site patch 1460Patched 1 element on page 1460Take a snapshot
Section titled “Take a snapshot”Save the current state of a page so you can roll back later. Think of it as a manual save point.
bricks site snapshot <page-id>| Flag | Description |
|---|---|
-l <label> | Human-readable label for the snapshot |
Examples
Section titled “Examples”Quick snapshot with no label:
bricks site snapshot 1460Snapshot created: snap_20260225_143052Labeled snapshot before a big change:
bricks site snapshot 1460 -l "before hero redesign"Snapshot created: snap_20260225_143210 (before hero redesign)List snapshots
Section titled “List snapshots”See all saved snapshots for a page.
bricks site snapshots <page-id>Example
Section titled “Example”bricks site snapshots 1460ID Label Created Elementssnap_20260225_143210 before hero redesign 2026-02-25 14:32:10 24snap_20260225_110530 initial import 2026-02-25 11:05:30 18snap_20260224_165423 2026-02-24 16:54:23 12Roll back
Section titled “Roll back”Restore a page to a previous snapshot.
bricks site rollback <page-id> [snapshot-id]If you don’t provide a snapshot ID, it rolls back to the most recent snapshot.
Examples
Section titled “Examples”Roll back to the latest snapshot:
bricks site rollback 1460Rolled back page 1460 to snap_20260225_143210 (before hero redesign)Roll back to a specific snapshot:
bricks site rollback 1460 snap_20260225_110530Rolled back page 1460 to snap_20260225_110530 (initial import)Detect frameworks
Section titled “Detect frameworks”See which CSS frameworks and design token systems your site is running.
bricks site frameworksDetected frameworks: Automatic.css (ACSS) 3.0.2 Tokens: 142 custom properties, 38 color variables, 24 spacing scales Frames 2.2.0 Components: 86 registered global classesFor more detail on a specific framework:
bricks frameworks listbricks frameworks show acssbricks frameworks show acss prints the full ACSS configuration: spacing scales, color palettes, typography tokens, and every registered utility class.
Related commands
Section titled “Related commands”bricks woo statusfor WooCommerce-specific discoverybricks search elementsfor query-aware element search across the site
Related commands
Section titled “Related commands”bricks convert html: convert HTML files and push them to pagesbricks classes list: browse global CSS classesbricks doctor: check a page for structural problemsbricks config init: set up your site connection