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 infoSite: 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.
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 file 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.
Example
Section titled “Example”bricks site pull 1460 -o homepage.json# ... edit homepage.json ...bricks site push 1460 homepage.jsonPushed 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 |
Example
Section titled “Example”Change just the hero headline:
[ { "id": "abc123", "settings": { "text": "New headline text" } }]bricks site patch 1460 -f headline-fix.jsonPatched 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 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