fix: Use bare codegraph everywhere, add preuninstall cleanup

- Revert configs (MCP, hooks) to use bare `codegraph` command
- Remove all npx references from configs and messaging
- Add preuninstall script that runs on `npm uninstall -g` to clean up
  MCP server, permissions, hooks, and CLAUDE.md section
- Show uninstall instructions in post-install next steps
This commit is contained in:
Colby McHenry
2026-02-19 15:46:34 -06:00
parent 88e1f2df7f
commit 67f60b9b2f
5 changed files with 168 additions and 24 deletions
+4 -4
View File
@@ -98,13 +98,13 @@ function writeJsonFile(filePath: string, data: Record<string, any>): void {
}
/**
* Get the MCP server configuration — always uses npx for reliability
* Get the MCP server configuration
*/
function getMcpServerConfig(): Record<string, any> {
return {
type: 'stdio',
command: 'npx',
args: ['@colbymchenry/codegraph', 'serve', '--mcp'],
command: 'codegraph',
args: ['serve', '--mcp'],
};
}
@@ -203,7 +203,7 @@ export function hasPermissions(location: InstallLocation): boolean {
* Stop → sync-if-dirty (sync, ensures fresh index before next user turn)
*/
function getHooksConfig(): Record<string, any> {
const command = 'npx @colbymchenry/codegraph';
const command = 'codegraph';
return {
PostToolUse: [