Skip to content

Token

Exporting your stored access token

taibai token

Prints the stored OAuth access token for the active profile to stdout. The output is a plain token string with no extra formatting, suitable for piping or copying directly into a CI/CD secret store.

This is the value to use for the TAIBAI_ACCESS_TOKEN environment variable when running taibai in a headless environment such as Woodpecker CI, GitHub Actions, or any other automated pipeline.


CI/CD usage

The typical workflow is:

  1. Run taibai init locally to authenticate with your Fediverse instance.
  2. Run taibai token to retrieve the stored token.
  3. Copy the output into your CI/CD provider as a secret named taibai_access_token.
  4. Set taibai_instance_url to your instance URL (e.g. https://mastodon.social).

Once both secrets are in place, taibai commands will authenticate automatically using the environment variables — no config file or keyring access required.

Example Woodpecker step:

environment:
  TAIBAI_INSTANCE_URL:
    from_secret: taibai_instance_url
  TAIBAI_ACCESS_TOKEN:
    from_secret: taibai_access_token
commands:
  - uv run taibai thread Release-Notes.md

Options reference

Option Short Env Default Description
--profile -p TAIBAI_PROFILE default Profile whose token to print