| Crates.io | dotstrap |
| lib.rs | dotstrap |
| version | 0.1.0+a326cba |
| created_at | 2025-10-21 16:32:41.931213+00 |
| updated_at | 2025-10-21 16:32:41.931213+00 |
| description | Template-driven dotfiles bootstrapper for macOS |
| homepage | https://github.com/Kakise/dotstrap |
| repository | https://github.com/Kakise/dotstrap |
| max_upload_size | |
| id | 1894090 |
| size | 93,460 |
dotstrap is a Rust-powered bootstrapper that turns a repository of templated
dotfiles into a reproducible macOS setup. It renders templates, decrypts
secrets sourced from your environment or filesystem, links the results into
your home directory, and installs the Homebrew packages declared alongside
those templates.
{{secrets.token}}).~/.dotstrap/generated and then
linked into the home directory with automatic backups for pre-existing files.brew taps, formulae, and casks in version
control and install them in one run.cargo install dotstrap --git https://github.com/Kakise/dotstrap.git
src/application/ – orchestrates the end-to-end workflow and exposes run.src/CLI/ – CLI definition built with clap::Parser.src/config/ – strongly typed manifest and Homebrew loaders.src/infrastructure/ – integrations for commands, repositories, and secrets.src/services/ – reusable operations such as rendering, linking, and brew installation.src/errors.rs – shared error enums returned by all layers.manifest.yaml # Template manifest (required)
values.yaml # Shared key/value pairs (optional)
brew/packages.yaml # Homebrew taps/formulae/casks (optional)
secrets/secrets.yaml # Secret sources (optional)
templates/ # Handlebars templates referenced by the manifest
manifest.yamlversion: 1
templates:
- source: templates/gitconfig.hbs
destination: .gitconfig
mode: 0o600 # optional (UNIX only)
secrets/secrets.yamlgithub_token:
from: env
key: DOTSTRAP_GITHUB_TOKEN
signing_key:
from: file
path: secrets/signing.asc
Secrets are injected under a secrets namespace inside templates. The example
above exposes {{secrets.github_token}} and {{secrets.signing_key}}.
brew/packages.yamltaps:
- homebrew/cask-fonts
formulae:
- ripgrep
- neovim
casks:
- iterm2
dotstrap ~/src/dotstrap-config
dotstrap git@github.com:me/dotstrap-config.git --dry-run
dotstrap ./config --home /tmp/home --skip-brew
Positional arguments and flags:
SOURCE – required configuration repository (path or git URL).--home <path> – override the home directory (useful in tests).--skip-brew – skip Homebrew operations.--dry-run – render and report without modifying the filesystem.secrets/secrets.yaml as either an environment variable
(from: env) or a file (from: file). Relative file paths resolve within
the configuration repository.dotstrap.{{secrets.NAME}} inside any template.Missing secrets abort the run with a clear error to prevent partially rendered dotfiles.
cargo fmt
cargo test
# coverage (CI enforces 100 %)
cargo tarpaulin --fail-under 100
.github/workflows/ci.yml runs cargo fmt, cargo clippy, the unit tests, and
tarpaulin with --fail-under 100. Copy the workflow into your fork to keep
coverage locked at 100 %.
MIT