Skip to content

Saturn 🪐🤖

Create, modify or delete files across many repositories in parallel.

Use cases

  • Onboard repositories to CI workflows.
  • Keep files in sync across repositories.
  • Automate code rewrites.

Features

  • Create or delete files.
  • Insert, replace or delete lines in files.
  • Filter which repositories to modify.
  • Automatic creation of pull requests.
  • Support for GitHub, GitLab and Forgejo.
  • Automatically merge pull requests if all checks have passed and all approvals have been given.

Quickstart

Requirements:

  • Saturn installed.
  • An access token for GitHub or GitLab.

Create the file hello-world.yaml:

hello-world.yaml
# yaml-language-server: $schema=https://saturn-bot.readthedocs.io/en/latest/schemas/task.schema.json
name: "Saturn Hello World"
prTitle: "Saturn Hello World"
prBody: |
  Saturn Quickstart.

  This pull request creates the file `hello-world.txt`.

# Repository filters allow targeting specific repositories.
repositories:
  - host: codeberg.org # Replace with your host
    owner: saturn-sync # Replace with your owner
    name: saturn-example # Replace with your repository

# Define one or more commands to modify each repository.
script:
  - echo "Hello World" > hello-world.txt

Run Saturn:

GitHub

SATURN_GITHUBTOKEN=<token> saturn run hello-world.yaml

GitLab

SATURN_GITLABTOKEN=<token> saturn run hello-world.yaml

Forgejo

SATURN_FORGEJOADDRESS=https://<forgejo>/api/v1 \
SATURN_FORGEJOTOKEN=<token> \
saturn run hello-world.yaml