A collection of tools and configurations for my development environment.
I use this repository to manage my development environment across different machines, operating systems, containers, and cloud workspaces. The repository is designed to be cloned and run on a Ubuntu or MacOS system (only tested on my computers, ymmv).
Used on local machines and docker based development containers.
How I currently run the toolbox
setup locally:
$ git clone https://github.com/ecshreve/toolbox.git ~/.toolbox
$ cd ~/.toolbox
$ ./install.sh
Note
Probably don't run the install script unless you're me. But, I'm not the boss of you.
The install.sh
script is more or less a wrapper around the ansible-playbook
command that runs the playbook.yml
file with the config_vars.yml
file as input. The script checks basic preprequisites and runs the playbook.
Prebuilt codespace for the latest devcontainer image in the github container registry. This image is built from the devcontainer defined in .devcontainer/toolbox-prod/devcontainer.json
. It just pulls a tagged image of a prebuilt devcontainer from the github container registry.
{
"name": "toolbox-prod",
"image": "ghcr.io/ecshreve/toolbox-dev:v0.0.42"
}
Note
Open a zsh
shell in the terminal to get started. Regardless of the default profile, codespaces opened in the web client always open with a bash session running initially.
- I was tired of having do extra work to integrate things with my old
fish
setup. - Wanted to update some tools and look at new ones.
- Move setup definition to Ansible for better control and organization.
- Its fun.
- reliable
zsh
configuration, with plugins and utilities covering almost all of whatfish
was doing for me. mods
configuration to interact with AI models from CLI- chatbot to interact with the repository via OpenAI Embeddings, LangChain, and Pinecone
gencom
to generate commit messages based on currently staged changes (powered bymods
)- devcontainer prebuilt and ready for toolbox development or to be used as a base devcontainer for other projects
CTRL+ff
- fuzzy search for filesgaa
- add all files to gitga
- add files to git interactively withfzf
gbb
- interactive branch selection withfzf
gcmsg <message>
- commit with a messagegcm
- checkout main branchgcp
- interactive cherry-pick withfzf
gd
- interactive git diff withfzf
gdoof
- add all and amend with no messagegll
- count lines in staged git diffglo
- interactive git log withfzf
goops
- reset last commit softgss
- interactive stash selection withfzf
gup
- pull with rebasenett
- show open ports
bat
- A modern replacement forcat
exa
- A modern replacement forls
fd
- A modern replacement forfind
forgit
- Afzf
wrapper forgit
commandsfzf
- A fuzzy finder for the command linetldr
- A streamlinedman
page replacement
charm
- A utility to managecharm
appsfreeze
- A tool to take screenshots of codegum
- A tool for glamorous shell scriptsmods
- An application to interact with the OpenAI APIrun
- A utility to run commands in a new shellskate
- A utility to manage secretsvhs
- A tool to create gifs from the terminalwishlist
- An SSH directory app
$ ./scripts/secrets.sh
This script is designed to streamline setting up secrets in my development environment for this project, but can be generally used to dump secrets from a skate
database to a local file.
The playbook.yml
file is the main entry point for the ansible
configuration. It handles running the roles defined in the ansible/roles
directory with the variables defined in config_vars.yml
.
The playbook can be run with the following command to see the output in the terminal and log it to a file:
$ ansible-playbook playbook.yml --tags base -v | tee ansible/logs/ansible.log
With ansible-navigator installed, the playbook can be run with the following command to open the TUI:
$ ansible-navigator run playbook.yml -v
./config_vars.yml
- Contains the variables used in
playbook.yml
. - Things like packages to install, language and tool versions, etc
environment variables
TOOLBOX_DIR
: ~/.toolbox
- The directory where the toolbox repository is cloned.
ANSIBLE_HOME
: $TOOLBOX_DIR/ansible
- Overrides the default ansible home directory.
For environment setup ansible
is used to manage dotfiles and configurations.
The roles are defined in the ansible/roles
directory, and the playbook
playbook.yml
is responsible for running them.
base
- Installs packages (apt packages on debian/ubuntu) (macports ports on darwin).
zsh
:
- Handles the installation and configuration of
zsh
andoh-my-zsh
, as well as plugins and utilities. - Uses
powerlevel10k
for prompt styling. - Installs
zsh-autosuggestions
,zsh-completions
,zsh-syntax-highlighting
,forgit
andfzf
plugins for enhanced shell functionality.
fzf
:
- Installs
fzf
from git repository.
dotfiles
:
- Symlinks dotfiles in
config_files/
to$HOME
.
Important
The .zshrc
configuration defines a keybinding override to use ^ff
instead of ^t
to trigger fzf
from the command line.
golang
:
- Handles downloading and installing Golang, along with additional tools and executables.
- Installs
go
under/usr/local/go
- Installs executables under
/home/eric/go/bin
- Install path is defined in
config_vars.yml
These aren't fully integrated yet, some are just for fun, some are planned to be integrated into the main playbook.
ansible-navigator
- A text-based user interface (TUI) for Ansible.
- Installed via
pip
as part of thenavigator
role.
navi
- A command-line cheatsheet tool.
etc...
- cleanup: check ownership of files and directories
- hashi: install terraform and packer
- python: install pyenv and pyenv-virtualenv
The Dockerfile
in the root of the repository is used to build a docker image with the tools and configurations defined in the ansible
playbook. The image is built and pushed to the github container registry via a github action.
The devcontainer defined in the .devcontainer/toolbox-dev
directory is used to build a devcontainer with some features and extensions installed. These are general features that I probably want in any dev environment.
The devcontainer defined in the .devcontainer/toolbox-prod
directory is based on the toolbox-dev
devcontainer, but does not include any additional features or extensions. This is the devcontainer that is used for the codespaces prebuild configuration.
- charmbracelet
- ansible
- ansible-navigator | docs
- golang | go installation
- forgit
- fzf
- zsh
- oh-my-zsh
- terraform
- packer
- [navi](
- [powerlevel10k](
- [pyenv](
- [pyenv-virtualenv](