Docs
TypeScript SDK
Call the Eanvi API from Node.js and TypeScript with @eanvi/sdk.
TypeScript SDK
@eanvi/sdk is the official TypeScript client used by the CLI and available for your own services.
Install
npm install @eanvi/sdk
See Installation and Usage.
Quick example
import { createClient } from '@eanvi/sdk';
const client = createClient({ apiKey: 'eanvi_sk_...' });
const secrets = await client.secrets.list('my-app', 'production');
const { secrets: values } = await client.cli.pull({
project: 'my-app',
environment: 'production',
});
Resources
| Resource | Capability |
|---|---|
organizations | List/create/update orgs |
projects | Project CRUD |
environments | Environment CRUD |
secrets | Secrets, versions, import/export |
auditLogs | Organization audit events |
apiKeys | Create/list/revoke keys |
cli | Login, pull, push, sync, diff, whoami |
Configuration
createClient({
apiKey: process.env.EANVI_API_KEY,
});
The client targets the hosted Eanvi service by default. Pass only your API key from Settings.