Skip to main content
Glama

CTX: Context as Code (CaC) tool

by context-hub
MIT License
235
  • Apple
  • Linux
CommandsExecutorInterface.php1.23 kB
<?php declare(strict_types=1); namespace Butschster\ContextGenerator\Lib\Git; use Butschster\ContextGenerator\Lib\Git\Exception\GitCommandException; /** * Comprehensive interface for executing Git commands and operations. */ interface CommandsExecutorInterface { /** * Execute a Git command and return the output as a string. * * @param Command $command Git command to execute * @return string Command output as a string * @throws GitCommandException If the command execution fails */ public function executeString(Command $command): string; /** * Check if a directory is a valid Git repository. * * @param string $repository Path to the Git repository * @return bool True if the directory is a valid Git repository */ public function isValidRepository(string $repository): bool; /** * Applies a git patch to a file. * * @param string $filePath Path to the file to patch * @param string $patchContent Content of the patch to apply * @return string Result message * @throws GitCommandException If the patch application fails */ public function applyPatch(string $filePath, string $patchContent): string; }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/context-hub/generator'

If you have feedback or need assistance with the MCP directory API, please join our Discord server