Assumer CI and Automation

CI and automation

Run Assumer non-interactively in scripts and CI with assumer run, authenticate with a console token, and limit what the agent may do with permissions.

Run a task without the UI

assumer run "fix the failing unit tests in packages/api"

assumer run performs a single task and exits, so it fits in scripts, Git hooks and CI jobs.

Authenticate in CI

Interactive assumer login isn’t possible in CI. Provide a token through the environment instead:

export ASSUMER_CONSOLE_TOKEN=***   # store it as a CI secret

Lock down permissions

In automation, nobody is there to approve prompts. Allow exactly the commands the job needs and deny the rest:

export ASSUMER_PERMISSION='{"edit":"allow","bash":{"npm test*":"allow","*":"deny"},"webfetch":"deny"}'

Example: a CI step

- name: Ask Assumer to fix lint errors
  env:
    ASSUMER_CONSOLE_TOKEN: ${{ secrets.ASSUMER_CONSOLE_TOKEN }}
  run: |
    npm i -g @4born-solutions/assumer
    assumer run "fix all eslint errors without changing behaviour"
    git diff --stat

Always review the resulting diff, or open it as a pull request, before merging.