import { createClient } from '@edgible-team/sdk';
// Zero-config: prod, credentials from env or the shared CLI login.
const client = createClient();
// Explicit stage + credentials (e.g. CI):
const ci = createClient({
env: 'dev',
credentials: { type: 'token', accessToken: process.env.EDGIBLE_TOKEN! },
});
const me = await client.auth.me();
Create an
EdgibleClient(Node build). With no config it targets prod and resolves credentials through the provider chain: explicitcredentials→ environment (EDGIBLE_TOKEN, orEDGIBLE_API_KEY+EDGIBLE_API_SECRET) → the CLI's credential file → instance metadata on managed devices. Credential resolution is lazy — failures surface as anAuthenticationErroron the first authenticated call, not here.