init
Guided setup for platforms that still need secrets. In a TTY it prompts for each missing key and appends answers to .env. Non-interactive shells get the printed plan instead.
Usage
shell
adscapi init [--platform <key>]
Flags
| Flag | Effect |
|---|---|
--platform <key> | Print the setup plan for one platform (doc path + missing secrets) and exit — no prompts |
Behavior
- All configured — prints
All registered platforms are configured. Run: adscapi verifyand exits - TTY (interactive) — prompts per missing secret; blank skips. Appends new keys to
.envin the cwd (never overwrites existing keys) - Non-TTY — prints every pending setup plan (no write)
--platform— prints one plan and returns (works in TTY and pipes)
Examples
shell
$ npx adscapi init 3 platform(s) need setup. Leave a value blank to skip it. meta (real-capi) — setup guide: docs/platforms/meta.md META_CAPI_TOKEN: EAAB… META_PIXEL_ID: 1234567890 Wrote 2 key(s) to .env: META_CAPI_TOKEN META_PIXEL_ID Next: source .env && adscapi verify
shell
$ npx adscapi init --platform meta meta (real-capi) setup: docs/platforms/meta.md missing: META_CAPI_TOKEN, META_PIXEL_ID …
shell
$ npx adscapi init < /dev/null 3 platform(s) need setup: meta (real-capi) … tiktok (real-capi) …
Related
- platforms
- verify — confirm tokens after writing
.env - Platform setup guides