https://github.com/dob9601/jointhedots
A simple git-based dotfile manager written entirely in Rust!
https://github.com/dob9601/jointhedots
dotfiles dotfiles-management dotfiles-manager rust
Last synced: about 1 year ago
JSON representation
A simple git-based dotfile manager written entirely in Rust!
- Host: GitHub
- URL: https://github.com/dob9601/jointhedots
- Owner: dob9601
- License: mit
- Created: 2021-12-20T17:44:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-07T11:02:33.000Z (about 4 years ago)
- Last Synced: 2025-03-28T01:37:29.048Z (over 1 year ago)
- Topics: dotfiles, dotfiles-management, dotfiles-manager, rust
- Language: Rust
- Homepage:
- Size: 263 KB
- Stars: 55
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jointhedots
[](https://github.com/dob9601/jointhedots/actions/workflows/release.yml)
[](https://github.com/dob9601/jointhedots/actions/workflows/test.yml)
[](https://makeapullrequest.com)
[](https://codecov.io/gh/dob9601/jointhedots)

```
jointhedots
A simple git-based dotfile manager written entirely in Rust!
USAGE:
jtd
OPTIONS:
-h, --help Print help information
SUBCOMMANDS:
help Print this message or the help of the given subcommand(s)
install Install a specified JTD repository
interactive Interactively install dotfiles
sync Sync the currently installed JTD repository with the provided remote repo.
```
## Contents
- [About](#about)
- [Roadmap](#roadmap)
- [Installation](#installation)
- [Configuration](#configuration)
- [Example Manifest](#example-manifest)
- [FAQ](#faq)
## About

jointhedots works by reading a "jtd.yaml" manifest file located within your dotfile repository. The manifest contains a mapping of file to installed location (amongst other things), allowing for JTD to automatically install configurations. `pre_install` and `post_install` commands can also be specified, allowing for additional control over installation.
jtd also allows for pushing your dotfiles back to the remote repo and resolves merges via git. It's also possible to avoid all prompts for input. This, combined with the fact that jtd is deterministic, makes it very suitable for for use in scripts.
These install steps are designed so that they will run once on your first install, store a hash of the steps run and then only run if the hash differs (i.e. you have modified your config with new install steps).
*WARNING:* Be very careful about installing dotfiles via untrusted manifests. The pre\_install and post\_install blocks allow for (potentially malicious) code execution**. JTD will prompt you to confirm you trust a manifest if it contains install steps.
## Roadmap
| Feature | Implemented | Notes |
| :--- | :---: | :--- |
| Sync local changes to dotfiles with remote repo | ✔ | |
| Interactive mode | ✔ | |
| Selectively install only some dotfiles | ✔ | |
| JSON Schema for manifest files | ✔ | |
| Host latest version somewhere that can be curled | ✔ | `jtd.danielobr.ie` |
| Selectively sync only some dotfile changes | ✔ | |
| Use `git2` as opposed to `Command::new("git")` | ✔ | |
| Ability to specify which manifest to use in (multiple manifest support) | ✔ | |
| Support for non-GitHub/GitLab repos | | |
| Ability to manually specify commit message for JTD sync | ✔ | |
| More detailed default commit messages for JTD sync (list the changed files) | ✔ | |
| Abort syncing if no changes are present in files | ✔ | |
| Don't allow `jtd install` if dotfiles are behind remote main (prompt user to sync) | ✔ | |
## Installation
### Manual
Grab the latest version [here](https://github.com/dob9601/jointhedots/releases/latest/download/jtd) (for x86-64, more targets on the way!)
### Cargo
Install via cargo:
```sh
cargo install jointhedots
```
### Curl (one-time use)
Use the following 1 liner to 1-off run JTD to install your dotfiles
```sh
curl -sL jtd.danielobr.ie | sh
```
## Configuration
JTDs default behaviour can be overridden using the `.config` key. Currently supported configuration:
| Configuration key | Usage | Default |
| :--- | :--- | :---: |
| `commit_prefix` | String to prefix commits with | 🔁 |
| `squash_commits` | Whether to squash commits when syncing multiple dotfiles | `true` |
## Example Manifest
An example manifest file is shown below:
```yaml
nvim:
pre_install:
- mkdir -p ~/Applications
- curl -sL -o /tmp/nvim.tar.gz https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
- tar -xvf /tmp/nvim.tar.gz -C ~/Applications
- rm /tmp/nvim.tar.gz
- ln -rfs ~/Applications/nvim-linux64/bin/nvim ~/.local/bin/vim
file: init.vim
target: ~/.config/nvim/init.vim
kitty:
file: kitty.conf
target: ~/.config/kitty/kitty.conf
kitty-theme:
file: theme.conf
target: ~/.config/kitty/theme.conf
fish:
file: config.fish
target: ~/.config/fish/config.fish
post_install:
- git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
- ~/.fzf/install --all
```
The manifest file should be located in the root of the repository and called "jtd.yaml".
A JSON Schema for the manifest is available [here](https://github.com/dob9601/jointhedots/blob/master/src/dotfile_schema.json). This can be used in conjunction with certain plugins to provide language server support for jtd manifests.
## FAQ
*Q: The different platforms I use require differing installation steps, can I target multiple platforms?*
**A: Yes! You can write a different manifest for each platform and specify the manifest to use with the `--manifest` flag**
*Q: Can jointhedots handle secrets*
**A: Yes, you could store your secrets as encrypted files in the repository along with a `post_install` step to decrypt them, I'd advise against doing this in a public dotfile repository though.**