feat: add resource connect command and simplify CLI surface#96
Open
rishikesh-major wants to merge 2 commits intomainfrom
Open
feat: add resource connect command and simplify CLI surface#96rishikesh-major wants to merge 2 commits intomainfrom
rishikesh-major wants to merge 2 commits intomainfrom
Conversation
89a38b5 to
bc73840
Compare
bc73840 to
1bf7d6b
Compare
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>
1bf7d6b to
da8a82b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
major resource connect <resourceId> [resourceId...]command for per-user OAuth authentication via browserresource list,resource add,resource remove,resource env-list,app deploy-status--json,--id,--no-wait) fromorg list,org select,resource env,app info, andapp deployapp infoto only display the application IDapp startby removing the behind-remote checkAuthModefield toResourceItemstruct and per-user OAuth handling to Google Calendar and list-resources skillsChanges
cmd/resource/connect.goconnectsubcommand — opens/connectpage in browser with resource IDs and optional environmentcmd/resource/resource.goconnectCmd, removelistCmd,addCmd,removeCmd,envListCmdcmd/resource/{list,add,remove,env_list}.gocmd/resource/env.go--idflag (interactive only now)cmd/app/deploy.go--no-waitflag and non-TTY simple polling fallbackcmd/app/deploy_status.gocmd/app/info.go--jsonflag and API callcmd/app/start.goIsBehindRemotecheckcmd/org/list.go--jsonflagcmd/org/select.go--idflag (interactive only now)clients/api/client.goGetApplicationInfomethodclients/api/structs.goAuthModetoResourceItem; removeGetApplicationInfoResponseclients/git/client.goIsBehindRemotefunctionutils/resources.goResolveResourceItemsinto caller; unexportdetectFrameworkplugins/major/skills/major/plugins/shared/skills/resources_googlecalendar/resource connectplugins/shared/skills/resources_list-resources/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 newresource connectcommand fills the gap for per-user OAuth flows in CLI environments.Test plan
go build ./...succeedsgo run main.go resource connect --helpshows correct usage and flags/connectURL with resource IDs and environment IDresource list,resource add, etc.)🤖 Generated with Claude Code