Skip to content

feat: interactive CLI, slug-based orgs, evals support#7

Open
vtkovapi wants to merge 7 commits intomainfrom
feat/optimization-gitops-flow
Open

feat: interactive CLI, slug-based orgs, evals support#7
vtkovapi wants to merge 7 commits intomainfrom
feat/optimization-gitops-flow

Conversation

@vtkovapi
Copy link
Copy Markdown
Collaborator

Summary

  • Interactive CLI for all commandspull, 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

@vtkovapi vtkovapi requested a review from dhruva-reddy April 10, 2026 18:23
@vtkovapi vtkovapi self-assigned this Apr 10, 2026
@dhruva-reddy
Copy link
Copy Markdown
Contributor

Awesome stuff :D

Couple of quick pointers with longer summaries in the .md file below:

  1. UX flow is a bit messy to navigate in the terminal for npm run setup
  2. Documentation still references the old way to pull and push (i.e. commands haven't been updated on our README and AGENTS.md)
  3. This one's a bit more tricky but the local websocket connection to test calling a squad or assistant is broken so I tried getting claude to walk through a fix for that and documented what ended up working for me on local dev

requested improvements.md

Copy link
Copy Markdown
Contributor

@dhruva-reddy dhruva-reddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes post review

vtkovapi and others added 5 commits April 15, 2026 16:36
- Enhanced `.env.example` with clearer API base URL instructions for US and EU regions.
- Updated `.gitignore` to simplify environment file exclusions and added a catch-all for `.env.*`.
- Removed obsolete `.vapi-state.dev.json` and `.vapi-state.prod.json` files.
- Added new scripts to `package.json` for setup, apply, push, pull, call, and cleanup operations.
- Introduced `searchableCheckbox.ts` for improved user input handling in CLI prompts.
- Cleaned up empty directories and `.gitkeep` files across various resource paths.
- Replaced existing push and pull scripts with new interactive versions (`push-cmd.ts` and `pull-cmd.ts`) that allow users to select organizations and resources interactively.
- Added a new `interactive.ts` file to handle organization detection and resource selection.
- Updated `package.json` scripts to point to the new command files.
- Enhanced `searchableCheckbox.ts` to support a back option in the interactive prompts.
- Refactored `setup.ts` to integrate the new interactive features.
- Introduced `apply-cmd.ts`, `call-cmd.ts`, and `cleanup-cmd.ts` as entry points for their respective commands, allowing for organization slug detection and interactive modes.
- Updated `apply.ts`, `call.ts`, and `cleanup.ts` to support new command structures and improved error handling for invalid org names.
- Enhanced `interactive.ts` to facilitate user interaction for selecting organizations and confirming actions.
- Added support for eval resources across various scripts, including updates to state management and resource handling in `push.ts`, `pull.ts`, and `delete.ts`.
- Refactored argument parsing and validation to ensure consistency across commands.
…ive setup

- Replaced existing command scripts with new command files (`apply-cmd.ts`, `call-cmd.ts`, `cleanup-cmd.ts`) for improved organization and functionality.
- Removed outdated scripts from `package.json` to streamline command usage.
- Enhanced the README to introduce an interactive setup process, detailing the steps for first-time users and clarifying command functionalities.
- Updated command descriptions to reflect the new interactive capabilities and improved user experience.
…ons, squad patterns

- assistants.md: Deepgram Nova-3 keyterm vs keywords, pronunciation dictionary provider comparison (Cartesia/ElevenLabs/Vapi), three-layer pronunciation approach
- tools.md: dead air during KB/API tool calls — request-start + request-response-delayed fix pattern
- squads.md: toolIds in assistantOverrides require UUIDs (not filenames), FAQ agent consolidation pattern
- simulations.md: running simulations against squads, A/B testing workflow, primitive-type evaluation constraint, filename renaming after push
- multilingual.md: updated best single-agent stack to Cartesia sonic-3, added keyterm example
- latency.md: added Cartesia pronunciation row to TTS selection table
@dhruva-reddy dhruva-reddy force-pushed the feat/optimization-gitops-flow branch from 2a68d2c to 0bcb530 Compare April 15, 2026 23:36
- Updated error handling in audio context and microphone initialization to provide more specific warnings based on the encountered issues.
- Modified command usage messages across various scripts to standardize the format and improve clarity, ensuring users understand the correct syntax for commands.
- Added support for new resource types in interactive prompts and improved the handling of locally modified files during resource pulls.
- Introduced a new grouping mechanism in the searchable checkbox for better organization of choices in interactive prompts.
…nization scope

- Revised `.env.example` to reflect changes from environment-specific to organization-specific configurations.
- Updated `AGENTS.md` to clarify resource management under org-scoped directories, including command usage and resource promotion.
- Enhanced instructions for setting up new organizations and managing resources accordingly.
@vtkovapi
Copy link
Copy Markdown
Collaborator Author

@dhruva-reddy can you recheck please

@vtkovapi vtkovapi requested a review from dhruva-reddy April 16, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants