-# dot - a (mostly) one script dotfiles manager
-#
-# Copyright 2026 Edward Delaporte V
-# Licensed under AGPLv3 and later.
-#
-# Features
-# symlinks - any file in $HOME/dotfiles/files may be symlinked
-#
-# dot setup
-# install the necessary tools to $HOME/envs/dot
-#
-# dot list
-# list available roles
-#
-# dot check
-# check setup vs expected
-#
-# dot add ROLE
-# add ROLE to localhost
-#
-# dot apply
-# apply all added ROLES
+ENVS="$HOME/envs" # Python environments - including required Ansible
+ANSIBLE="$ENVS/ansible/bin/ansible-playbook" # Core command
+TASKFILE="$HOME/backup/dot.$HOSTNAME.yaml" # Backup of localhost config
+DOTFILES="$HOME/dotfiles" # Where to find dotfiles
+
+LINKFILES="$DOTFILES/files" # Files to symlink
+INSTALLS="$DOTFILES/install" # Install scripts
+DOT="$HOME/.dot" # Touched files go here to track installs
+REQS="$DOTFILES/reqs" # Python env requirements.txt files
+
+mkdir -p "$DOT"
+
+read -d '' HELP << EOF
+dot - a (mostly) one script dotfiles manager
+
+Copyright 2026 Edward Delaporte V
+Licensed under AGPLv3 and later.
+
+dot setup
+ install ansible CLI to $ANSIBLE
+
+dot link FILE
+ updates ~/dot.HOSTNAME.yaml
+ to include a symlink from ~/dotfiles/files/FILE to ~/.FILE
+
+dot check
+ check setup against ~/backup/dot.HOSTNAME.yaml
+
+dot apply
+ apply config in ~/backup/dot.HOSTNAME.yaml
+
+dot help FEATURE
+ setup - more information on setup
+ all - additional features
+EOF
+
+read -d '' SETUP_HELP << EOF
+## Setup
+
+1. Install this file on your path
+2. Clone your (or my) 'dotfiles' repository to ~/dotfiles
+3. Run 'dot help' to get started.
+
+EOF
+
+
+read -d '' EXTRA_HELP << EOF
+
+dot install SCRIPT
+ updates ~/dot.HOSTNAME.yaml
+ to run ~/dotfiles/SCRIPT.sh if it has not yet been run
+ creates ~/dot/SCRIPT.installed after SCRIPT has been run
+
+dot env ENV
+ create Python environment ~/envs/ENV based on ~/dotfiles/reqs/ENV.txt
+
+EOF
+
+
+if [ ! -n "$1" ] || [ "$1" == "help" ]; then
+ echo "$HELP"
+fi
+if [ "$1" == "help" ] && [ "$2" == "all" ]; then
+ echo ""
+ echo "$EXTRA_HELP"
+ echo ""
+ echo "$SETUP_HELP"
+fi
+if [ "$1" == "help" ] && [ "$2" == "setup" ]; then
+ echo ""
+ echo "$SETUP_HELP"
+fi