Dotpkg
A package manager for your dotfiles.
Why Dotpkg?
- Lightweight: Pure Python 3.10 with no dependencies
- JSON-configurable: Easy to write, includes a schema for code completion
- Cross-platform: Runs on Linux, macOS and Windows
- Flexible: Configurable target locations, ignore lists, rename rules and more
Usage
First make sure to have Python 3.10+ installed. To create a dotfile package, set up a folder with the following layout (the top-level folder is assumed to be some folder, e.g. a Git repo, where you store all of your dotfiles):
dotfiles
└─my-package
├─dotpkg.json
├─.some-dotfile-one
├─.some-dotfile-two
...
A minimal dotpkg.json is structured as follows:
{
"name": "my-package",
"description": "Description of my package"
}
Navigating into dotfiles and running dotpkg install my-package will then symlink .some-dotfile-one and .some-dotfile-two into your home directory.
Note that when running on Windows, unprivileged users might not be able to create symlinks, a feature that
dotpkgrelies on. EnablingDeveloper Modein your Windows Settings (from an administrator account) will permit this. Also, you may need to substitutepython3 [path/to/dotpkg]fordotpkgsince Windows does not support Unix-style shebangs.
Optionally, you can specify keys such as requiresOnPath too, which will only install the package if a given binary is found on your PATH (useful if your config targets some application). Additionally, targetDir configures the search path to symlink the files into some other directory than your home (dotpkg will use the first directory that exists, this is useful to cross-platform packages).
For example, a package that manages configurations for Visual Studio Code could look like this:
{
"name": "vscode",
"description": "Visual Studio Code settings and keybindings",
"requiresOnPath": ["code"],
"targetDir": [
"${home}/.config/Code",
"${home}/Library/Application Support/Code",
"${home}/AppData/Roaming/Code"
]
}
A full JSON schema for the dotpkg.json manifests can be found here.
Note that you can add the schema to your VSCode settings to get autocompletion in
dotpkg.jsonfiles by specifyingjson.schemas:
{
"json.schemas": [
{
"fileMatch": ["dotpkg.json"],
"url": "https://raw.githubusercontent.com/fwcd/dotpkg/main/dotpkg.schema.json"
}
]
}
Alternatively, you can specify the schema individually in each dotpkg.json:
{
"$schema": "https://raw.githubusercontent.com/fwcd/dotpkg/main/dotpkg.schema.json"
}
Metadata
Release files for dotpkg 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dotpkg-0.2.1.tar.gz | 18.1 kB | Without provenance | Details for dotpkg-0.2.1.tar.gz |
Release files / dotpkg-0.2.1.tar.gz
| Download URL | dotpkg-0.2.1.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f0cdcc41cda03857a44b768cd32ebdb21764ebe787e12c30573d98a8a9cf446
|
|
BLAKE2b-256 checksum How to use checksums |
60eb62232d2f585448c2338b77e5eef15d501fb2892e9f88ed668e1e38ba043f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for dotpkg 0.2.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.