Skip to main content

citesync

python PyPI Python versions OpenSSF Scorecard license DOI

Status: experimental. It may change in ways that break your code, without notice.

Questions and bugs: see CONTRIBUTING.md.

citesync checks that your software's citation metadata says the same thing everywhere: CITATION.cff, codemeta.json, .zenodo.json and the package manifests (pyproject.toml, Cargo.toml, package.json). It can also rewrite the files so they agree. It knows where each field sits in each file from CodeMeta's crosswalks, as exported by codemeta-drift.

Usage

citesync compares eleven fields, from title to release date, with one file: the source. The source is CITATION.cff unless you pick another with --source. With neither, citesync exits 2. Use citesync through its command line and the pre-commit hook. Its Python modules are internal and may change in any release.

uv tool install citesync            # or run it once with uvx citesync check
citesync check                      # exit 0: no error finding; 1: an error finding; 2: citesync couldn't run
citesync check --source pyproject.toml
citesync write --diff               # print what write would change, and change nothing
citesync write                      # rewrite the other files to agree with the source
citesync init                       # write a CITATION.cff from codemeta.json, .zenodo.json and the manifests
citesync explain version-mismatch   # what a rule checks and how to fix it
citesync config                     # the config in use, and the file it came from
codemeta.json:3:3: error[version-mismatch] version: '2.0.0', CITATION.cff has '1.0.0'
  help: Make the file agree with the source, or the other way round if the source is wrong.
1 error, 0 warnings in 3 files
1 fixable with `citesync write`

A config is optional. A one-line citesync.toml is ignore = ["description-mismatch"].

citesync --help lists every command and option. The reference is in docs/:

Pre-commit hook

For prek or pre-commit, in .pre-commit-config.yaml:

repos:
  - repo: https://github.com/simonvanlierde/citesync
    rev: v0.2.0
    hooks:
      - id: citesync
      - id: citesync-write

The citesync hook runs when a commit changes one of the six metadata files or a citesync config, at any depth. It checks every file, not only the staged ones, and fails the commit on an error finding. The citesync-write hook runs only when you ask for it: prek run citesync-write --stage manual --all-files.

Development

You need uv and just.

uv sync
uv tool install prek   # once per machine
prek install           # git hooks

just lists the tasks. They mirror what .github/workflows/ runs.

just check       # lint, types and tests for every stack here
just fmt         # apply each stack's fixes and formatting
just hooks       # the git hooks, as the checks workflow runs them

just mutation mutation-tests the modules only_mutate lists under [tool.mutmut] in pyproject.toml. CI doesn't run it. It fails when the tests miss a change that tests/mutation-baseline.txt doesn't list. A change that can't alter behaviour goes in that file, with the reason. It also fails when the tests now catch a listed change, so drop that line.

uv locks only releases at least a week old. If just check fails on a newer security fix, add the package to exclude-newer-package under [tool.uv] in pyproject.toml, and remove it a week later (how).

Licence

See LICENSE.

Metadata

Release files for citesync 0.2.0

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

Source distribution (sdist)

Source distribution for citesync 0.2.0
File Size Uploaded Provenance Actions
citesync-0.2.0.tar.gz 59.6 kB With provenance Details for citesync-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for citesync 0.2.0
File Interpreter ABI Platform Actions
citesync-0.2.0-py3-none-any.whl Python 3 none any Details for citesync-0.2.0-py3-none-any.whl

Total release size: 123.3 kB

Release files / citesync-0.2.0.tar.gz

Download URL citesync-0.2.0.tar.gz
Size 59.6 kB
Tags Source
SHA-256 checksum
How to use checksums
787ddecda61b0b9fff3e7abf8659380f4be7dfb861b8696895729f7b4887b839
BLAKE2b-256 checksum
How to use checksums
d567039babf7ab6823ee17e2253eb87e0a59ffe470423b56baa4e5e4ada4cc9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / citesync-0.2.0-py3-none-any.whl

Download URL citesync-0.2.0-py3-none-any.whl
Size 63.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
365456ebf31ab0b57681fef376f9e229e419be3271dc84ba693e598c96e02996
BLAKE2b-256 checksum
How to use checksums
12ef4132ea41890a7b2f354ee4f0a1d6769cd6bfc6f8c17591149a808f4b4cf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for citesync 0.2.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for citesync-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

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.

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