dot.py is a minimalist python script for managing dotfiles via symbolic links.
Project description
dot.py
dot.py is a minimalist one-file python script for managing dotfiles via symbolic links. Inspired by bashdot, it supports multiple profiles and customizable file templates with variables. No external dependencies, just python 3.10+.
Quick Start
-
Install and run with
dot.pybelowpip install dot.py
or use uv
uvx --python 3.10 --from dot-py dot.py -h
or download the script directly and run with
~/dot.pybelowwget https://raw.githubusercontent.com/vincentqb/dot.py/main/dot.py -O ~/dot.py && chmod u+x ~/dot.py
-
Create your initial profile. For example, you can create a directory called
default.mkdir default -
Add any files you would like linked into your home when this profile is linked.
mv ~/.bashrc default/bashrc
-
Link the profile. When you link, dot.py prepends a dot, in front of the original file name, to the linked file. Below,
default/bashrcwill be linked to~/.bashrc.dot.py link default
-
You can safely re-run to link newly added files. Store this profile in a cloud drive or source control. Repeat for additional profiles.
Templates
Values which need to be set in a file when dot.py is run can be placed in a template.
-
Append
.templateto any files which should be rendered. For example, assume you have a filedefault/bashrc.templatecontaining:export SECRET_KEY=$ENV_SECRET_KEY
-
The rendered files will be created in the same directory, and have
.templatereplaced with.rendered. In the example, you can run the following to set the valueENV_SECRET_KEYwhen linking the default profile.env ENV_SECRET_KEY=test1234 dot.py link default
-
The rendered file will be linked into the home with the
.renderedsuffix removed and a dot prepended. In the example, this will result in the rendered filedefault/bashrc.renderedbeing created and linked to~/.bashrcwith the below contents.export SECRET_KEY=test1234
-
Be sure to include
**/*.renderedin.gitignoreif you put your dotfiles into a git repository.
Development
For linting, building and testing, see the workflow.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dot_py-1.6.0.tar.gz.
File metadata
- Download URL: dot_py-1.6.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09788f712418f42cc6c0df61d9e597bef8fd5dc50c0d92ac7cd0d33c0a631b5e
|
|
| MD5 |
f2d80e566f3a58450303506b68b5a7ab
|
|
| BLAKE2b-256 |
6707863eb6ce23f2ca98ff0a44a73086bc0521e23f1bde90642ac920840c81c2
|
File details
Details for the file dot_py-1.6.0-py3-none-any.whl.
File metadata
- Download URL: dot_py-1.6.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1df009656c0569700d981e51960f2eff5439f2598b0a3651015a66f1911eb2fe
|
|
| MD5 |
a59f2562dd008493d2dbb7945162da1a
|
|
| BLAKE2b-256 |
f3b2414aa7a406b4c169b45a3e06851d209da83b9e7d8c628ef3e2f11ff263db
|