Skip to content

feat: add resource connect command and simplify CLI surface#96

Open
rishikesh-major wants to merge 2 commits intomainfrom
feat/cli-resource-connect
Open

feat: add resource connect command and simplify CLI surface#96
rishikesh-major wants to merge 2 commits intomainfrom
feat/cli-resource-connect

Conversation

@rishikesh-major
Copy link
Copy Markdown
Collaborator

@rishikesh-major rishikesh-major commented Apr 9, 2026

Summary

  • Adds major resource connect <resourceId> [resourceId...] command for per-user OAuth authentication via browser
  • Removes machine-oriented subcommands that are now handled via web UI or MCP tools: resource list, resource add, resource remove, resource env-list, app deploy-status
  • Removes non-interactive flags (--json, --id, --no-wait) from org list, org select, resource env, app info, and app deploy
  • Simplifies app info to only display the application ID
  • Simplifies app start by removing the behind-remote check
  • Updates all plugin skill docs and troubleshooting guides to reflect the reduced CLI surface
  • Adds AuthMode field to ResourceItem struct and per-user OAuth handling to Google Calendar and list-resources skills

Changes

Area What
cmd/resource/connect.go New connect subcommand — opens /connect page in browser with resource IDs and optional environment
cmd/resource/resource.go Register connectCmd, remove listCmd, addCmd, removeCmd, envListCmd
cmd/resource/{list,add,remove,env_list}.go Deleted
cmd/resource/env.go Remove --id flag (interactive only now)
cmd/app/deploy.go Remove --no-wait flag and non-TTY simple polling fallback
cmd/app/deploy_status.go Deleted
cmd/app/info.go Simplified to only print application ID; remove --json flag and API call
cmd/app/start.go Remove IsBehindRemote check
cmd/org/list.go Remove --json flag
cmd/org/select.go Remove --id flag (interactive only now)
clients/api/client.go Remove GetApplicationInfo method
clients/api/structs.go Add AuthMode to ResourceItem; remove GetApplicationInfoResponse
clients/git/client.go Remove IsBehindRemote function
utils/resources.go Inline ResolveResourceItems into caller; unexport detectFramework
plugins/major/skills/major/ Update SKILL.md and all docs to reflect removed commands/flags
plugins/shared/skills/resources_googlecalendar/ Add per-user OAuth flow using resource connect
plugins/shared/skills/resources_list-resources/ Add Step 3 for per-user OAuth handling

Context

Companion to major-technology/mono-builder#1014. This slims down the CLI to its interactive-first surface — commands that were added for programmatic/AI use (resource list, resource add --id, org select --id, deploy-status, etc.) are removed in favor of MCP tools and the web UI. The new resource connect command fills the gap for per-user OAuth flows in CLI environments.

Test plan

  • go build ./... succeeds
  • go run main.go resource connect --help shows correct usage and flags
  • Manual: verify browser opens to correct /connect URL with resource IDs and environment ID
  • Verify removed subcommands are no longer available (resource list, resource add, etc.)

🤖 Generated with Claude Code

@rishikesh-major rishikesh-major force-pushed the feat/cli-resource-connect branch from 89a38b5 to bc73840 Compare April 10, 2026 20:27
@rishikesh-major rishikesh-major changed the title feat: add 'major resource connect' command feat: add resource connect command and simplify CLI surface Apr 11, 2026
@rishikesh-major rishikesh-major force-pushed the feat/cli-resource-connect branch from bc73840 to 1bf7d6b Compare April 11, 2026 00:39
rishikesh-major and others added 2 commits April 12, 2026 17:58
Opens the /connect page in the browser for per-user OAuth resources.
Takes resource IDs as positional args and an optional --environment flag.
If --environment is not provided, resolves from the app's current environment.
Also adds AuthMode field to ResourceItem struct for discoverability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rewrite Google Calendar skill to lead with per-user OAuth setup
- Add per-user OAuth step to list-resources skill
- Skills detect context (web vs CLI) by checking tool availability
- CLI agent runs `major resource connect` itself via Bash

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rishikesh-major rishikesh-major force-pushed the feat/cli-resource-connect branch from 1bf7d6b to da8a82b Compare April 13, 2026 00:59
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.

1 participant