Skip to content

feat(cli): add gitnexus uninstall command#114

Closed
gentritbiba wants to merge 1 commit into
abhigyanpatwari:mainfrom
gentritbiba:feat/uninstall-command
Closed

feat(cli): add gitnexus uninstall command#114
gentritbiba wants to merge 1 commit into
abhigyanpatwari:mainfrom
gentritbiba:feat/uninstall-command

Conversation

@gentritbiba

@gentritbiba gentritbiba commented Feb 28, 2026

Copy link
Copy Markdown

Summary

  • Adds gitnexus uninstall command that fully reverses both setup and analyze
  • Removes per-repo artifacts: .gitnexus/ index, GitNexus sections from AGENTS.md/CLAUDE.md (preserving user content), .claude/skills/gitnexus/, registry entries
  • Removes global artifacts (--global): Cursor/OpenCode MCP configs, Claude Code MCP (claude mcp remove), hooks from both settings.json and hooks.json, hook scripts, skills across all editors (Claude/Cursor/OpenCode), ~/.gitnexus/ directory
  • Combined mode (--all): removes both per-repo and global
  • Executes by default; --dry-run for preview only
  • Cross-platform: uses os.homedir() + path.join() throughout, Windows-aware

Usage

gitnexus uninstall                # remove per-repo artifacts
gitnexus uninstall --global       # remove global editor configs
gitnexus uninstall --all          # remove everything
gitnexus uninstall --dry-run      # preview what would be removed

Test plan

  • gitnexus uninstall --help shows correct options
  • gitnexus uninstall --dry-run shows per-repo preview
  • gitnexus uninstall --dry-run --global shows global preview
  • gitnexus uninstall --dry-run --all shows combined preview
  • TypeScript compiles cleanly (tsc)
  • gitnexus uninstall removes per-repo artifacts
  • gitnexus uninstall --global removes global artifacts
  • gitnexus uninstall --all removes everything

Closes #112

…d analyze

GitNexus had no way to completely remove itself from a repo or system.
`gitnexus clean` only deleted the .gitnexus/ index directory but left
behind MCP configs, hooks, skills, CLAUDE.md/AGENTS.md sections, and
global state across all editors.

The new `uninstall` command reverses everything:
- Per-repo: .gitnexus/ index, GitNexus sections from AGENTS.md/CLAUDE.md
  (preserving user content), .claude/skills/gitnexus/, registry entry
- Global (--global): Cursor/OpenCode MCP configs, Claude Code MCP,
  hooks from settings.json and hooks.json, hook scripts, skills across
  all editors (Claude/Cursor/OpenCode), ~/.gitnexus/ directory
- Combined (--all): both per-repo and global

Executes by default; use --dry-run for preview.

Closes abhigyanpatwari#112
@vercel

vercel Bot commented Feb 28, 2026

Copy link
Copy Markdown

@gentritbiba is attempting to deploy a commit to the NexusCore Team on Vercel.

A member of the Team first needs to authorize it.

@magyargergo

Copy link
Copy Markdown
Collaborator

⚠️ Upcoming Prettier formatting — rebase instructions

PR #563 adds Prettier as the code formatter for the repo. When it merges, the bulk format commit will touch ~350 files (style-only: whitespace, quotes, trailing commas). Your branch will likely conflict.

After #563 merges, rebase your branch:

git fetch origin
git checkout <your-branch>
git rebase origin/main

# Conflicts will be formatting-only — accept your version:
git checkout --theirs .
git add .
git rebase --continue

# Then re-format your branch to match the new style:
npx prettier --write .
git add -A
git commit -m "style: apply prettier formatting"
git push --force-with-lease

New setup step: Run npm install at the repo root (not just in gitnexus/) to get prettier + activate the pre-commit hook. The hook auto-formats staged files on every commit going forward.

@magyargergo

Copy link
Copy Markdown
Collaborator

Please submit a new PR if this is still relevant

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.

Add gitnexus uninstall command to fully reverse setup + analyze

2 participants