nerd-zero / infisical-php
Infisical client for php
0.0.3
2025-05-10 19:28 UTC
Requires
- guzzlehttp/guzzle: ^7.9
- guzzlehttp/guzzle-services: ^1.4
README
A PHP client library for interacting with the Infisical secrets management platform. This package allows developers to programmatically fetch and manage secrets stored in Infisical within their PHP applications.
โ ๏ธ Warning: This project is still a work in progress. APIs, features, and usage may change at any time without notice. Please use with caution and pin versions accordingly if used in production.
๐ฆ Installation
Install via Composer:
composer require nerd-zero/infisical-php
๐ Table of Contents
๐ Introduction
This is a PHP client to connect to the Infisical Secrets Management API with minimal setup and ease of use.
๐ง Features
- Easy to use
- No need to manually generate or fetch tokens โ handled internally
- Only requires the Infisical base URI
- Automatic JSON encoding/decoding
- Works with clean associative arrays and native PHP data
๐งช How to Use
use Infisical\InfisicalClient; $client = InfisicalClient::factory( baseUri: 'your-infisical-base-uri', clientId: 'your-infisical-client-id', clientSecret: 'your-infisical-client-secret', ); // Get all secrets $secrets = $client->listSecrets([ 'workspaceId' => 'your-workspace-id', 'environment' => 'your-environment', 'path' => 'your-path', ]);
โ๏ธ Customization
(Coming soon โ details on middleware, request retries, logging, and more.)
๐ Supported Endpoints
๐ Authentication Management
Description | Function Name | Supported |
---|---|---|
โ | โ | โ |
(Functions will be documented soon.)
๐ Folder Management
Description | Function Name | Supported |
---|---|---|
List folders | listFolders() |
โ๏ธ |
Get by ID | getFolderById() |
โ๏ธ |
Create folder | createFolder() |
โ๏ธ |
Update folder | updateFolder() |
โ๏ธ |
Delete folder | deleteFolder() |
โ๏ธ |
๐ Secret Management
Description | Function Name | Supported |
---|---|---|
List secrets | listSecrets() |
โ๏ธ |
Create secret | createSecret() |
โ๏ธ |
Get by name | retrieveSecret() |
โ๏ธ |
Update secret | updateSecret() |
โ๏ธ |
Delete secret | deleteSecret() |
โ๏ธ |
Bulk Create Secrets | bulkCreateSecrets() |
โ๏ธ |
Bulk Update Secrets | bulkUpdateSecrets() |
โ๏ธ |
Bulk Delete Secrets | bulkDeleteSecrets() |
โ๏ธ |
Attach tags | attachTags() |
โ๏ธ |
Detach tags | detachTags() |
โ๏ธ |