fix: hide registry flags from mcp init help output#267
Merged
peterj merged 3 commits intoagentregistry-dev:mainfrom Mar 6, 2026
Merged
Conversation
The --registry-url and --registry-token flags inherited from the root command are not relevant for `arctl mcp init` since it operates purely offline. This hides them from the --help output using a custom help function wrapper. Closes agentregistry-dev#115 Co-Authored-By: Claude Opus 4.6 <[email protected]>
peterj
reviewed
Mar 5, 2026
internal/cli/mcp/helpers.go
Outdated
| // hideRegistryFlags marks the inherited registry-url and registry-token flags | ||
| // as hidden so they do not appear in the --help output of commands that do not | ||
| // interact with the registry. | ||
| func hideRegistryFlags(cmd *cobra.Command) { |
Contributor
There was a problem hiding this comment.
can this be modified so we can potentially pass in multiple commands at the same time?
Per review feedback, accept multiple commands at once via variadic parameter so callers can pass several commands in a single call. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Contributor
Author
|
Updated |
The function already accepts variadic commands; now pass all three offline commands (InitCmd, BuildCmd, AddToolCmd) in one call. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Contributor
Author
|
Updated — the function already accepted variadic commands, now passing all three offline commands ( |
Contributor
Author
|
Already done! The function signature uses variadic args: |
peterj
approved these changes
Mar 6, 2026
christian-posta
pushed a commit
to christian-posta/agentregistry
that referenced
this pull request
Mar 9, 2026
…#267) # Description Hide registry-specific flags (`--registry-url`, `--project-dir`) from the `mcp init` help output since they are not relevant to MCP initialization. **What changed:** - Updated `hideRegistryFlags` to accept variadic commands - Applied to `mcp init` command to hide confusing flags from help text Fixes agentregistry-dev#260 # Change Type /kind fix # Changelog ```release-note Hide registry flags from mcp init help output ``` # Additional Notes The flags still function if explicitly passed — they are only hidden from `--help` output. --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
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.
Description
Hide registry-specific flags (
--registry-url,--project-dir) from themcp inithelp output since they are not relevant to MCP initialization.What changed:
hideRegistryFlagsto accept variadic commandsmcp initcommand to hide confusing flags from help textFixes #260
Change Type
/kind fix
Changelog
Additional Notes
The flags still function if explicitly passed — they are only hidden from
--helpoutput.