···11+# `typst-localpkg`
22+This is a small tool that automates my development workflow for local typst packages.
33+44+In particular, it keeps a git repository under (the equivalent of) `~/.local/share/typst/packages/local/<name>`,
55+with one `git worktree` for each version, named as the version so that typst can pick it up,
66+as well as a symlink with the latest version as its name that points back to the directory,
77+so that you always get the latest development version when writing `#import "@local/<name>:<latest>"` in typst.
88+99+## Commands
1010+- `typst-localpkg new <name>`: Create a new local package with the given name.
1111+- `typst-localpkg path <name>`: Get the full path to the local package with the given name (in case you forgot, or need it for other automation)
1212+- `typst-localpkg bump <name> [--major|--patch]`: Increase the version of the local package with the given name.
1313+ This will create a new git tag for the latest version,
1414+ then increase said version by modifying the `typst.toml` and renaming the latest-version symlink,
1515+ and finally add a new `git worktree` for the previously latest version.
1616+1717+All commands support the `--package-path` option (also available via the `TYPST_PACKAGE_PATH` env variable),
1818+which works exactly like it does in `typst` to specify where to look instead of (the equivalent of) `~/.local/share/typst/packages`.
1919+2020+## Git
2121+By default, this program will invoke the `git` binary on your system.
2222+If `git` isn't found for some reason, you can use the `--git` option to specify where it is.
2323+2424+Alternatively, you can compile this program with the `git2` feature;
2525+Then, it will use `libgit2` instead of invoking `git`, so the `--git` option will have no effect.