Skip to content

About

Keep Penpot designs in a Git repository

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

penpot-git

penpot-git

Keeps your Penpot designs in a Git repository.

Install · Configuration · Restore · Security · Contributing


The panel after a commit, with the result, a message field, a Commit now button and earlier commits

What is penpot-git?

A small service that exports every Penpot file you can edit, commits what changed and pushes it. It runs on a schedule, or when you press a button in its Penpot plugin panel.

It holds designs only. For accounts, teams, comments and fonts as well, use penpot-backup.

Note

This is new. It is written against the Penpot 2.19 source and tested with a stand-in for Penpot's API, and has not yet been tested against a live Penpot server.

See what changed

Each design becomes a folder of formatted JSON with one file per shape. A commit shows which shapes changed and how.

Repository layout

 {
   "fills": [
     {
-      "fillColor": "#1E40AF",
+      "fillColor": "#1D4ED8",
       "fillOpacity": 1
     }
   ],
git checkout 6678ff7
penpot-git pack \
  designs/team/project/name--id \
  restored.penpot

Go back to any version

Rebuild a .penpot file from any commit and import it into Penpot. It is added as a new file, so nothing is replaced.

Restore a design

Commit from Penpot, or on a schedule

Open the panel inside Penpot, say what changed and press a button. It also runs daily or at an interval. If you don't want the panel, run one sync from the command line.

Install

penpot-git sync "Use the new brand blue"
4 files, commit 6c5afef, pushed

Features

Designs

  • Every project the token's owner can edit
  • Shared libraries included
  • Images kept as they are
  • Files deleted in Penpot leave the next commit and stay in history

Git

  • HTTPS token or SSH key
  • Never force pushes
  • Keeps other people's commits
  • Only writes designs/
  • Works without a remote

Safe runs

  • A failed export keeps the last version
  • Stops if Penpot lists no files
  • Pushes commits left by a failed push
  • One run at a time, stopped if it hangs

Panel

  • Penpot plugin with no Penpot permissions
  • Commit now, with a message
  • Last result and next run
  • Latest 30 commits
  • Light and dark

Security

  • Secrets read from files only
  • Penpot token sent only to your Penpot
  • Blocks password guessing
  • Checks SSH host keys
  • Rejects unsafe archives

Running it

  • One Go program that uses your Git
  • Docker image that runs as a normal user
  • Read-only container
  • Daily time or interval

Built with

Go Git Docker

Quick start

Requires Docker, Penpot 2.12 or newer with access tokens enabled, and a private Git repository. Follow Install for the secrets and addresses, then:

git clone https://github.com/mpge/penpot-git
cd penpot-git
docker compose up -d --build

Serve port 8090 over HTTPS on its own subdomain, and add https://your-subdomain/manifest.json in Penpot's plugin manager.

Learn more

Set up Install · Configuration
Use Restore a design · Security
Work on it Contributing

penpot-git is not affiliated with Penpot.

License

penpot-git is open-source software licensed under the MIT license.

About

Keep Penpot designs in a Git repository

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages