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 autoupdate` 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. A rev pinned to a commit needs a # frozen: <tag> comment, as prek autoupdate --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.0

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.0
File Actions
pinsync-0.1.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for pinsync-0.1.0-py3-none-win_arm64.whl
pinsync-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pinsync-0.1.0-py3-none-win_amd64.whl
pinsync-0.1.0-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for pinsync-0.1.0-py3-none-manylinux_2_17_x86_64.whl
pinsync-0.1.0-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for pinsync-0.1.0-py3-none-manylinux_2_17_aarch64.whl
pinsync-0.1.0-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details for pinsync-0.1.0-py3-none-macosx_11_0_x86_64.whl
pinsync-0.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pinsync-0.1.0-py3-none-macosx_11_0_arm64.whl
pinsync-0.1.0-py3-none-any.whl Python 3 none any Details for pinsync-0.1.0-py3-none-any.whl

Total release size: 10.3 MB

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

Download URL pinsync-0.1.0-py3-none-win_arm64.whl
Size 1.4 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
1c31c3b8ce6d4149e1f091dbba748a08b47cebf72fa28aeb4ceecad62237c6b5
BLAKE2b-256 checksum
How to use checksums
0a747a6e1bb26e12ee406befd1ccaa4c0ace83a49c68d47bbce9ba0e0947ec3e
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":"24.04","id":"noble","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.0-py3-none-win_amd64.whl

Download URL pinsync-0.1.0-py3-none-win_amd64.whl
Size 1.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
60aaed2a278bf73da49d63d14fa530a51504a2e1316805f52d247b7e4876958a
BLAKE2b-256 checksum
How to use checksums
aba0316f7970191e843fa105305c4669bd30a57287c9debb6801943e3b4c8992
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":"24.04","id":"noble","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.0-py3-none-manylinux_2_17_x86_64.whl

Download URL pinsync-0.1.0-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
d83cfa84576c69011cb45a8b7262cd7c2b9c2008933465e98b47c3750a27d7db
BLAKE2b-256 checksum
How to use checksums
492697496778c2a6816612e1b0ee0d7893f43e46b8fe464df6fa4bc95d71851d
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":"24.04","id":"noble","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.0-py3-none-manylinux_2_17_aarch64.whl

Download URL pinsync-0.1.0-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
9ab78c7eb75e86f8cf2d68f246ee68071d9c20d5e5907cf5aa89a9cff15182be
BLAKE2b-256 checksum
How to use checksums
a934d7f54758d6da7e983d53b7849e57fd5b525c684c6fbd235551183f3aaafd
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":"24.04","id":"noble","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.0-py3-none-macosx_11_0_x86_64.whl

Download URL pinsync-0.1.0-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
4964e6b55cdb5648d0c65076c402df61ac5d39393ec02abf94efb7b9f8d01492
BLAKE2b-256 checksum
How to use checksums
076ddf9365fd06771ea446a3d53093a2c9fbbe8f72e1316e5d4a1f4c275dfa6d
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":"24.04","id":"noble","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.0-py3-none-macosx_11_0_arm64.whl

Download URL pinsync-0.1.0-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
7e4531f3739ac65fedfa4dafbafa0a8123bbb3dd2d69b88bcbdc7ebc2e61f760
BLAKE2b-256 checksum
How to use checksums
45a635fbf6d387557e829c2728838cc5b6900ec73d657b15de9e4b67d42563b0
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":"24.04","id":"noble","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.0-py3-none-any.whl

Download URL pinsync-0.1.0-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9296560ca33e11e5ef37df8acd37411f2c9448880b5e575af7cf33300006d5c7
BLAKE2b-256 checksum
How to use checksums
93ce41939dced9a7246fa46bf2ef5eeab918e1d80791ab1e703840eac6285556
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":"24.04","id":"noble","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.0

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.0 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