Skip to main content

pinsync

Go Reference

Keep every copy of a pinned version in step with the one place that defines it.

A tool's version tends to be written in several places: a pre-commit hook's rev, uv== in another hook's additional_dependencies, the version input of a setup action in CI. Dependency bots bump one of them and the rest drift. pinsync gives each pin one source — a lockfile or a hook rev your bumper already updates — and rewrites every copy to match.

Install

From PyPI, as a prebuilt binary:

uv tool install pinsync

Or from source:

go install github.com/jmelahman/pinsync@latest

Binaries for each platform are also attached to every release.

Configuration

.config/pinsync/config.toml, at the root of the git repository:

# The version is the uv-pre-commit rev in the root .pre-commit-config.yaml,
# which `prek update` bumps.
[pins.uv]
source = "pre-commit"
repo = "https://github.com/astral-sh/uv-pre-commit"
action = "astral-sh/setup-uv"        # steps' `version` input follows it

# The version uv.lock locks git-orchard at.
[pins.git-orchard]
source = "uv.lock"
repo = "https://github.com/jmelahman/git-orchard"   # this hook's rev follows it

[pins.prek]
source = "uv.lock"
action = "j178/prek-action"
input = "prek-version"               # the input, when it isn't `version`

# A version nothing else defines.
[pins.shfmt]
version = "3.14.1"
package = "mvdan.cc/sh/v3/cmd/shfmt"

A pin's source is one of:

  • source = "uv.lock" — the version uv.lock, at the root, locks package at.
  • source = "pre-commit" — the tag in the # frozen: comment (or else the rev) of repo in the root .pre-commit-config.yaml.
  • version = "..." — the version itself.

Its copies, in every file git tracks:

  • Hook revs. The rev of repo in any .pre-commit-config.yaml, including one that is a bare list of repos, such as a git-orchard profile. A rev pinned to a commit needs a # frozen: <tag> comment, as prek update --freeze writes; pinsync rewrites both.
  • Hook dependencies. package==version (Python, by normalized name) and package@version (Go, npm) in any hook's additional_dependencies. package defaults to the pin's name.
  • Action inputs. input (default version) of any step that uses action, in .github/workflows/ and composite action.yml files. An input set by an expression is left alone.

A copy keeps its own spelling: a v prefix, quotes, and the comments and formatting around it.

Usage

pinsync check   # list the copies that differ from their pin; exit 1 if any
pinsync sync    # rewrite them; exit 1 if anything changed

check needs no network: it reads a rev's version from its # frozen: comment. sync looks up the commit of a rev's new tag with git ls-remote.

pre-commit

sync exits 1 when it changes a file, like a formatter:

repos:
  - repo: https://github.com/jmelahman/pinsync
    rev: v0.1.0
    hooks:
      - id: pinsync

Run it before anything that copies the files it rewrites, such as git-orchard's git-orchard-sync.

pinsync-check runs check instead: it fails without touching anything and needs no network, for CI or anywhere a hook shouldn't rewrite files.

      - id: pinsync-check

Metadata

Release files for pinsync 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pinsync 0.1.1
File Actions
pinsync-0.1.1-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for pinsync-0.1.1-py3-none-win_arm64.whl
pinsync-0.1.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pinsync-0.1.1-py3-none-win_amd64.whl
pinsync-0.1.1-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for pinsync-0.1.1-py3-none-manylinux_2_17_x86_64.whl
pinsync-0.1.1-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for pinsync-0.1.1-py3-none-manylinux_2_17_aarch64.whl
pinsync-0.1.1-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details for pinsync-0.1.1-py3-none-macosx_11_0_x86_64.whl
pinsync-0.1.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pinsync-0.1.1-py3-none-macosx_11_0_arm64.whl
pinsync-0.1.1-py3-none-any.whl Python 3 none any Details for pinsync-0.1.1-py3-none-any.whl

Total release size: 10.3 MB

Release files / pinsync-0.1.1-py3-none-win_arm64.whl

Download URL pinsync-0.1.1-py3-none-win_arm64.whl
Size 1.4 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
ce1baf65b144368d12e0f1255e8679b34b1a6a92d6233010b023219dc9d6e728
BLAKE2b-256 checksum
How to use checksums
8eb1574606f65087cb054d6b30a2a1de757f44e379405dab3ba961dd5cbd15e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pinsync-0.1.1-py3-none-win_amd64.whl

Download URL pinsync-0.1.1-py3-none-win_amd64.whl
Size 1.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
969111f5f829b2aa263c2f774634de25e81f44199b67cd5495a0fa1d32c6068a
BLAKE2b-256 checksum
How to use checksums
9e640fa34ca62d5a81904ec3bb90360c2597a076b6afcb84f4a5511a0ef1b752
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pinsync-0.1.1-py3-none-manylinux_2_17_x86_64.whl

Download URL pinsync-0.1.1-py3-none-manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
23025bedbacd9b1d6d908908b556daafeb54b072e3ad933db417d18668f6a2b3
BLAKE2b-256 checksum
How to use checksums
6294d049cc1c555766d1b2bd5ad205eb80226d669e2dd835e76319403fedf417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pinsync-0.1.1-py3-none-manylinux_2_17_aarch64.whl

Download URL pinsync-0.1.1-py3-none-manylinux_2_17_aarch64.whl
Size 1.4 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
0586ab22db689d3f67d8cf5c135c3f3cbc468a229620ce4db7b6249b71048463
BLAKE2b-256 checksum
How to use checksums
b6f910216323dc890709f56841be72b73e451682dddfd3c9f5fa008bbb837f48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pinsync-0.1.1-py3-none-macosx_11_0_x86_64.whl

Download URL pinsync-0.1.1-py3-none-macosx_11_0_x86_64.whl
Size 1.5 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
06e12926b5af02c56a40c12bf8446ae441c5724d8682755745fd2d39e10c8aa6
BLAKE2b-256 checksum
How to use checksums
4522c7ada582d6cccacf5a02fb48883eca48f396b4099ba983d4a78cec5bf636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pinsync-0.1.1-py3-none-macosx_11_0_arm64.whl

Download URL pinsync-0.1.1-py3-none-macosx_11_0_arm64.whl
Size 1.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6a912dc17a61684cb0bf6d275e151bb3fcdf9bcc45c5fb5606a80025aebad0f7
BLAKE2b-256 checksum
How to use checksums
b44211cabf8e32cbd68c5f54d6abb131f6633ae4e2374a3506571078931a4dec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pinsync-0.1.1-py3-none-any.whl

Download URL pinsync-0.1.1-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
252e690784eb310ce5f2e410afa6c482368b10814a8f3e545229664f7b727791
BLAKE2b-256 checksum
How to use checksums
493d661df8ea2045b9e2ddfdeff8d2ceda8a39bb2a5396cb59c1384af93d7e36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pinsync 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

7 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page