Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

d stands for dead config linker. It is a small filesystem linker for source trees. It walks a source directory, maps regular files into a target root, and creates exact symlinks.

The source tree is the manifest. The destination tree is the filesystem. d does not care what made the directory. Git repo, tarball, copied folder, generated tree, mounted disk, whatever. It reads a filesystem tree and links regular files.

Features

  • Treats a directory tree as the manifest
  • Links regular files into a destination tree with exact symlink targets
  • Supports direct trees and per-OS platform folders
  • Plans the full operation before mutating the filesystem
  • Refuses user-owned files, directories, and mismatched symlinks
  • Removes only exact managed symlinks when unlinking
  • Can adopt an existing destination symlink explicitly
  • Orders actions deterministically by destination path
  • Ignores common repository, editor, and license metadata by default
  • Uses openat2 on Linux and Android for stricter rooted path resolution
  • Preserves ownership from the nearest parent when platform metadata allows it

Non-Features

  • Repository awareness. VCS metadata, manifests, lockfiles, and history are not consulted.
  • Machine inventory, synchronization, or remote state.
  • Config files. The directory tree is the config.
  • Host-specific templates, conditionals, variables, or generated files.
  • Secret managers, encrypted sources, or decrypt-on-apply workflows.
  • Hooks, plugins, bootstrap scripts, package downloads, or external dependency fetching.
  • Partial-file edits, structured config patching, or content merges.
  • Managed file attributes like executable, private, read-only, create-only, or exact-directory state.
  • Copy mode, hardlink mode, junction mode, or fallback link strategies.
  • Git-like commands for add, edit, diff, pull, commit, push, or apply-after-update.
  • Implicit string splitting, path alias guessing, or filesystem-specific merge logic.
  • Transactional rollback after an operational syscall failure.
  • Accidental root filesystem deployment.
  • Deleting ordinary files or cleaning empty directories during unlink.

Installation

Requires Go 1.26+.

env CGO_ENABLED=0 go install -trimpath -ldflags="-s -w" github.com/enzv/d@latest

From a checkout:

./make.sh build

Usage

d /path/to/source

Example

Flat layout is the default. source/ already looks like the destination, so d links it straight there. Platform layout only adds one folder in front, like linux, darwin, windows, or plan9, when one source tree needs per-system files. Without an explicit target, the destination is Larry's home.

$ pwd
/home/larry

$ tree source
source/
|-- .config/nvim/init.lua
`-- .gitconfig

$ d source
LINK     /home/larry/.config/nvim/init.lua -> /home/larry/source/.config/nvim/init.lua
LINK     /home/larry/.gitconfig -> /home/larry/source/.gitconfig

$ readlink /home/larry/.gitconfig
/home/larry/source/.gitconfig

Full command documentation, flags, and examples live at pkg.go.dev/github.com/enzv/d.

Build & Testing

We do not use make. make.sh is a POSIX shell runner for local checks and release builds.

./make.sh lint
./make.sh test
./make.sh bench
./make.sh release
./make.sh clean

About

dead config linker

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages