@edgible-team/sdk
    Preparing search index...

    Function createClient

    • Create an EdgibleClient (Node build). With no config it targets prod and resolves credentials through the provider chain: explicit credentials → environment (EDGIBLE_TOKEN, or EDGIBLE_API_KEY + EDGIBLE_API_SECRET) → the CLI's credential file → instance metadata on managed devices. Credential resolution is lazy — failures surface as an AuthenticationError on the first authenticated call, not here.

      Parameters

      Returns EdgibleClient

      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();