FyVault

FyVault.auto()

Zero-config client initialization. Automatically detects the best available credentials so you never hardcode tokens.

Usage

Node.js

import { FyVault } from "@fyvault/sdk";

// Detects credentials automatically
const fv = FyVault.auto();

const secret = await fv.secrets.getValueByName("DATABASE_URL");

Python

from fyvault import FyVault

fv = FyVault.auto()

secret = fv.secrets.get_value_by_name("DATABASE_URL")

Priority chain

auto() checks these sources in order, using the first valid credential found:

  1. 1Agent credential token (FYVAULT_AGENT_TOKEN)
  2. 2Environment variables (FYVAULT_API_KEY + FYVAULT_ORG_ID)
  3. 3OIDC token exchange (for CI/CD environments)
  4. 4Platform detection (see supported platforms below)

Supported platforms

Vercel
Netlify
AWS Lambda
Google Cloud Run
Azure Functions
Fly.io
Railway
Render
GitHub Actions
GitLab CI
CircleCI

On these platforms, auto()uses the platform's native identity (OIDC tokens, instance metadata) to authenticate without any manual configuration.

Explicit overrides

You can pass options to override specific parts of auto-detection:

// Node.js — force a specific org
const fv = FyVault.auto({ orgId: "org_acme" });

# Python — force a specific org
fv = FyVault.auto(org_id="org_acme")

See also: Agent Credentials, Python SDK, Session Tokens