nerd-zero/infisical-php

Infisical client for php

0.0.3 2025-05-10 19:28 UTC

This package is auto-updated.

Last update: 2025-05-11 18:10:39 UTC


README

by nerd-zero โ€“ n0.rocks

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

  1. Easy to use
  2. No need to manually generate or fetch tokens โ€” handled internally
  3. Only requires the Infisical base URI
  4. Automatic JSON encoding/decoding
  5. 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() โœ”๏ธ