Skip to content

Repository files navigation

krypt

Cross-platform dotfiles manager. Rust binary. Config-driven.

CI release crates.io docs.rs license: MIT

A vault for your dotfiles — clone, deploy, and keep in sync across Linux, macOS, and Windows. Part of the kryptic.sh suite.

What it does

  • Single binary manages dotfiles end-to-end on Linux / macOS / Windows.
  • Replaces stow with a copy-based deploy: files are copied from the repo to their destinations (mtime and, on Unix, file mode preserved). krypt never creates symlinks. A manifest records a sha256 of every destination so drift is detectable.
  • Replaces ad-hoc bash orchestrators (.update / .setup) via a declarative .krypt.toml schema and a step runner with predicate gating.
  • Interactive first-run wizard via [prompts.*] blocks.
  • Cross-distro package install abstraction (pacman, apt, dnf, brew, scoop, winget).
  • Post-update and post-setup lifecycle hooks with command_exists: / platform: / env: / file_exists: predicates.
  • Generic krypt <group> <name> dispatcher — any [[command]] entry in .krypt.toml is reachable as a subcommand without binary changes.

Status

Pre-1.0 and moving. See CHANGELOG.md for what shipped in each release, and the releases page for the current version. Roadmap and open work live in issues.

Install

paru -S krypt-bin                  # Arch (AUR)
brew trust --tap kryptic-sh/tap    # macOS: Homebrew skips untrusted taps
brew install kryptic-sh/tap/krypt

Windows — the release workflow renders a Scoop manifest into kryptic-sh/scoop-bucket:

scoop bucket add kryptic-sh https://github.com/kryptic-sh/scoop-bucket
scoop install krypt

Every tagged release also attaches prebuilt archives (plus .sha256 sidecars) for six targets: x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl, aarch64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin, x86_64-pc-windows-msvc.

Every channel installs a binary named krypt on your $PATH.

crates.io trails this repo. cargo install krypt-cli works but installs an older build. Publishing krypt-core and krypt-cli is currently paused: their gix dependency points at the mxaddict/gitoxide fork (for stash + merge plumbing), which cargo publish rejects. The publish-crates job in .github/workflows/ci.yml has those two lines commented out and will be restored once the upstream gitoxide change lands. For the current version, use AUR / Homebrew / Scoop / a release archive.

The krypt crate name on crates.io is held by an unrelated, unmaintained project (Stupremee/krypt) — we publish the bin as krypt-cli for now. If/when the name transfers (see #37), cargo install krypt will become the canonical install command.

Building from source needs the toolchain pinned in rust-toolchain.toml; the workspace MSRV is Rust 1.95 (rust-version in Cargo.toml).

Usage

First run, against a freshly cloned repo:

krypt init https://github.com/you/dotfiles   # clone to ${XDG_CONFIG}/krypt/repo
krypt deps                                   # install [[deps]] packages
krypt setup                                  # interactive [prompts.*] wizard
krypt link                                   # deploy: copy files to destinations

Then, day to day:

krypt update   # pull the repo, re-run link, run post-update hooks
krypt doctor   # diagnostic

Notes on that sequence:

  • Every command finds the repo the same way: --config (or --repo-path) when given, else .krypt.toml in the current directory, else the repo krypt init recorded in the tool config. So after init they run from anywhere; cd into another checkout to work on that one instead. krypt update always uses the recorded repo.
  • krypt setup only runs the wizard. It reads [prompts.*] sections, asks the questions, and writes the answers to the [[template]] destinations that name those sections. It does not install packages and does not deploy — run krypt deps and krypt link yourself.
  • krypt init clones over HTTPS only; SSH remotes are not supported (krypt init --help).

Useful subcommands:

Command Effect
krypt validate parse .krypt.toml, report schema errors
krypt paths print every resolved ${VAR} for this host
krypt diff compare deployed files to the manifest: clean / drifted / missing
krypt adopt copy edits made to deployed files back into the repo
krypt adopt <path>... adopt those files: edits if deployed, else import as new
krypt unlink / relink delete manifest-tracked destinations / unlink then link again
krypt notify <title> <body> platform-correct desktop notification
krypt menu list [[command]] group = "menu" entries
krypt menu <name> run a menu's steps
krypt <group> <name> generic dispatcher for any group
krypt battery {report,log,clear} built-in battery state utility

krypt adopt with no paths walks the manifest and copies every deployed file you edited in place back to its repo source, except [[template]] destinations: those hold per-machine values (your git identity, a monitor layout) that do not belong in the template, so one is adopted only when you name it. Given paths, it does that for the deployed ones and imports the others as new repo files, printing the [[link]] block to paste. adopt-edits is an alias for it.

Migrating from stow + bash

If you have an existing stow-based dotfiles repo with .update / .setup bash scripts and you want to convert it: see docs/migrating-from-bash.md. Step-by-step walkthrough with the conceptual mapping (stow → [[link]], .update → krypt update, rofi launcher scripts → [[command]] entries, etc.).

Worked example: mxaddict/dotfiles — Arch + Hyprland, driven end-to-end from one .krypt.toml.

Architecture

Four-crate Cargo workspace:

Crate Role
krypt-cli Binary (krypt) — clap dispatch, thin
krypt-core Engine: config, paths, include, copy, manifest, deploy, tool_config, init, update, adopt, doctor, setup, runner, predicate, notify, dispatch, battery
krypt-pkg Package manager abstraction (pacman, apt, dnf, brew, scoop, winget, plus cargo install for cargo: entries)
krypt-platform Placeholder for cfg-gated OS abstractions — currently exposes only a version constant

Contributing

See CONTRIBUTING.md or open an issue / PR.

License

MIT. See LICENSE.

About

Cross-platform dotfiles manager. Rust binary. Config-driven.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages