Skip to content

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.

Check your connection and see what’s running on the other end.

Terminal window
bricks site info
bricks site info --format json
Site: https://example.com
Bricks: 1.11.1
WordPress: 6.5.2
PHP: 8.2.18
ACSS: 3.0.2
Frames: 2.2.0
Breakpoints: 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.

Use this when you want a quick capability summary instead of raw version data.

Terminal window
bricks site features
bricks site features --format json
Bricks: true (1.12.2)
WordPress: 6.9
Plugin: 2.1.0
Abilities API: true
Frameworks: 2
Query Elements: 5
WooCommerce: 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.

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.

Terminal window
bricks site query-elements
bricks site query-elements posts --controls --format json
FlagDescription
--controlsInclude the control schema for each query-capable element type
--format jsonOutput result as JSON
--jsonShorthand for --format json
Terminal window
bricks site query-elements
NAME LABEL CATEGORY
accordion Accordion general
carousel Carousel media
map Map media
posts Posts query
slider Slider media

When 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.

Download all Bricks elements from a page as JSON.

Terminal window
bricks site pull <page-id>
FlagDescription
-o <file>Write output to a file instead of stdout

Print elements to the terminal:

Terminal window
bricks site pull 1460

Save to a file for editing:

Terminal window
bricks site pull 1460 -o homepage.json

The 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.

Replace all elements on a page with the contents of a JSON file. This is a full replacement, not a merge.

Terminal window
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.

FlagDescription
--format jsonOutput result as JSON
--jsonShorthand for --format json

Push from a file:

Terminal window
bricks site pull 1460 -o homepage.json
# ... edit homepage.json ...
bricks site push 1460 homepage.json

Push from stdin (pipe from another command):

Terminal window
cat homepage.json | bricks site push 1460
bricks convert html --stdin | bricks site push 1460
Pushed 24 elements to page 1460

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.

Terminal window
bricks site patch <page-id> [-f <patch.json>]
FlagDescription
-f <file>Path to the patch JSON file (reads from stdin if omitted)
--format jsonOutput result as JSON
--jsonShorthand for --format json

Patch from a file:

{
"patches": [
{
"id": "abc123",
"settings": {
"text": "New headline text"
}
}
],
"contentHash": "e3b0c44298fc1c14..."
}
Terminal window
bricks site patch 1460 -f headline-fix.json

Patch from stdin:

Terminal window
echo '{"patches":[{"id":"abc123","settings":{"text":"Updated"}}],"contentHash":"e3b0c44298fc1c14..."}' | bricks site patch 1460
Patched 1 element on page 1460

Save the current state of a page so you can roll back later. Think of it as a manual save point.

Terminal window
bricks site snapshot <page-id>
FlagDescription
-l <label>Human-readable label for the snapshot

Quick snapshot with no label:

Terminal window
bricks site snapshot 1460
Snapshot created: snap_20260225_143052

Labeled snapshot before a big change:

Terminal window
bricks site snapshot 1460 -l "before hero redesign"
Snapshot created: snap_20260225_143210 (before hero redesign)

See all saved snapshots for a page.

Terminal window
bricks site snapshots <page-id>
Terminal window
bricks site snapshots 1460
ID Label Created Elements
snap_20260225_143210 before hero redesign 2026-02-25 14:32:10 24
snap_20260225_110530 initial import 2026-02-25 11:05:30 18
snap_20260224_165423 2026-02-24 16:54:23 12

Restore a page to a previous snapshot.

Terminal window
bricks site rollback <page-id> [snapshot-id]

If you don’t provide a snapshot ID, it rolls back to the most recent snapshot.

Roll back to the latest snapshot:

Terminal window
bricks site rollback 1460
Rolled back page 1460 to snap_20260225_143210 (before hero redesign)

Roll back to a specific snapshot:

Terminal window
bricks site rollback 1460 snap_20260225_110530
Rolled back page 1460 to snap_20260225_110530 (initial import)

See which CSS frameworks and design token systems your site is running.

Terminal window
bricks site frameworks
Detected 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 classes

For more detail on a specific framework:

Terminal window
bricks frameworks list
bricks frameworks show acss

bricks frameworks show acss prints the full ACSS configuration: spacing scales, color palettes, typography tokens, and every registered utility class.