dotdrift

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 5 Imported by: 0

README

dotdrift

A CLI tool for managing Linux configuration through git-backed profiles.

Principles

  • Presence = managed: every modules/<id>/module.toml is selected; no enable list.
  • Apply always resumes: dotdrift apply continues from the first incomplete step.
  • Mise owns files: symlink, copy, and template operations are performed by mise.
  • Selection precedence: module → host → user; user wins, disable is unioned across layers.

Installation

go install github.com/thedataflows/dotdrift@latest

dotdrift requires mise on PATH. It will install a user-local copy via https://mise.run when missing or too old.

Quick start

# Create a profile
dotdrift init ./my-profile
cd ./my-profile

# Onboard an existing config path into a module
dotdrift onboard ~/.bashrc

# See what would change
dotdrift plan

# Apply the profile (always resumes)
dotdrift apply --yes

# Show current state
dotdrift status

Profile layout

profile/
├── dotdrift.toml
├── modules/
│   └── <id>/
│       ├── module.toml
│       └── home/...          # files referenced by dotfile entries
├── hosts/<hostname>/
│   └── modules/<id>/...        # host overlays
└── users/<username>/
    └── modules/<id>/...        # user overlays (highest precedence)

See examples/simple/ for a minimal profile.

Commands

Command Purpose
dotdrift init [path] Create a new profile directory
dotdrift detect Print host/user/os/gpu/backend facts
dotdrift modules List selected and skipped modules
dotdrift plan Print the effective plan without side effects
dotdrift apply [--yes] Run the full pipeline and resume from state
dotdrift status Show resume cursor, selection, and last error
dotdrift onboard <path>... Copy live paths into a module and apply

Testing

go test ./...

Unit tests run offline. Integration tests against real tools can be added with //go:build integration.


License

MIT License

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package dotdrift implements the dotdrift CLI.
Package dotdrift implements the dotdrift CLI.
internal
apply
Package apply orchestrates the dotdrift pipeline with always-resume semantics.
Package apply orchestrates the dotdrift pipeline with always-resume semantics.
detect
Package detect gathers system facts.
Package detect gathers system facts.
facts
Package facts holds the system facts used for module selection.
Package facts holds the system facts used for module selection.
mise
Package mise bootstraps the mise binary and runs mise operations.
Package mise bootstraps the mise binary and runs mise operations.
onboard
Package onboard materializes live paths into a module.
Package onboard materializes live paths into a module.
packages
Package packages provides package backend operations.
Package packages provides package backend operations.
profile
Package profile loads and selects modules from a profile.
Package profile loads and selects modules from a profile.
resolve
Package resolve merges profile layers into an execution plan.
Package resolve merges profile layers into an execution plan.
state
Package state persists resume-only state for dotdrift apply.
Package state persists resume-only state for dotdrift apply.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL