Docs

nertia CLI

Full verbose SiteCommand syntax.

Entry: src/bin/nertia.ts. Requires --slug or accepts site: namespace prefix.

Commands

npx tsx src/bin/nertia.ts --slug my-site add-section marketing-hero
npx tsx src/bin/nertia.ts --slug my-site remove-section marketing-hero-1717000000000
npx tsx src/bin/nertia.ts --slug my-site reorder-sections --order id1,id2,id3
npx tsx src/bin/nertia.ts --slug my-site set-skin zinc
npx tsx src/bin/nertia.ts --slug my-site set-layout hero-1 centered --mode migrate
npx tsx src/bin/nertia.ts --slug my-site batch '[{"type":"ADD_SECTION","sectionType":"cta-banner"}]'

SiteCommand types

CommandEffect
ADD_SECTIONAppend or insert a section by type
REMOVE_SECTIONRemove by instance ID
REORDER_SECTIONSSet full section order
SET_SKINSwitch active skin
SET_LAYOUTChange section layout variant (seed or migrate)

Output: {"ok":true,"slug":"…","sections":N}.

Requires Firebase admin credentials in .env.local for production RTDB writes. Local dev uses the emulator after npm run dev:setup.

Quick reference

Add:      nertia --slug SITE add-section TYPE
Remove:   nertia --slug SITE remove-section INSTANCE_ID
Reorder:  nertia --slug SITE reorder-sections --order id1,id2
Skin:     nertia --slug SITE set-skin SKIN_ID
Batch:    nertia --slug SITE batch '[{...}]'
nertia CLI — nertia docs