feat(configure): add project_id field to config#13
Merged
Conversation
VNG Cloud APIs embed the user's project UUID in many URL paths. Adding project_id to the CLI config lets downstream tools (greenode-mcp-server, future SDKs) read a cached value instead of calling /v1/projects every session. Scope: per-profile field stored in ~/.greenode/config alongside region and output. Not a secret — lives in config, not credentials. - `grn configure`: wizard prompts for Project ID (blank = skip) - `grn configure list`: includes project_id with source column - `grn configure get project_id` / `set project_id <value>` - `GRN_DEFAULT_PROJECT_ID` env var override - Profiles work as-is (each profile has its own project_id) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 tasks
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
VNG Cloud APIs embed the user's project UUID in many URL paths (e.g.
/v2/{projectId}/networks). Addingproject_idto the CLI config lets downstream tools (greenode-mcp-server, future SDKs) read a cached value instead of calling/v1/projectsevery session.~/.greenode/configalongsideregionandoutput. Not a secret — lives in config, not credentials.GRN_DEFAULT_PROJECT_IDenv var > config file value > empty (downstream tool can auto-detect)Changes
grn configure: wizard prompts for Project ID (blank = skip)grn configure list: includesproject_idwith source column (env / config-file)grn configure get project_idgrn configure set project_id <value>GRN_DEFAULT_PROJECT_IDenv var overrideproject_id)Test Plan
grn configure set project_id pro-xxxpersists to~/.greenode/configgrn configure get project_idreturns valuegrn configure listshows field + source (env vs config-file)GRN_DEFAULT_PROJECT_IDoverride takes priority over filego vet+go buildclean🤖 Generated with Claude Code