Getting started with Eraserbot

What is Eraserbot?

Eraserbot helps you generate and maintain up-to-date diagrams based on your codebase as it evolves. It allows you to visualize infrastructure, system architecture, data models, API flows, application logic, and more, ensuring that your diagrams always stay in sync with your latest changes.

Prerequisites

There are two requirements to use Eraserbot:

  • Eraser must have access to your GitHub repo (install GitHub app)
    • Only GitHub is supported at the moment. GitLab and Azure DevOps support coming soon.
  • Usage-based pricing must be enabled

Setting up a monitor

  1. On the Eraserbot page, click "New monitor"
  2. Fill out necessary information including the diagram prompt and generate the diagram
  3. (Optional) Adjust the prompt or files used and re-generate the diagram as necessary.
  4. (Optional) Click the "Edit" button and directly change the diagram syntax as necessary.
  5. Click "Save monitor"

Open PRs

  1. When a PR is opened, if there are any monitors that are monitoring files that were edited in the PR, Eraserbot will leave a comment of the updated diagram on the PR within 1-2 minutes.
    1. If a PR changes monitored files but are not relevant to the diagram, it will not update the diagram but still leave a comment (no credits are consumed in this case).
  2. (Optional) If the user wants to make additional changes on top of the diagram generated by Eraserbot, the user can do the following:
    1. Open the monitor either via the Eraserbot page or the monitor link in the PR
    2. Click on "Open PRs" and select the relevant PR (in case there are multiple open PRs)
    3. Click "Edit" to change the diagram syntax, and then "Done"
    4. Click "Save diagram to PR"
    5. This will add a history item to the PR history
  3. (Optional) After the PR is opened, if there are subsequent commits that require the diagram to be re-drawn, the user can trigger a regeneration by doing the following:
    1. Open the monitor either via the Eraserbot page or the monitor link in the PR
    2. Click on "Open PRs" and select the relevant PR (in case there are multiple open PRs)
    3. Click "Regenerate"
    4. Once completed (can take ~1 minute) a history item will be added to the PR history
  4. When a PR is merged, the monitor's diagram will be updated.
    1. Previous versions of the monitor can be viewed by clicking on "History" of the monitor.

Editing a monitor

  1. On the Eraserbot page, select an existing monitor.
  2. Click "Edit"
  3. You can change any of the below:
    1. Diagram prompt
    2. Files monitored
    3. Diagram syntax
  4. (Optional) Depending on what you changed in the previous step, you may want to re-generate the diagram
  5. Click "Save monitor"

Monitor history

Previous versions of the monitor can be viewed by:

  1. On the Eraserbot page, select a monitor.
  2. Click on "History"

Billing

During the creation of a monitor, Premium AI credits are consumed in each generation attempt.

After a monitor is opened, Premium API credits are consumed. Credits are consumed only when a diagram is created either because a PR is opened and it contains code changes that require a diagram update or when the user manually re-generates a diagram in relation to an open PR. Usage-based pricing must be turned on.