Skip to content

feat(cli): add auth command to list authenticated providers - #34514

Closed
rekram1-node wants to merge 1 commit into
v2from
auth-list
Closed

rekram1-node wants to merge 1 commit into
v2from
auth-list

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

What

Adds a top-level auth command to the V2 CLI that lists which providers are currently authenticated.

$ opencode auth
Amazon Bedrock  AWS_REGION · env
Google          GEMINI_API_KEY · env
OpenCode        anomaly · credential

When nothing is authenticated it prints No authenticated providers.

Why

The V2 CLi (packages/cli) had no way to see authenticated providers — the legacy auth list / providers list command was never ported. V2 already models auth as integrations with connections, exposed over the server API (integration.list) and used by the TUI's connect-provider flow, but nothing surfaced it on the command line.

How

Thin handler over the existing typed client, mirroring the debug agents handler:

  • client.v2.integration.list({ location: { directory } })
  • Keep only integrations with a non-empty connections array (i.e. authenticated).
  • Render one line per connection: credential connections show their label, env connections show the active environment variable name.

No backend or server changes are needed. The command name is intentionally simple and leaves room for future auth login / auth logout subcommands.

Verification

  • bun typecheck from packages/cli.
  • bun dev auth against a real running server lists the connected providers shown above; bun dev --help lists the new command.

@opencode-agent opencode-agent Bot mentioned this pull request Jul 2, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant