Dorothy
Dorothy is a dotfile ecosystem featuring:
- seamless support for bash, fish, and zsh
- seamless support for multiple operating systems and architectures
- seamless support for your favorite terminal and GUI editors
- automatic configuration of your environment variables for what you have installed on your system
- automatic installation and updating of your specified packages
- automatic git ssh and gpg configuration based on what your system supports and your configuration
- hundreds of commands to improve your productivity
- completely extensible and configurable with your own user repository
- all this together, allows you to go from zero to hero within minutes, instead of days, on a brand new machine
Dorothy maintainers are daily driving Dorothy on:
- macOS on Apple Silicon (ARM64)
- macOS on Intel (x86_64)
- Ubuntu Server on Raspberry Pi 4 (ARM64)
- Ubuntu Desktop on Raspberry Pi 400 (ARM64)
- Ubuntu Desktop on Intel/AMD (x86_64)
Dorothy users are daily driving Dorothy on:
Dorothy maintainers and users are occasionally driving Dorothy on:
- macOS on Apple Silicon with
HOMEBREW_ARCH="x86_64"
- Fedora via Intel/AMD (x84_64) virtual machines
- OpenSUSE via Intel/AMD (x84_64) virtual machines
- Alpine via Intel/AMD (x84_64) virtual machines
- Alpine via Apple Silicon (ARM64) virtual machines
- Ubuntu Server on StarFiveโs VisionFive (RISC-V)
Watch the 2022 April Presentation to see what Dorothy can do!
Try
If you just want to trial Dorothy commands without configuring your shell, you can do the following:
# IF you are on Alpine, install the dependencies
doas apk add bash curl git
# IF you are on Ubuntu, install the dependencies
sudo apt install bash curl git
# IF you are on macOS, install the dependencies
xcode-select --install
# To run only a specific command, run the following and swap out `what-is-my-ip` with whatever command you wish to run
bash -ic "$(curl -fsSL https://dorothy.bevry.me/commands/what-is-my-ip)"
# To run multiple commands in a REPL, run the following then type the commands you wish to execute
eval "$(curl -fsSL https://dorothy.bevry.me/try)"
Install
To install Dorothy run the following in your favorite terminal application:
# IF you are on Alpine, install the dependencies
doas apk add bash curl git
# IF you are on Ubuntu, install the dependencies
sudo apt install bash curl git
# IF you are on macOS, install the dependencies
xcode-select --install
# Run the Dorothy installation script
bash -ilc "$(curl -fsSL https://dorothy.bevry.me/install)"
During installation, Dorothy will ask you to create a repository to store your user configuration, such as a dotfiles
repository. If you already have a dotfiles repository, you can use that, or make another.
Verify the installation worked by selecting a theme for Dorothy by running:
# you must open a new terminal instance first
dorothy theme
# then open a new terminal
Troubleshooting
If your shell doesn't recognize the syntax, run bash -il
then run the command again.
If you get a command not found error or an undefined/unbound variable error, verify that your terminal application has login shells enabled. If you are running in a login shell, then you may be running in an unsupported shell, run bash -il
to open bash, if it still doesn't work, then run the installer again, and make sure to confirm the setup for Dorothy for each shell when prompted.
If packages are failing to install, update your Operating System's package manager so that it is using the latest references:
# Alpine
doas apk update
# Ubuntu
sudo apt update
# Fedora
sudo dnf check-update -y
sudo yum check-update -y
# Manjaro
sudo pacman-key --init
sudo pacman --refresh --sync
# OpenSUSE
sudo zypper --gpg-auto-import-keys refresh
Overview
Dorothy will be installed to $DOROTHY
, which consists of the following:
commands
directory contains executable commandssources
directory contains scripts that are loaded into the shell environmentthemes
directory contains themes that you can select via theTHEME
environment variableuser
directory is your own github repository for your custom configurationinit.fish
the initialization script for the fish shellinit.sh
the initialization script for other shells
The initialization of Dorothy works as follows:
-
Fish shell will be instructed to load Dorothy's
init.fish
file, and the other shell's will be instructed to load Dorothy'sinit.sh
file. -
The initialization file will set the
DOROTHY
environment variable to the location of the Dorothy installation, and load the appropriatesources/*
files. -
source/init.(sh|fish)
will loadsources/environment.(sh|fish)
which will:- invoke
setup-environment-commands
which will determine the appropriate environment configuration for the invoking shell - evaluate its output, applying the configuration to the shell, achieving cross-shell environment compatibility
- invoke
-
source/interactive.(sh|fish)
will load the additional configuration for our interactive login shell, such as:- Enabling editor preferences
- Enabling aliases and functions
- Enabling the ssh agent
- Enabling zsh and its ecosystem
- Enabling shell auto-completions
- Enabling prompt theme
This is the foundation enables Dorothy's hundreds of commands, to work across hundreds of machines, across dozens of operating system and shell combinations, seamlessly.
Documentation
Staring with Dorothy:
Coding with Dorothy:
- Commands
- Strict Mode
- Exit and Return codes
- Styling your Command Output
- Working with Prompts
- Writing a Utility Installer
- Reading and Writing Configuration
Coding with Bash:
- Arrays
- Builtins
- Conditionals
- Foreach Line
- Parameter Expansion
- Replace Inline
- Resources
- Subshells
- Trailing Lines
- Versions
Roadmap:
Showcase
If you use Dorothy, add yourself below:
- @balupton: https://github.com/balupton/dotfiles
- @molleweide: https://github.com/molleweide/dotfiles
- @sumitrai: https://github.com/sumitrai/dotfiles
Sponsors
Dorothy is supported by the following sponsors:
License
Unless stated otherwise all works are:
- Copyright ยฉ 2013+ Benjamin Lupton
and licensed under: