GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(cli): Sim CLI with AWS-style profiles and a platform key exchange by TheodoreSpeaks · Pull Request #6147 · simstudioai/sim

Conversation

@TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks commented Aug 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

High-level idea

Problem: Sim’s public API lacks a terminal-native client that can securely obtain a platform credential, preserve environment-specific defaults, and expose the v2 resource surface—including binary, multipart, and credential-connection workflows—as predictable shell commands.
Solution: This PR publishes the CLI as [email protected] with browser-approved key exchange, AWS-style profiles, generated v2 commands plus terminal-shaped adapters, structured output, and branch-mapped npm releases in a single Node-compatible bundle.

Implementation level

Primary level: CLI application and runtime, supported by public API authentication and credential contracts plus release infrastructure.

Chokepoint: buildGeneratedCommands() consumes the generated V2_OPERATIONS table plus the sparse, hand-authored CLI_CONTRACT diff and turns them into the Commander command tree registered by src/index.ts.

Contract → runtime

canonical v2 route contracts
          │
          ▼
scripts/generate-v2-cli-api.ts
          │
          ▼
generated V2_OPERATIONS ───── CLI_CONTRACT overrides
          │                             │
          └──────────────┬──────────────┘
                         ▼
              buildGeneratedCommands()
                         │
            arguments, flags, and actions
                         │
                         ▼
                Commander command tree

The runtime is implemented and active in this PR. At the current head, the generated manifest contains 139 API operations; the generic runtime exposes 123 JSON operations plus three command variants, producing 126 generated command actions across 13 top-level resource groups. An operation absent from CLI_CONTRACT still becomes a command—the contract only records exceptions such as friendlier names, aliases, confirmations, positional arguments, output columns, and deliberately hidden operations.

The protocol layer handles the cases that cannot be represented as one ordinary JSON request. It hides the low-level transfer/session operations and attaches 12 terminal-shaped commands for file download and upload, knowledge-document upload, table import, and combined resource/folder navigation. These adapters compose the same v2 operations; they do not override backend behavior.

Credential creation is similarly translated into three terminal-shaped commands. sim credentials connect <providerId> --name <displayName> and sim credentials reconnect <credentialId> print a short-lived OAuth authorization URL and expiry. sim credentials create <providerId> --name <displayName> --credentials <json|@file> discovers the service-account provider, validates its exact required fields locally, and submits the provider-shaped credentials without exposing every provider’s secret fields as unrelated flags. The low-level generated forms are hidden.

sim secrets set <name> --scope <scope> uses a masked TTY prompt by default, restores terminal state on completion or cancellation, and fails fast without a terminal. Scripts can pass --value <value> explicitly; help warns that direct values are visible to shell history. The API response remains metadata-only.

packages/sim-cli/
├── package.json                         [new] sim metadata, binary, bundled build
├── THIRD_PARTY_LICENSES                 [new] notices for bundled dependencies
├── src/index.ts                         [new] registers generated and adapted commands
├── src/generated/v2-api.ts              [new] generated operation and wire-type manifest
├── src/contract/commands.ts             [new] sparse human-authored CLI presentation diff
├── src/runtime/build.ts                 [new] contract interpreter and command-tree chokepoint
├── src/runtime/request.ts               [new] argv coercion and typed request assembly
├── src/runtime/execute.ts               [new] requests and cursor pagination
├── src/runtime/result.ts                [new] contract-driven result rendering
├── src/commands/credentials.ts          [new] OAuth links and service-account schema translation
├── src/commands/secrets.ts              [new] interactive and explicit secret entry
├── src/commands/protocol/               [new] 12 binary and multi-request adapters
├── src/terminal/secret-input.ts         [new] masked TTY input with state restoration
├── src/auth/device-flow.ts              [new] browser handoff and credential polling
├── src/config/profile.ts                [new] AWS-style profile resolution and storage
└── src/output/                          [new] table, JSON, YAML, and text rendering

scripts/generate-v2-cli-api.ts            [new] canonical contracts → import-free CLI manifest

apps/sim/
├── package.json                         [edit] private web workspace renamed to @sim/app
├── lib/api/contracts/cli-auth.ts         [edit] browser/terminal handoff contract
├── app/api/cli/auth/approve/route.ts     [edit] approval and platform-key minting
├── app/api/cli/auth/poll/route.ts        [edit] one-time terminal redemption
├── app/cli/auth/cli-auth-view.tsx        [edit] pairing and workspace-default consent
├── lib/api/contracts/v2/credentials.ts   [edit] provider, connection, and credential contracts
└── app/api/v2/credentials/               [edit] list, provider, connect, and disconnect routes

.github/workflows/publish-sim-cli.yml     [new] authenticated sim releases and Node 20 smoke test
scripts/check-import-specifiers.ts        [edit] one extensionless-import policy for the repository

Approval UI

┌──────────────────────────────────────────────┐
│ Connect your terminal                        │
│ Approve only if this code matches it.        │
│                                              │
│                 K7M2-P9XT                    │
│                                              │
│ Default workspace                            │
│ [ Workspace name                          ▾ ]│
│ Personal key; this workspace is the default. │
│                                              │
│                              [ Connect ]     │
└──────────────────────────────────────────────┘
  • Invalid or expired requests fail before approval.
  • Workspace loading disables approval.
  • The browser records consent but never receives the redeemable API key.
  • The terminal polls once, receives the key, and writes the selected workspace as its profile default.
  • sim login confirms before replacing an existing profile; non-interactive callers must pass --yes.

Type of Change

  • New feature
  • Improvement
  • Refactoring

Testing

  • bun run lint
  • bun run check:audits
  • bun run apps/sim/scripts/check-block-registry.ts origin/staging
  • bun run check:migrations
  • bun run check:import-specifiers --verbose
  • bun run check:cli-api
  • bun run --filter sim type-check
  • bun run --filter sim test — 242 passed, 1 skipped
  • bun run --filter sim build
  • Credential v2 route tests — 41 passed
  • Packed artifact executes under Node 20.20.2
  • git diff --check

Checklist

  • Code follows repository conventions
  • Tests cover the CLI runtime, profiles, authentication, output, protocol adapters, and credential connection links
  • Generated API artifacts are synchronized with canonical contracts
  • Published artifacts contain the executable bundle and third-party notices
  • No database change remains in the PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
waleedlatif1 and others added 30 commits July 1, 2026 01:28
@waleedlatif1
v0.7.19: newsletter, contact, careers
6e426f8
@waleedlatif1
v0.7.20: perf, ui improvements, fable 5, tables row size bump, blogs
62ef96f
@waleedlatif1
v0.7.21: tools audits and extensions, appsheet integration, hitl fix
4fcfe76
@waleedlatif1
v0.7.22: competitor pages, seo fixes, billing usage table
8afc4f1
@waleedlatif1
v0.7.23: mobile comparison table, security hardening, subflow & strea…
616a71d
…ming improvements
@waleedlatif1
v0.7.24: frontend perf improvements, md editor fixes, mailer fix, too…
62d3140
…ls audit
@waleedlatif1
v0.7.25: new tools, gmail send fixes, email lifecycle adjustments
21ee602
@waleedlatif1
v0.7.26: API block default headers fix, tables perf and correctness, …
9d44d42
…landing redesign
@waleedlatif1
v0.7.27: document tags improvements, grok 4.5, forking, custom blocks…
067d3b0
…, library, typescript 7, jupyter notebook, o11y, meta muse, gpt 5.6
@waleedlatif1
v0.7.28: rich markdown editor improvements, autosave in files, helm i…
e2fecc8
…mprovements
@waleedlatif1
v0.7.29: GLM, ui and ux improvements, tables improvements, enterprise…
6c3d11b
… page
@waleedlatif1
v0.7.30: md editor improvements, og image updates, spacexai hosted ke…
207785c
…ys, cmd-k speedups, pagespeed optimizations, security hardening
@waleedlatif1
v0.7.31: sidebar shortcut, env var expansion in lifecycle triggers, a…
e01bfb1
…shby fixes
@waleedlatif1
v0.7.32: concurrency control, seo/geo, new lib, buffer & flint integr…
dc81795
…ations
@waleedlatif1
v0.7.33: workflow/custom block fix, community pages improvements, cha…
377f963
…t animation
@waleedlatif1
v0.7.34: billing page fixes, chat rendering improvements
a403d05
@icecrasher321
v0.7.35: sidebar styling, custom blocks reserved names fix, client en…
91b29b3
…v var checks
@TheodoreSpeaks
Merge pull request #5677 from simstudioai/staging
50364ed
@waleedlatif1
v0.7.36: mothership secrets resolution, SEO, service accounts for var…
874c998
…ious providers, library updates, platform and solutions pages
@icecrasher321
v0.7.37: impersonation fixes, instagram/tiktok, landing improvements,…
9d23e25
… agent tools fix
@waleedlatif1
v0.7.38: mothership improvements, clickup, rocketlane integrations, g…
28b56d7
…itlab tools, deployment state machine, gitlab tools, rich rendering
@waleedlatif1
v0.7.39: mcp oauth hardening, chat perf improvements
4ddad74
@waleedlatif1
v0.7.40: library, mcp hardening, pi code reviewer, gmail fix
3d12a6d
@waleedlatif1
v0.7.41: email fixes, MCP fixes, gemini 3.6 flash, GitHub runners fal…
3ca1b65
…lback, mothership experience improvements, soft delete chats
@waleedlatif1
v0.7.42: event-driven discovery for MCP, nuqs adoption for deeplinks,…
31b81ca
… test speedup, org session policies, proxy URL for API calls
@waleedlatif1
v0.7.43: ci and connector fixes
578d9dd
@waleedlatif1
v0.7.44: nextjs upgrade, CSV imports to tables fixes, tombstone for K…
41bf1c4
…B docs, mcp fixes
@waleedlatif1
v0.7.45: access control groups enhancements, sso domain verification,…
6f514c1
… agent thinking/tool-calls/prompt-caching, opus 5, daytona failover
@waleedlatif1
v0.7.46: settings consolidation, setup wizard, table column types and…
fe2241e
… mutation locks, slack oauth scope fix, tiktok
@waleedlatif1
v0.7.47: seo, import/export api, trigger task sizes
5e14639
greptile-apps[bot]
greptile-apps Bot reviewed Aug 15, 2026
View reviewed changes
Comment thread packages/sim-cli/src/runtime/result.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/sim-cli/src/commands/protocol/files-get.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 15, 2026
View reviewed changes
Comment thread packages/sim-cli/src/commands/protocol/files-get.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/sim-cli/src/commands/protocol/files-get.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@TheodoreSpeaks
fix(cli): harden download destinations and labels
90c21fd
@vercel
vercel Bot temporarily deployed to Preview August 15, 2026 07:34 Inactive
@TheodoreSpeaks

TheodoreSpeaks commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TheodoreSpeaks

TheodoreSpeaks commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot]
greptile-apps Bot reviewed Aug 15, 2026
View reviewed changes
Comment thread packages/sim-cli/src/commands/protocol/files-get.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 15, 2026
View reviewed changes
Comment thread packages/sim-cli/src/commands/protocol/files-get.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@TheodoreSpeaks
fix(cli): support dangling download symlinks
ab22e0d
@vercel
vercel Bot temporarily deployed to Preview August 15, 2026 07:40 Inactive
@TheodoreSpeaks

TheodoreSpeaks commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TheodoreSpeaks

TheodoreSpeaks commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 15, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ab22e0d. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
greptile-apps[bot]
greptile-apps Bot reviewed Aug 15, 2026
View reviewed changes
Comment thread packages/sim-cli/src/commands/protocol/files-get.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@TheodoreSpeaks
fix(cli): keep new downloads atomic
18fc377
@vercel
vercel Bot temporarily deployed to Preview August 15, 2026 07:48 Inactive
@TheodoreSpeaks

TheodoreSpeaks commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TheodoreSpeaks

TheodoreSpeaks commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 15, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 18fc377. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@TheodoreSpeaks
refactor(cli): remove unrelated Copilot changes
8027afc
@vercel
vercel Bot deployed to Preview August 15, 2026 08:21
View deployment
@TheodoreSpeaks
fix(cli): publish as sim package
582d3dd
cursor[bot]
cursor Bot reviewed Aug 15, 2026
View reviewed changes
Comment thread bun.lock Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/sim-cli/package.json Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vercel
vercel Bot deployed to Preview August 15, 2026 08:37
View deployment
TheodoreSpeaks added 2 commits August 15, 2026 01:37
@TheodoreSpeaks
fix(cli): use staging npm tag
d252c86
@TheodoreSpeaks
fix(cli): align vitest lock resolution
7b84b02
@TheodoreSpeaks

TheodoreSpeaks commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TheodoreSpeaks

TheodoreSpeaks commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 15, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b84b02. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/workflows/publish-sim-cli.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1 waleedlatif1 mentioned this pull request Aug 16, 2026
v0.8.3: sim cli, new tools, credential groups, splunk, finder-like files refactor, security hardening #6765
Merged

This branch was successfully deployed

1 active deployment
Preview — 7b84b028 Deployed Aug 15, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@greptile-apps greptile-apps[bot] greptile-apps[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments
+1 more reviewer
@github-advanced-security github-advanced-security[bot] github-advanced-security[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@TheodoreSpeaks @github-advanced-security @waleedlatif1 @icecrasher321 @Sg312
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.