Skip to main content
Glama

CTX: Context as Code (CaC) tool

by context-hub
MIT License
235
  • Apple
  • Linux
DotEnvVariableProvider.php873 B
<?php declare(strict_types=1); namespace Butschster\ContextGenerator\Lib\Variable\Provider; use Dotenv\Dotenv; use Dotenv\Repository\RepositoryInterface; final readonly class DotEnvVariableProvider implements VariableProviderInterface { private RepositoryInterface $repository; public function __construct( RepositoryInterface $repository, private ?string $rootPath = null, private ?string $envFileName = null, ) { if ($this->rootPath) { $dotenv = Dotenv::create($repository, $this->rootPath, $this->envFileName); $dotenv->load(); } $this->repository = $repository; } public function has(string $name): bool { return $this->repository->has($name); } public function get(string $name): ?string { return $this->repository->get($name); } }

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