Skip to content

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

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

feat: interactive CLI, slug-based orgs, evals support#7
vtkovapi wants to merge 4 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 added 4 commits April 8, 2026 13:30
- 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.
@vtkovapi vtkovapi requested a review from dhruva-reddy April 10, 2026 18:23
@vtkovapi vtkovapi self-assigned this Apr 10, 2026
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.

2 participants