[codex] add persistent CLI setup flow - #13
Merged
Conversation
…t-cli # Conflicts: # README.md # docs/architecture.md
morluto
marked this pull request as ready for review
July 17, 2026 23:41
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
GitContribute's documented onboarding starts with
npx gitcontribute@latest setup, but npx only exposes the package executable for that one invocation. Setup could successfully initialize the corpus and configure MCP while leaving no persistentgitcontributecommand for direct CLI and TUI use. The successful setup report made that distinction difficult to understand, so a user could reasonably rungitcontributenext and receivecommand not found.This PR treats the terminal application and MCP integrations as independent setup capabilities. Interactive npx setup now offers to install the exact running GitContribute release globally, then separately asks which MCP clients to configure. Non-interactive setup requires the explicit
--install-cliflag, and--no-mcpsupports terminal-only installations without inferring permission for other mutations.Root cause and user impact
The previous wizard configured application state and coding clients but did not model persistent CLI installation as a setup capability. The MCP launcher correctly avoided saving an executable path from npm's temporary cache, but the terminal workflow had no equivalent persistent-install step or explicit warning. This was especially visible because GitContribute includes a TUI and repeated human-facing commands such as
sync,search, anddossier.Implementation
terminal [not installed]with the exact installation command after MCP-only npx setup.internal/terminalinstalladapter.Setup continues to perform no GitHub access and never executes repository-controlled code. Client configuration is preflighted before the global npm mutation, and MCP registration occurs only after shared configuration and corpus initialization succeed.
End-to-end coverage
The new packaged npm tests build the native Go binary, pack and install the npm artifact in an isolated workspace, and exercise the public Node launcher through the native CLI. A fake isolated npm prefix prevents tests from touching the developer's real global installation.
Covered journeys:
Verification
go test ./...npm run test:npmnpm run test:e2enpm pack --dry-rungit diff --check