CLI

Run Buron from CI

Run the Buron CLI in GitHub Actions and other CI pipelines to keep Buron in sync with what your codebase ships.

The other place teams run the CLI is from CI, usually to keep Buron in sync with what's happening in the codebase. A common setup is snapshotting your changelog or release notes when something ships, so the Agent has the latest context the next time someone asks. Other teams use it to publish reports on a schedule, or to mirror docs from one place to another.

You can run the CLI on whichever CI provider you use. The only thing that's different from local is how you sign in.

Get a CI token

In Buron, go to Settings, then API tokens, and create a new token for CI. Give it a name you'll recognize later, and copy the value somewhere safe. You won't be able to see it again.

Treat your CI token like a password. Add it as a secret in your CI provider, and never paste it into a commit, log, or pull request.

Sign in with the token

Set the token as the BURON_TOKEN environment variable, and the CLI will use it instead of trying to open a browser. From your CI job:

export BURON_TOKEN="your-ci-token"

Once it's set, every buron command in that job runs as your team.

Scaffold a GitHub Actions workflow

If you're using GitHub Actions, Buron can set up a workflow for you. From your project folder, run:

buron setup-ci

We'll create a starter file at .github/workflows/buron.yml that you can edit to match what you want to automate.

A workflow you can copy

Here's a small example that snapshots your CHANGELOG.md to Buron every time you push to main:

name: Buron snapshot

on:
  push:
    branches: [main]

jobs:
  snapshot:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm install -g @buron/cli
      - run: buron file write /snapshots/$(date +%Y-%m-%d).md --from-file CHANGELOG.md
        env:
          BURON_TOKEN: ${{ secrets.BURON_TOKEN }}

The pattern is the same on any CI provider. Install the CLI, set BURON_TOKEN, then run whatever Buron commands you'd like.

Was this page helpful?

On this page