dot-tools
A grab bag of small scripts I use to keep my dotfiles and projects in shape. Nothing fancy — just the stuff I got tired of rewriting.
Install it however you prefer (pip install dot-tools, uv tool install dot-tools, etc.)
and you'll get the commands below on your PATH.
What's in the box
traefik_run
Spins up a local Traefik via docker-compose. Pass extra args after --.
traefik_run # up -d
traefik_run -- ps -a
traefik_run -- down
handle_envrc
Keeps .envrc files synced across machines through a shared folder
(set ENVRC_HOME, defaults to ~/.keys/envrc).
handle_envrc migrate moves storage from the old location (--old, defaults to
~/Yandex.Disk/home/envrc) to ENVRC_HOME, re-points all symlinks under --root
(default: ~/devel) and re-approves them with direnv allow.
If the local .envrc isn't a symlink yet, it moves it into the shared dir
and replaces it with a link. If a shared one exists but the link is missing, it restores it.
handle_envrc
add_dot_files
Drops common project boilerplate into the current directory:
.editorconfig, pyproject.toml, .pre-commit-config.yaml, .yamllint, .projectile.
With --install it also runs pre-commit install (via uv run when available),
because the config alone does nothing until the hook exists.
add_dot_files
add_dot_files --install
Generated files carry a first-line stamp naming the template version they came from.
--update three-way merges newer template versions into files that already exist,
so project-specific edits survive. Template changes that collide with a project edit keep
the project version by default and are printed, so nothing disappears silently.
Files created before stamps existed get their base version detected by similarity.
For pyproject.toml structural rules run on top of the line merge: dev dependency
floors the template raised are raised, dev dependencies and keys new in the template are added.
The result is validated before writing (TOML parses, YAML parses, pre-commit hooks stay under
the right repo); a file whose merge fails validation, that carries unresolved conflict markers,
or that does not look generated from the template at all is left untouched and reported.
add_dot_files --update --dry-run # show what would change
add_dot_files --update # apply, conflicts keep the project version
add_dot_files --update --conflicts markers # leave diff3 markers to resolve by hand
Maintainers: add_dot_files --dump-history materialises every committed template version
under dot_tools/templates/history (a pre-commit hook in this repo keeps it current).
cpuniq
Copy (or move) files into a directory without clobbering. If the name is taken and the content differs, it appends a short uuid suffix.
cpuniq photo.jpg ~/pictures/
cpuniq -m mv *.log ~/archive/
release.py
Bumps the version, tags, builds and uploads. Mostly for this repo's own release flow.
release.py master
release.py -v 1.2.3 master
License
MIT.
Metadata
Release files for dot-tools 1.12.0
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 | |
|---|---|---|---|---|
| dot_tools-1.12.0.tar.gz | 47.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dot_tools-1.12.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 87.9 kB
Release files / dot_tools-1.12.0.tar.gz
| Download URL | dot_tools-1.12.0.tar.gz |
|---|---|
| Size | 47.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4dfd1914f477374d1c1f7c8cfc901fa8d83e4c73a8b1ac5a30d07f961a7efb21
|
|
BLAKE2b-256 checksum How to use checksums |
bf004b05287ee40b3e376951d81197da4e57cd1f966298240fe5aa26407f5f49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / dot_tools-1.12.0-py2.py3-none-any.whl
| Download URL | dot_tools-1.12.0-py2.py3-none-any.whl |
|---|---|
| Size | 40.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3e767d2672456d712219fef6ad0d97745bcaaf660bf74deae01d6b94c6dda978
|
|
BLAKE2b-256 checksum How to use checksums |
3fe345815ac94b99c09d4234b5a1dd0626f6aa3547c08051e111f2570d75d0b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for dot-tools 1.12.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.