CLI v0.1: auth, projects, branches, secrets, deploy, governance, observe
Merged
JW
4mo ago+3201+3201+0123456789012345678901234567890123456789-0-0-0123456789
The insta CLI — a thin client of the platform control-plane API (Node + TS + commander).
Commands
- auth:
login/logout/status(email+password, automatic token refresh) org,project(create/list/link/delete),branch(create/list/switch/delete)secrets(the seam →.env),deploy,manifest,events- governance:
approvals(list/approve/deny),policy(get/set) observe— local credential-audit hook (scanner detects AWS/GitHub/Stripe/LLM/DB/JWT/keys, emits redacted fingerprints; auto-installed onproject create/link;report/syncinto the project timeline)
Verification
11 unit tests; verified end-to-end against the platform dev:fake server (signup → login → project create → secrets → branch clone → deploy → events → delete-with-approval) and the observe hook (HIGH exposure detected, secret stayed redacted).
🤖 Generated with Claude Code
Summary by cubic
Introduce the initial insta CLI v0.1, a thin client for the control-plane API with auth, projects, branches, secrets, deploy, governance, and a local observe hook for credential audits. Improves developer and agent workflows with simple commands, token refresh, and approval handling.
-
New Features
- Core commands: auth (login/logout/status), org (list/create), project (create/list/link/delete), branch (create/list/switch/delete)
- Secrets: fetch the credential bundle and write to
.envor print as JSON; handles approval-gated responses - Deploy: push an image to a branch/group/port; outputs URL; approval-gated actions prompt next steps
- Manifest and events: environment/resource view and project timeline
- Governance: approvals (list/approve/deny) and policy (get/set)
- Observe: install/uninstall/report/sync; scans tool-use for AWS/GitHub/Stripe/LLM/DB/JWT/private-key patterns; writes redacted findings to
./.insta/audit.jsonl; auto-install on project create/link (best effort) - Config: global in
~/.insta/config.json, project in./.insta/project.json; API URL override viaINSTA_API_URLor--api-url - Implementation: Node 20 + TypeScript (ESM) with
commander; tests cover.envserialization, approval handling, and the scanner
-
Migration
- Install:
npm install && npm run build; runinsta --help - Login and set API URL if needed:
insta login --email --password --api-url <url> - Create and link a project:
insta project create <name>; secrets to.envviainsta secrets - Deploy:
insta deploy --image <registry/img>; if gated, approve withinsta approvals approve <id> - Enable observe:
insta observe install; viewinsta observe report; sync withinsta observe sync
- Install: