You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: interactive CLI, slug-based orgs, evals support (#7)
## Summary
- **Interactive CLI for all commands** — `pull`, `push`, `apply`, `call`, `cleanup` now prompt for org selection and offer a searchable multi-select resource picker when run without arguments. Direct mode (`npm run push -- <org>`) still works for scripting/CI.
- **Slug-based orgs replace fixed dev/stg/prod** — Resources are scoped by org name (e.g. `my-org`, `production`) instead of hardcoded environments. Each org gets its own `.env.<org>`, `.vapi-state.<org>.json`, and `resources/<org>/` directory. An interactive `npm run setup` wizard handles first-time configuration.
- **Evals as a first-class resource type** — Added `evals` throughout the pipeline: types, state, pull, push, delete, resource loading, and the eval runner (`npm run eval`).
### Details
- `npm run setup` — interactive wizard: API key validation with region auto-detection, org naming, searchable resource picker with dependency detection
- `searchableCheckbox` — custom `@inquirer/core` prompt with type-to-search, space-to-toggle, Ctrl+A, grouped display, ESC-to-go-back
- All `-cmd.ts` wrappers detect whether a slug arg is present — if yes, forward to core script; if no, enter interactive mode
- `shouldApplyResourceType` in push.ts now skips resource types not relevant to the selected file paths (less noise)
- Removed all 30+ env-specific npm scripts (`push:dev`, `pull:stg:force`, etc.) — replaced by 7 universal commands
- README fully rewritten for the new workflow
## Test plan
- [ ] `npm run setup` — configure a new org end-to-end
- [ ] `npm run pull` — interactive org selection, resource picker with ✔ local markers, ESC to go back
- [ ] `npm run push` — interactive with git status indicators, selective push of individual files
- [ ] `npm run push -- <org>` — direct mode still works
- [ ] `npm run push -- <org> resources/<org>/assistants/foo.md` — single-file push only loads relevant resource type
- [ ] `npm run apply` — interactive apply (pull → push)
- [ ] `npm run call` — interactive assistant/squad picker from state file
- [ ] `npm run cleanup` — interactive dry-run then confirm
- [ ] `npm run eval -- <org> -s <squad>` — eval runner works with slug-based env
- [ ] `npm run build` — clean compile (no new type errors)
Made with [Cursor](https://cursor.com)
Copy file name to clipboardExpand all lines: AGENTS.md
+50-43Lines changed: 50 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ This project manages **Vapi voice agent configurations** as code. All resources
6
6
7
7
**Prompt quality:** Whenever you create a new assistant or change an existing assistant’s system prompt, read **`docs/Vapi Prompt Optimization Guide.md`** first. It goes deeper on structure, voice constraints, tool usage, and evaluation than the summary in this file.
8
8
9
-
**Environment-scoped resources:** Resources live in `resources/<env>/` (e.g. `resources/dev/`, `resources/prod/`). Each environment directory is isolated — `push:dev` only touches `resources/dev/`, `push:prod` only touches `resources/prod/`. See **`docs/environment-scoped-resources.md`** for the full promotion workflow and rationale.
9
+
**Org-scoped resources:** Resources live in `resources/<org>/` (e.g. `resources/my-org/`, `resources/my-org-prod/`). Each org directory is isolated — `npm run push -- my-org` only touches `resources/my-org/`. Run `npm run setup` to create a new org.
10
10
11
-
**Template-safe first run:** In a fresh clone, prefer `npm run pull:dev:bootstrap` (or the matching env) to refresh `.vapi-state.<env>.json` and credential mappings without materializing the target org's resources into `resources/<env>/`. `push:<env>` will auto-run the same bootstrap sync when it detects empty or stale state for the resources being applied.
11
+
**Template-safe first run:** In a fresh clone, prefer `npm run pull -- <org> --bootstrap`to refresh `.vapi-state.<org>.json` and credential mappings without materializing the target org's resources into `resources/<org>/`. `npm run push -- <org>` will auto-run the same bootstrap sync when it detects empty or stale state for the resources being applied.
12
12
13
13
**Excluding resources from sync (`.vapi-ignore`):** To prevent specific resources from being pulled at all (e.g. assistants owned by another team or legacy resources you don't want to manage), create `resources/<env>/.vapi-ignore` with gitignore-style patterns. See `resources/<env>/.vapi-ignore.example` for syntax and examples. Ignored resources are silently skipped on every pull and never tracked in state — distinct from "locally deleted" which keeps an entry in state.
14
14
@@ -38,20 +38,20 @@ This project manages **Vapi voice agent configurations** as code. All resources
0 commit comments