This repository contains a collection of utility scripts that might be useful to others. They are mainly focused on unix/posix shells and command line tools.
- dotfiles: personal configuration files for zsh, tmux, vim and other tools
- scripts: various scripts to make work easier, such as backup, git, ssh and more
- config: additional configuration files for tools like git and ssh
To install the scripts and dotfiles, run the following command:
./install.shThis will create symbolic links in your home directory to the files in this repository.
./install.sh [OPTIONS]
Options:
-v, --verbose Enable verbose output for debugging
-u, --uninstall Remove dotfiles setup and restore backups
-y, --yes Skip confirmation prompts (assume yes)
--dotfiles-dir DIR Use custom dotfiles directory
--config-dir DIR Use custom config directory
-h, --help Show help message# Install with verbose output
./install.sh -v
# Install without confirmation prompts
./install.sh -y
# Install with custom directories
./install.sh --dotfiles-dir /path/to/dotfiles --config-dir /path/to/config
# Uninstall and restore backups
./install.sh -uYou can also control installation using environment variables:
DOTFILES_ROOT: Override dotfiles directoryCONFIG_ROOT: Override config directoryINSTALL_PREFIX: Override installation target (default:$HOME)
Some of the scripts and dotfiles depend on external tools or modules. You can install them with the following command:
npm installThis will install the following dependencies:
- git-open: a script to open the GitHub page or website for a repository
- git-recent: a script to see the most recent branches you've checked out
- git-extras: a set of useful git commands
- zsh-syntax-highlighting: a zsh plugin that enables syntax highlighting for commands
- zsh-autosuggestions: a zsh plugin that suggests commands based on your history
If you use flarectl to manage Cloudflare DNS records, you can configure your API token to be automatically loaded.
Setup:
-
Create the configuration directory:
mkdir -p ~/.config/cloudflare -
Create and secure the credentials file:
touch ~/.config/cloudflare/credentials chmod 600 ~/.config/cloudflare/credentials
-
Add your Cloudflare API token to the file:
echo "export CF_API_TOKEN=your_token_here" > ~/.config/cloudflare/credentials
-
Reload your shell or source your configuration:
source ~/.zshrc
The CF_API_TOKEN environment variable will be automatically loaded and exported when you start a new shell session. The configuration script will verify file permissions and warn you if the credentials file is not secure (should be 600).
Creating a Cloudflare API Token:
- Log in to the Cloudflare Dashboard
- Go to My Profile → API Tokens
- Click Create Token
- Use the "Edit zone DNS" template or create a custom token with the following permissions:
- Zone → DNS → Edit
- Zone → Zone → Read
- Select the specific zones you want to manage
- Create the token and copy it to your credentials file
The install script will check for the credentials file and provide setup instructions if it's not found.
This project is licensed under the MIT License - see the LICENSE file for details.
If you find anything useful in this repository, feel free to use it or contribute to it. If you encounter any bugs or have any suggestions, please open an issue or a pull request.