Metadata-Version: 2.4
Name: typst-pkg-sync
Version: 0.2.2
Summary: Sync tagged Typst packages from GitHub, GitLab, and Codeberg
Author: Jan-Philipp Reßler
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.14
Project-URL: Repository, https://codeberg.org/ressler/typst-pkg-sync
Project-URL: Issues, https://codeberg.org/ressler/typst-pkg-sync/issues
Description-Content-Type: text/markdown

# typst-pkg-sync

typst-pkg-sync downloads tagged Typst packages from GitHub, GitLab (including
self-hosted instances), and Codeberg, then installs them in the local Typst
package directory.

Requires Python 3.14 or newer. typst-pkg-sync has no runtime third-party dependencies.

## Install

After typst-pkg-sync is published to PyPI, install it as a user tool with:

```sh
uv tool install typst-pkg-sync
```

To install from a local checkout while developing typst-pkg-sync:

```sh
uv tool install .
```

## Configure

On its first run, typst-pkg-sync creates `~/.config/typst-pkg-sync/config.toml`
and exits. Edit the file to add repositories, then run `typst-pkg-sync` again.
Alternatively, select a config file explicitly:

```sh
typst-pkg-sync --config /path/to/config.toml
```

See the [example configuration](https://codeberg.org/ressler/typst-pkg-sync/src/branch/main/config_example.toml)
for examples, including a self-hosted GitLab repository. GitLab entries can
set `base_url` and an optional `token_env` per repository.

Packages are installed under:

```text
<base_dir>/<namespace>/<package-name>/<version>/
```

The package name is read from `typst.toml` in the downloaded archive. A `v`
prefix on a tag is removed from the installed version directory.

## Development

Run the sample configuration with `just run` and the code-quality checks with
`just check`.

To release a new version run the recipes `publish` and `tag`. See what they do
before running them.

typst-pkg-sync is licensed under MIT; see [LICENSE](LICENSE).
