create-vapi-app
v0.1.2
Published
Scaffold a private copy of the Vapi gitops repo (VapiAI/gitops) and connect it to your Vapi org.
Maintainers
Readme
create-vapi-app
Creates a private copy of the Vapi gitops repo, installs it, and runs its setup wizard to connect your Vapi org. It's like create-next-app, for managing Vapi assistants, squads, tools and simulations as code.
npx create-vapi-app@latest my-agentsOr, with npm's create shorthand (the create-vapi alias):
npm create vapi@latest my-agents
# npm create needs -- before flags:
npm create vapi@latest my-agents -- --yesnpx create-phone-agent@latest is another alias for the same tool.
What it does
- Checks that Node.js, git and the target folder are ready.
- Fetches gitops at the version pinned to this release. By default it keeps gitops' history, with gitops as the
upstreamremote, so later updates aregit fetch upstream && git merge upstream/main. - Runs
npm ci. - Hands off to the repo's own
npm run setup, which asks for your org name, API key and region.
If anything fails or you press Ctrl-C before setup starts, the folder is removed. A folder that already existed (and was empty) is kept.
Keep your copy private. The gitops README warns against public forks.
Options
| Option | What it does |
|---|---|
| [project-name] | Target folder. Use . for the current folder; it must be empty. |
| --org <name> | Org folder name passed to npm run setup (for example my-org) |
| --region us\|eu | Vapi region for setup. Needs --org. |
| --resources all\|none | Download the org's existing resources, or start empty. Needs --org. |
| --skip-install | Don't run npm ci. This also skips setup, which needs the dev dependencies. |
| --skip-setup | Clone and install only; connect an org later. |
| --disable-git | Create no git repo. |
| --clean-history | Start a fresh git history instead of keeping gitops' upstream history. |
| --github | Create a private GitHub repo with the gh CLI and push to it. Not available with --clean-history or --disable-git. |
| --ref <sha\|tag\|branch> | Use a different gitops version. A commit SHA must be the full 40 characters. |
| -y, --yes | Use defaults and never prompt. Setup runs only when --org is given and its key is in the environment; otherwise the setup command is printed. |
For agents and CI
VAPI_PRIVATE_API_KEY_ACME_DEV=... npx --yes create-vapi-app@latest acme-agents --org acme-dev --resources none --yesThe API key is never accepted as an argument, because argv ends up in shell history, process listings and agent transcripts. Setup reads it from VAPI_PRIVATE_API_KEY_<ORG> (my-org becomes VAPI_PRIVATE_API_KEY_MY_ORG), then VAPI_PRIVATE_API_KEY, or asks for it. Keys are also removed from the environment of git, npm ci and gh. Only setup sees them.
Requirements
- Node.js 20.12+, 22.13+ or 23.5+. gitops pins Node 22.
- git, unless you pass
--disable-git. - macOS or Linux. Windows isn't supported yet.
npm ci may print node-gyp errors for the optional speaker and mic packages, which npm run call uses for live audio. These errors are harmless: everything else installs.
Usage measurement
npm run setup is started with VAPI_GITOPS_RUN_ID=<command>--<random hex>, for example create-vapi-app--3f2a…. gitops sends this run id to the Vapi API in its x-vapi-client header, as it does for every run. This lets Vapi count installs that came from this tool. Nothing else is sent: no telemetry, no paths, and no org names beyond what the Vapi API already sees.
