Local development and CLI
Use the released CLI's explicit @beta tag. Create a customer API key with the Design Manager right and the intended organization/project/app scope. Owner/Admin API-key permission and custom-design access are separate requirements; a key does not bypass entitlements.
Initialize
Start in an empty directory:
npx @1consent/cli@beta init
pnpm install
npx @1consent/cli@beta pull
pnpm devInit validates the key, writes .1consentrc and .env, and scaffolds a Vite Design Kit project when needed. Review existing configuration instead of assuming init replaces it. Keep the token private and do not commit .env.
The Design Kit previews views, languages, themes, and framework controls using the consent runtime. Local sample data is for authoring: validate actual services/content in Dashboard Preview before publication.
Workspace layout
An organization pull mirrors root and child resources:
designs/
brand-consent/
_shared/
styles.css
button.1cl.html
gdpr/
main.1cl.html
styles.css
banner.design.json
themes/
projects/
PROJECT_ID/
designs/
themes/
apps/
APP_ID/
designs/
themes/Downloaded directories and metadata are authoritative. Project/app keys put their own resources at the root and mirror only authorized children. Do not move resources between scopes by renaming directories or inventing IDs.
Collections use _shared defaults and framework directories. Flat local designs use a main file plus optional styles/vars/partials. A custom banner has only main.1cl.html as an authored view. Generated banner.design.json records its legal framework and immutable official secondary bundle URLs for local preview. Keep this metadata; it is validated and excluded from uploaded source files. Full custom designs author main.1cl.html, details.1cl.html, and trigger.1cl.html.
If a resource intentionally changes from full to banner mode, pull archives existing local details/trigger files under _retained/ with content hashes before removing them from the authored view set. Pulling a full design removes generated banner metadata. Review these transitions and commit your own work before pulling.
Push drafts
npx @1consent/cli@beta pushPush validates the checkout before uploading draft assets. It does not publish a customer CMP. Select, preview, review, and publish from the Dashboard. Internal push-system/publish commands manage official assets, not customer publications.
Pull before editing, review your diff, and coordinate shared files. Avoid pulling over uncommitted edits. Resolve authentication, scope, symlink, and entitlement errors before retrying. See CLI reference and API reference.