### Install ShadowGit MCP Server Source: https://github.com/blade47/shadowgit-mcp/blob/main/TESTING.md Installs the MCP server globally using npm and verifies the installation. Use `npm install -g` for global installation. ```bash npm install -g shadowgit-mcp-server ``` ```bash shadowgit-mcp-server --version ``` ```bash shadowgit-mcp-server ``` -------------------------------- ### Install shadowgit-mcp-server Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Install the shadowgit-mcp-server globally using npm. ```bash npm install -g shadowgit-mcp-server ``` -------------------------------- ### Install Dependencies Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Install project dependencies using npm. This command should be run after cloning the repository. ```bash npm install ``` -------------------------------- ### Complete AI Workflow Example Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Demonstrates the full lifecycle of an AI-assisted task from listing repositories to ending the session. ```javascript // 1. First, check available repositories const repos = await shadowgit.list_repos() // Returns: [{ name: "my-app", path: "/Users/dev/projects/my-app" }] // 2. Examine recent history to understand context await shadowgit.git_command({ repo: "my-app", command: "log --oneline -5" }) // 3. Start session BEFORE making any code changes const session = await shadowgit.start_session({ repo: "my-app", description: "Refactoring authentication module" }) // session.sessionId = "mcp-client-1234567890" // 4. Make your code changes... // ... (edit files, fix bugs, add features using other tools) ... // 5. Create a checkpoint after completing the task const commit = await shadowgit.checkpoint({ repo: "my-app", title: "Refactor authentication module", message: "Simplified login flow and added better error handling for edge cases", author: "Claude" }) // commit.commitHash = "abc1234" // 6. End the session when done to resume auto-commits await shadowgit.end_session({ sessionId: session.sessionId, commitHash: commit.commitHash }) ``` -------------------------------- ### Install shadowgit-mcp-server Globally Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Install the package globally using npm. The command will then be available in your system's PATH. ```bash npm install -g shadowgit-mcp-server ``` ```bash shadowgit-mcp-server --version ``` -------------------------------- ### Clone ShadowGit MCP Server Repository Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Clone the private GitHub repository to start development. This command requires Git to be installed and access to the repository. ```bash git clone https://github.com/shadowgit/shadowgit-mcp-server.git ``` -------------------------------- ### Check shadowgit-mcp-server Version Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Quick command to verify the installed version of the shadowgit-mcp-server. ```bash shadowgit-mcp-server --version ``` -------------------------------- ### Verify Git Installation Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Run this command to check if Git is installed on your system. Ensure Git is installed for repository operations. ```bash git --version ``` -------------------------------- ### Run Development Mode Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Start the project in development mode, allowing direct TypeScript execution. ```bash npm run dev ``` -------------------------------- ### Complete ShadowGit workflow Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Demonstrates the full lifecycle of a session, including listing repositories, starting a session, executing commands, checkpointing, and ending the session. ```javascript // 1. First, check available repositories const repos = await shadowgit.list_repos() // 2. Start session BEFORE making changes const sessionId = await shadowgit.start_session({ repo: "my-app", description: "Refactoring authentication module" }) // 3. Examine recent history await shadowgit.git_command({ repo: "my-app", command: "log --oneline -5" }) // 4. Make your changes to the code... // ... (edit files, fix bugs, etc.) ... // 5. IMPORTANT: Create a checkpoint after completing the task const commitHash = await shadowgit.checkpoint({ repo: "my-app", title: "Refactor authentication module", message: "Simplified login flow and added better error handling", author: "Claude" }) // 6. End the session when done await shadowgit.end_session({ sessionId: sessionId, commitHash: commitHash // Optional but recommended }) ``` -------------------------------- ### start_session Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Starts an AI work session, pausing ShadowGit's auto-commit feature to allow for grouped, clean commits. ```APIDOC ## start_session ### Description Starts an AI work session using the Session API. This pauses ShadowGit's auto-commit feature, allowing you to make multiple changes that will be grouped into a single clean commit. ### Parameters #### Request Body - **repo** (string) - Required - The name of the repository. - **description** (string) - Required - A description of the work session. ### Request Example { "repo": "my-app", "description": "Fixing authentication bug" } ### Response #### Success Response (200) - **sessionId** (string) - The ID of the started session. ``` -------------------------------- ### Handle Repository Not Found Error in ShadowGit Source: https://context7.com/blade47/shadowgit-mcp/llms.txt This example demonstrates how ShadowGit handles requests for non-existent repositories, providing a list of available repositories. ```javascript await shadowgit.git_command({ repo: "unknown-repo", command: "log" }) // Error: Repository 'unknown-repo' not found. // Available repositories: // - my-app: /Users/dev/projects/my-app ``` -------------------------------- ### start_session Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Starts an AI work session to pause auto-commits. ```APIDOC ## start_session ### Description Starts an AI work session using the Session API. This pauses ShadowGit's auto-commit feature, allowing you to make multiple changes that will be grouped into a single clean commit. ### Request Body - **repo** (string) - Required - The name of the repository. - **description** (string) - Required - A description of the work session. ### Request Example { "repo": "my-app", "description": "Fixing authentication bug in login flow" } ### Response #### Success Response (200) - **sessionId** (string) - The unique ID for the session. - **message** (string) - Status message. ``` -------------------------------- ### Set Environment Variables for ShadowGit MCP Server Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Configure server behavior using environment variables such as timeout, Session API URL, log level, and hint display. Example shows setting a 30-second timeout, enabling debug logging, and disabling workflow banners. ```bash export SHADOWGIT_TIMEOUT=30000 # 30 second timeout export SHADOWGIT_LOG_LEVEL=debug # Enable debug logging export SHADOWGIT_HINTS=0 # Disable workflow banners for cleaner output ``` -------------------------------- ### Start AI Work Session with Session API Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Initiate an AI work session using the `start_session` command. This pauses ShadowGit's auto-commit feature, allowing for grouped changes into a single commit. Requires ShadowGit version >= 0.3.0. ```javascript const result = await shadowgit.start_session({ repo: "my-app", description: "Fixing authentication bug" }) // Returns: Session ID (e.g., "mcp-client-1234567890") ``` -------------------------------- ### Start Work Session Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Initiate a session to pause auto-commits and group multiple changes into a single commit. Call this before modifying code. ```javascript // Start a work session before making changes const result = await shadowgit.start_session({ repo: "my-app", description: "Fixing authentication bug in login flow" }) // Returns session ID for later use: // { // "sessionId": "mcp-client-1234567890", // "message": "Session started successfully." // } // Example with different task descriptions await shadowgit.start_session({ repo: "backend-api", description: "Refactoring database queries for performance" }) await shadowgit.start_session({ repo: "my-app", description: "Adding dark mode toggle feature" }) ``` -------------------------------- ### Check npm Package Version Source: https://github.com/blade47/shadowgit-mcp/blob/main/TESTING.md Use this command to check the globally installed version of the shadowgit-mcp-server npm package. This is useful for troubleshooting. ```shell npm list -g shadowgit-mcp-server ``` -------------------------------- ### Handle No Changes to Commit Error in ShadowGit Source: https://context7.com/blade47/shadowgit-mcp/llms.txt This example illustrates the error returned when attempting to create a commit with no detected changes in the repository. ```javascript await shadowgit.checkpoint({ repo: "my-app", title: "No changes" }) // Error: No Changes Detected - Repository has no changes to commit. ``` -------------------------------- ### Execute Read-Only Git Commands Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Execute read-only git commands on a specified repository using `git_command`. Examples include viewing recent commits, checking file changes, and finding who last modified a specific line. ```javascript // View recent commits await shadowgit.git_command({ repo: "my-project", command: "log --oneline -10" }) // Check what changed recently await shadowgit.git_command({ repo: "my-project", command: "diff HEAD~5 HEAD --stat" }) // Find who changed a specific line await shadowgit.git_command({ repo: "my-project", command: "blame src/auth.ts" }) ``` -------------------------------- ### Build, Test, and Publish to npm Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Steps to build the project, run tests, and publish updates to the npm registry. ```bash npm run build ``` ```bash npm test ``` ```bash npm publish ``` -------------------------------- ### Perform a Production Build Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Create a single optimized bundle for production using esbuild. The output is approximately 93KB and includes all dependencies. ```bash npm run build ``` -------------------------------- ### Clone and Build shadowgit-mcp-server Locally Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Clone the repository and build the project locally for development. 'npm link' makes it available globally for testing. ```bash git clone https://github.com/shadowgit/shadowgit-mcp-server.git ``` ```bash cd shadowgit-mcp-server ``` ```bash npm install ``` ```bash npm run build ``` ```bash npm link ``` -------------------------------- ### Execute Directly on Windows Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Use this command to run the bundled server directly on Windows if the global command is not working. ```bash node dist/shadowgit-mcp-server.js ``` -------------------------------- ### Run Tests Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Execute the test suite for the project. ```bash npm test ``` -------------------------------- ### List ShadowGit Repositories Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Use the `list_repos` command to retrieve a list of all repositories tracked by ShadowGit. ```javascript await shadowgit.list_repos() ``` -------------------------------- ### list_repos Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Lists all available ShadowGit-tracked repositories. ```APIDOC ## list_repos ### Description Lists all available ShadowGit-tracked repositories. This should be called first to discover which repositories are available for git operations and session management. ### Response #### Success Response (200) - **repositories** (array) - List of repository objects containing 'name' and 'path'. #### Response Example { "repositories": [ { "name": "my-app", "path": "/Users/dev/projects/my-app" }, { "name": "backend-api", "path": "/Users/dev/projects/backend-api" } ] } ``` -------------------------------- ### Configure MCP Server for Claude Desktop Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Add this JSON configuration to 'claude_desktop_config.json' to integrate shadowgit-mcp-server. ```json { "mcpServers": { "shadowgit": { "command": "shadowgit-mcp-server" } } } ``` -------------------------------- ### Compare Activity Across Projects Source: https://github.com/blade47/shadowgit-mcp/blob/main/TESTING.md Use this command to query activity across all your projects for a specific day. Ensure the server is configured to access multiple repositories. ```shell User: "Compare activity across all my projects today" ``` -------------------------------- ### List Repositories Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Retrieve a list of all ShadowGit-tracked repositories to identify available targets for git operations. ```javascript // List all available repositories const repos = await shadowgit.list_repos() // Example response: // { // "repositories": [ // { "name": "my-app", "path": "/Users/dev/projects/my-app" }, // { "name": "backend-api", "path": "/Users/dev/projects/backend-api" } // ] // } ``` -------------------------------- ### Make Executable (Unix) Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Grant execute permissions to the bundled JavaScript file on Unix-like systems. ```bash chmod +x dist/shadowgit-mcp-server.js ``` -------------------------------- ### Configure MCP Server for Direct Execution Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Use this JSON configuration for direct execution of the bundled server, specifying the command and arguments. ```json { "mcpServers": { "shadowgit": { "command": "node", "args": ["/path/to/shadowgit-mcp-server/dist/shadowgit-mcp-server.js"] } } } ``` -------------------------------- ### Expected MCP Commands Source: https://github.com/blade47/shadowgit-mcp/blob/main/TESTING.md Illustrates the expected JavaScript commands Claude uses to interact with the ShadowGit MCP server for various Git operations. ```javascript // List repositories shadowgit.list_repos() ``` ```javascript // Query git history shadowgit.git({ repo: "repository-name", command: "log --oneline -10" }) ``` ```javascript // Check status shadowgit.git({ repo: "repository-name", command: "status" }) ``` ```javascript // View diffs shadowgit.git({ repo: "repository-name", command: "diff HEAD~1 HEAD" }) ``` -------------------------------- ### Set Environment Variables Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Configure server behavior such as timeouts, API URLs, and logging levels using environment variables. ```bash # Set command execution timeout (default: 10000ms) export SHADOWGIT_TIMEOUT=30000 # Set Session API URL (default: http://localhost:45289/api) export SHADOWGIT_SESSION_API=http://localhost:45289/api # Set log level: debug, info, warn, error (default: info) export SHADOWGIT_LOG_LEVEL=debug # Disable workflow hints in output (default: enabled) export SHADOWGIT_HINTS=0 ``` -------------------------------- ### Publish ShadowGit MCP Server to npm Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Publish the updated ShadowGit MCP server package to the public npm registry. Ensure the project is built and tested before publishing. ```bash npm publish ``` -------------------------------- ### Analyze multiple repositories Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Iterates through all available repositories to perform a cross-project analysis. ```javascript // Compare activity across projects const repos = await shadowgit.list_repos() for (const repo of repos) { await shadowgit.git_command({ repo: repo.name, command: "log --since='1 day ago' --oneline" }) } ``` -------------------------------- ### Configure MCP Server in Claude Code Source: https://github.com/blade47/shadowgit-mcp/blob/main/TESTING.md Adds the ShadowGit MCP server to Claude Code and verifies the configuration. Use `claude mcp add` to register the server. ```bash claude mcp add shadowgit -- shadowgit-mcp-server ``` ```bash claude mcp list ``` ```bash claude mcp get shadowgit ``` -------------------------------- ### Troubleshooting: Reinstall MCP Server with Sudo Source: https://github.com/blade47/shadowgit-mcp/blob/main/TESTING.md Reinstalls the MCP server globally using npm with sudo to resolve permission errors. This is useful if you encounter 'EACCES' errors. ```bash npm uninstall -g shadowgit-mcp-server ``` ```bash sudo npm install -g shadowgit-mcp-server ``` -------------------------------- ### list_repos Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Retrieves a list of all repositories currently tracked by the ShadowGit application. ```APIDOC ## list_repos ### Description Lists all ShadowGit-tracked repositories. ### Request Example await shadowgit.list_repos() ``` -------------------------------- ### Handle Missing Required Parameters in ShadowGit Source: https://context7.com/blade47/shadowgit-mcp/llms.txt This snippet shows the error response when required parameters, such as 'repo' and 'title' for a checkpoint, are missing. ```javascript await shadowgit.checkpoint({ repo: "my-app" }) // Error: Both 'repo' and 'title' parameters are required. ``` -------------------------------- ### Create a checkpoint commit Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Saves work by creating a commit with a title, message, and author. The author defaults to 'AI Assistant' if not provided. ```javascript // After fixing a bug const result = await shadowgit.checkpoint({ repo: "my-app", title: "Fix null pointer exception in auth", message: "Added null check before accessing user object", author: "Claude" }) // Returns formatted commit details including the commit hash // After adding a feature await shadowgit.checkpoint({ repo: "my-app", title: "Add dark mode toggle", message: "Implemented theme switching using CSS variables and localStorage persistence", author: "GPT-4" }) // Minimal usage (author defaults to "AI Assistant") await shadowgit.checkpoint({ repo: "my-app", title: "Update dependencies" }) ``` -------------------------------- ### Update npm Package Source: https://github.com/blade47/shadowgit-mcp/blob/main/TESTING.md Run this command to update the shadowgit-mcp-server npm package to the latest version. This can resolve issues with older versions. ```shell npm update -g shadowgit-mcp-server ``` -------------------------------- ### POST /git_command Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Executes a git command on a repository, subject to security restrictions. ```APIDOC ## POST /git_command ### Description Executes a git command. Only read-only commands are allowed (e.g., log, diff, status). Dangerous arguments and commands are blocked. ### Request Body - **repo** (string) - Required - The repository name. - **command** (string) - Required - The git command to execute. ``` -------------------------------- ### Create a Git Checkpoint Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Creates a commit for changes made during an AI session. Titles must be 50 characters or less and messages must be 1000 characters or less. ```javascript // Create a checkpoint after fixing a bug const result = await shadowgit.checkpoint({ repo: "my-app", title: "Fix null pointer exception in auth", message: "Added null check before accessing user object in the login handler", author: "Claude" }) // Returns commit details: // { // "success": true, // "commitHash": "abc1234", // "summary": "1 file changed, 5 insertions(+), 2 deletions(-)" // } // Minimal usage - author defaults to "AI Assistant" await shadowgit.checkpoint({ repo: "my-app", title: "Update dependencies" }) // With different AI identifiers await shadowgit.checkpoint({ repo: "my-app", title: "Add dark mode toggle", message: "Implemented theme switching using CSS variables and localStorage persistence", author: "GPT-4" }) // Note: Title must be 50 characters or less // Note: Message must be 1000 characters or less ``` -------------------------------- ### POST /checkpoint Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Creates a git commit with current changes. This should be called after completing work but before ending the session. ```APIDOC ## POST /checkpoint ### Description Creates a git commit with your changes. The commit is attributed to the AI assistant. ### Request Body - **repo** (string) - Required - The name of the repository. - **title** (string) - Required - Commit title (max 50 characters). - **message** (string) - Optional - Commit message (max 1000 characters). - **author** (string) - Optional - The author of the commit (defaults to "AI Assistant"). ### Response #### Success Response (200) - **success** (boolean) - Indicates if the commit was successful. - **commitHash** (string) - The hash of the created commit. - **summary** (string) - Summary of changes (files changed, insertions, deletions). ``` -------------------------------- ### Clean Build Artifacts Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Command to remove generated build artifacts. ```bash npm run clean ``` -------------------------------- ### Add shadowgit to Claude Code Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Add the shadowgit MCP server to Claude Code. Ensure to restart Claude Code for the changes to take effect. ```bash # Add to Claude Code claude mcp add shadowgit -- shadowgit-mcp-server # Restart Claude Code to load the server ``` -------------------------------- ### Execute Git Commands Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Run read-only git commands on a specified repository. Destructive commands are blocked for security. ```javascript // View recent commits await shadowgit.git_command({ repo: "my-app", command: "log --oneline -10" }) // Check current status await shadowgit.git_command({ repo: "my-app", command: "status" }) // View diff of recent changes await shadowgit.git_command({ repo: "my-app", command: "diff HEAD~5 HEAD --stat" }) // Find who changed a specific line await shadowgit.git_command({ repo: "my-app", command: "blame src/auth.ts" }) // View changes since a specific time await shadowgit.git_command({ repo: "my-app", command: "log --since='1 hour ago' --oneline" }) // Trace evolution of a function await shadowgit.git_command({ repo: "my-app", command: "log -L :functionName:src/file.ts" }) ``` -------------------------------- ### Troubleshooting: Re-add MCP Server Source: https://github.com/blade47/shadowgit-mcp/blob/main/TESTING.md Removes and re-adds the ShadowGit MCP server to troubleshoot access issues. This can resolve problems where Claude cannot find the server. ```bash claude mcp remove shadowgit ``` ```bash claude mcp add shadowgit -- shadowgit-mcp-server ``` -------------------------------- ### git_command Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Executes read-only git commands on a specified repository. ```APIDOC ## git_command ### Description Executes read-only git commands on a specific repository. ### Parameters #### Request Body - **repo** (string) - Required - The name of the repository. - **command** (string) - Required - The git command to execute. ### Request Example { "repo": "my-project", "command": "log --oneline -10" } ``` -------------------------------- ### git_command Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Executes read-only git commands on a specified repository. ```APIDOC ## git_command ### Description Executes read-only git commands on a ShadowGit repository. Only safe, read-only commands are allowed (e.g., log, show, diff, status). ### Request Body - **repo** (string) - Required - The name of the repository. - **command** (string) - Required - The git command to execute. ### Request Example { "repo": "my-app", "command": "log --oneline -10" } ``` -------------------------------- ### Security Model and Command Restrictions Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Defines allowed git commands and blocked arguments to prevent unauthorized repository access or dangerous operations. ```javascript // Allowed read-only commands (SAFE_COMMANDS) const allowedCommands = [ 'log', 'show', 'diff', 'status', 'describe', 'rev-parse', 'ls-files', 'ls-tree', 'cat-file', 'show-branch', 'shortlog', 'rev-list', 'blame' ] // Blocked dangerous arguments const blockedArgs = [ '--upload-pack', '--receive-pack', '--exec', '-c', '--config', // Block config overrides '--git-dir', '--work-tree', // Block repository override '-C', '-e' // Block directory change and -e flag ] // These commands will fail with security errors: await shadowgit.git_command({ repo: "my-app", command: "push origin main" }) // Error: Command 'push' is not allowed. await shadowgit.git_command({ repo: "my-app", command: "log --exec=malicious" }) // Error: Command contains potentially dangerous arguments. // Only ShadowGit repositories (with .shadowgit.git directory) can be accessed await shadowgit.git_command({ repo: "/etc/passwd", command: "log" }) // Error: Not a ShadowGit repository. ``` -------------------------------- ### Handle Command Timeout in ShadowGit Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Shows the error message when a git command exceeds the default timeout period of 10 seconds. ```javascript await shadowgit.git_command({ repo: "my-app", command: "log --all" }) // Error: Command timed out after 10000ms. ``` -------------------------------- ### checkpoint Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Creates a checkpoint commit to save work within a repository. ```APIDOC ## checkpoint ### Description Creates a checkpoint commit to save your work. ### Parameters #### Request Body - **repo** (string) - Required - Repository name or full path - **title** (string) - Required - Short commit title (max 50 characters) - **message** (string) - Optional - Detailed description of changes - **author** (string) - Optional - Your identifier (defaults to "AI Assistant") ### Request Example { "repo": "my-app", "title": "Fix null pointer exception", "message": "Added null check", "author": "Claude" } ### Response - **commitHash** (string) - The hash of the created commit ``` -------------------------------- ### Update Project Version Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Increment the project version using npm. Use 'patch', 'minor', or 'major' as needed. ```bash npm version patch ``` -------------------------------- ### Disable Workflow Hints Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Set the SHADOWGIT_HINTS environment variable to 0 to disable verbose workflow banners. This provides cleaner output for programmatic use. ```bash export SHADOWGIT_HINTS=0 ``` -------------------------------- ### Trace code evolution Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Uses git log to track changes to a specific function within a file. ```javascript // See how a function evolved await shadowgit.git_command({ repo: "my-app", command: "log -L :functionName:src/file.ts" }) ``` -------------------------------- ### Commit Changes Request Source: https://github.com/blade47/shadowgit-mcp/blob/main/TESTING.md This user input should be rejected if the server is in read-only mode. The server will explain the reason for rejection. ```shell User: "Can you commit these changes?" ``` -------------------------------- ### POST /end_session Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Ends the AI work session and resumes auto-commit functionality. ```APIDOC ## POST /end_session ### Description Ends the AI work session via the Session API. Must be called after creating a checkpoint to properly close the work session. ### Request Body - **sessionId** (string) - Required - The ID of the session to end. - **commitHash** (string) - Optional - The commit hash from the checkpoint result. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the session ended successfully. - **message** (string) - Confirmation message. ``` -------------------------------- ### Update Package Version with npm Source: https://github.com/blade47/shadowgit-mcp/blob/main/DEPLOYMENT.md Increment the package version using npm commands for bug fixes, new features, or breaking changes. ```bash npm version patch ``` ```bash npm version minor ``` ```bash npm version major ``` -------------------------------- ### end_session Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Ends the AI work session and resumes auto-commit functionality. ```APIDOC ## end_session ### Description Ends the AI work session via the Session API. This resumes ShadowGit's auto-commit functionality for regular development. ### Parameters #### Request Body - **sessionId** (string) - Required - The ID of the session to end - **commitHash** (string) - Optional - The commit hash from the checkpoint result ### Request Example { "sessionId": "mcp-client-1234567890", "commitHash": "abc1234" } ``` -------------------------------- ### Debug recent changes Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Retrieves a log of recent commits within a specific timeframe. ```javascript // Find what broke in the last hour await shadowgit.git_command({ repo: "my-app", command: "log --since='1 hour ago' --oneline" }) ``` -------------------------------- ### End an AI Work Session Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Closes the session and resumes auto-commit functionality. Should be called after a checkpoint. ```javascript // End session after successful checkpoint await shadowgit.end_session({ sessionId: "mcp-client-1234567890", commitHash: "abc1234" // Optional: from checkpoint result }) // Returns: // { // "success": true, // "message": "Session mcp-client-1234567890 ended successfully." // } // End session without commit hash (if commit failed or was not needed) await shadowgit.end_session({ sessionId: "mcp-client-1234567890" }) ``` -------------------------------- ### End an AI work session Source: https://github.com/blade47/shadowgit-mcp/blob/main/README.md Terminates the current session and resumes auto-commit functionality. ```javascript await shadowgit.end_session({ sessionId: "mcp-client-1234567890", commitHash: "abc1234" // Optional: from checkpoint result }) ``` -------------------------------- ### Handle Long Title Error in ShadowGit Checkpoint Source: https://context7.com/blade47/shadowgit-mcp/llms.txt Demonstrates the error message when a commit title exceeds the maximum allowed character limit. ```javascript await shadowgit.checkpoint({ repo: "my-app", title: "This title is way too long and exceeds the maximum allowed character limit" }) // Error: Title must be 50 characters or less (current: 75 chars). ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.