Skip to content
fakturownia-auth logo

Auth

fakturownia-auth

Fakturownia CLI auth: persist, inspect, and remove profiles and API tokens with `fakturownia auth ...`.

SKILL.md

Full skill instructions

Auto-generated by go run ./​cmd/​gen-skills. Do not edit manually.

Auth

PREREQUISITE: Read fakturownia-shared first.

Use This Skill When

  • You need to save a profile, exchange login credentials for an API token, verify which profile is active, or clean up a persisted token.
  • You need to explain or troubleshoot how env vars, profiles, credential-store-backed secrets, and sanitized secret-handling resolve.

Covered Commands

  • fakturownia auth login — Persist a Fakturownia profile and API token
  • fakturownia auth exchange — Exchange login credentials for account metadata and an API token when available
  • fakturownia auth status — Show the resolved authentication state
  • fakturownia auth logout — Remove a persisted profile and token

Notable Flags

  • --url: Explicit HTTPS account URL
  • --prefix: Account prefix such as acme
  • --api-token (required): Fakturownia API token
  • --set-default (default false): Make the saved profile the default selection
  • --login (required): Login or email address
  • --password (required): Account password
  • --integration-token: Integration token for partner API login
  • --save-as: Override the saved profile name; defaults to the returned prefix
  • --yes (required, default false): Confirm profile removal

Environment

  • FAKTUROWNIA_PROFILE: Select a profile unless --profile is provided
  • FAKTUROWNIA_URL: Override the base account URL from any profile
  • FAKTUROWNIA_API_TOKEN: Override the API token from any profile

Credential Exchange

  • Use fakturownia auth exchange --login ... --password ... --json to exchange login credentials for account metadata and an API token when the upstream account has one.
  • Structured output is sanitized and reports api_token_present instead of exposing the token directly.
  • Use --raw only when you explicitly need the exact upstream login response, including secrets.
  • By default, auth exchange stores the returned token under the returned prefix; add --save-as to override the saved profile name.

Examples

fakturownia auth login --prefix acme --api-token $FAKTUROWNIA_API_TOKEN
fakturownia auth login --url https://acme.fakturownia.pl --api-token TOKEN --profile work --set-default
fakturownia auth exchange --login [email protected] --password secret --json
fakturownia auth exchange --login [email protected] --password secret --integration-token PARTNER_TOKEN
fakturownia auth exchange --login [email protected] --password secret --save-as work --raw
fakturownia auth status
fakturownia auth status --json
fakturownia auth logout --profile work --yes

Related Skills