Integrations
Dotkit is flexible in both directions: your scripts can use dotkit functions, and dotkit can orchestrate any external tool that runs from a shell command.
Using dotkit functions in your scripts
Section titled “Using dotkit functions in your scripts”Get dotkit map, dotkit install, and dotkit ask as shell functions inside any script:
#!/bin/shset -eu
dotkit map 'brew install {{item}}' <<BODYghripgrepneovimBODYMake sure that dotkit is installed on your PATH (the installer puts it at ~/.local/bin/), otherwise the shell functions won’t be found.
Orchestrating other tools
Section titled “Orchestrating other tools”Dotkit doesn’t care what your scripts do. Anything that runs from a shell command can be orchestrated:
Ansible:
try command -v ansiblebrew install ansible---ansible-playbook ~/dotkit/playbooks/site.ymlHomebrew Bundle:
brew bundle --file=~/dotkit/BrewfileNix:
try command -v nixdotkit install https://nixos.org/nix/install -- --daemonnix-env -iA nixpkgs.gitStow:
cd ~/dotkit/dotfilesstow -t ~ .Running dotkit from other tools
Section titled “Running dotkit from other tools”dotkit parse FILE emits shell to stdout without executing. Pipe it into any executor:
dotkit parse setup.txt | shdotkit parse setup.txt | bash --loginUse this to integrate dotkit parsing into existing provisioning pipelines that already control execution.
Homebrew formula
Section titled “Homebrew formula”Install dotkit CLI via Homebrew:
brew tap dotkit-run/clibrew install dotkitThis makes dotkit available system-wide, so scripts can reference it without knowing the install path.