Personal collection of setup scripts for building a high-performance AI/ML developer environment β terminal, shell, editor, and Python stack β optimised for Unix/Debian and macOS.
Built to feel practical and approachable: copy, run, verify, and ship with confidence. π
- Motivation
- Whatβs Included
- Supported Platforms
- Installation
- Usage
- Terminal Playbook
- Tool Cheatsheets
- Post-Install Verification
- Configuration & Customisation
- Troubleshooting
- Releases
- Contributing
- Support
- License
As a Senior Engineering Manager and Principal in AI/ML, I often rebuild new environments for experiments, demos, or teaching.
This repo standardises and automates my setup for:
- βοΈ Configuring a modern shell (
zsh,starship,tmux) - π§βπ» Installing a Python + ML toolchain with key libraries
- πͺ Setting up Neovim for fast and extensible Python development
- π» Supporting Debian/Ubuntu and macOS systems
- π Maximising developer productivity and terminal performance
Everything is tuned to work well together β lightweight, consistent, fast, and friendly to daily use.
Quick win: run make help, pick your installer target, then run make verify. β
| File | Description |
|---|---|
install_my_programs_debian |
Installs core packages on Debian/Ubuntu |
install_my_programs_mac |
Installs core packages on macOS (via Homebrew) |
install_my_programs_unix |
Generic fallback for Unix systems |
Makefile |
Standard shortcuts for install and verification |
doctor_post_install_unix |
Strict doctor mode with fix hints |
bootstrap_shell_secrets |
Interactive helper for shell secrets setup |
br_init_project |
Initialize .beads/ + AGENTS.md with br conventions |
verify_linux_edge_cases |
Linux-specific command-variant checks |
requirements.txt |
Python and AI/ML library dependencies |
run_commands/ |
Helper utilities and shell functions |
run_commands/nvim/lua/utils_scripts/ |
Modular Neovim template modules |
run_commands/my_ghostty_config |
Ghostty terminal baseline config |
run_commands/my_starship.toml |
Starship prompt baseline config |
run_commands/secrets_shell.env.example |
Secure shell secrets template |
verify_post_install_unix |
End-to-end setup smoke test script |
rollback_installer_backups |
Restore latest installer backup files |
.github/RELEASE_NOTES_TEMPLATE.md |
Structured release notes template used by release workflow |
TERMINAL_PLAYBOOK.md |
Practical workflows and tool scenarios |
docs/cheatsheets/*.md |
Per-tool power-user cheatsheets and workflows |
python/ |
Additional Python utility scripts |
.gitignore |
Standard ignore patterns |
LICENSE |
GPL-2.0 License file |
Includes dependencies for:
- Terminal: tmux, zsh, starship, ghostty, atuin, direnv, htop, btop
- Editor: neovim (Lua config-ready)
- Python: numpy, pandas, torch, scikit-learn, transformers (editable)
- Optional: lazygit, hyperfine, dua-cli, dust, procs, xh, doggo, watchexec, kubectl, k9s, trivy, zellij, git, curl, wget, build-essentials
β
Debian / Ubuntu
β
macOS
git clone https://github.com/dmoliveira/utils-scripts.git
cd utils-scriptsUsing Make shortcuts (recommended):
make help
make install-macDebian / Ubuntu:
chmod +x install_my_programs_debian
./install_my_programs_debian
./install_my_programs_debian --dry-runmacOS:
chmod +x install_my_programs_mac
./install_my_programs_mac
./install_my_programs_mac --dry-runGeneric Unix:
chmod +x install_my_programs_unix
./install_my_programs_unix
./install_my_programs_unix --dry-runOptional flags (Generic Unix):
--dry-runpreview actions without modifying the machine--skip-mlskip AI/ML Python packages--skip-fontsskip Nerd Fonts install
Dry-run behavior:
- prints each planned command with
[dry-run] ... - keeps hardware/OS branching so previews remain realistic
- performs no filesystem/package-manager mutations
Issue-tracker helper note:
- use
br_init_projectfor new repos;bd_init_projectis kept only as a compatibility wrapper
Monitoring install behavior:
btopis installed on macOS and Linux as the default modern monitor- macOS installs
bottom(btm) as thenvtopalternative - Apple Silicon (
arm64) attempts to installasitopwhen available in Homebrew - Linux installs
nvtoponly when GPU hardware is detected and apt package is available
Advanced tool install behavior:
- macOS installs all recommended tools via Homebrew when formulas are available
- Linux installs each tool only when an apt package exists (auto-skip otherwise)
- Linux
kubectltrieskubectlfirst and falls back tokubernetes-client - The installer avoids duplicate installs and prints clear installed/skipped status
pip install -r requirements.txtchmod +x verify_post_install_unix
./verify_post_install_unixor with Make:
make verifyAdditional modes:
./verify_post_install_unix --strict
./verify_post_install_unix --json
make verify-strict
make verify-json
make doctor
make verify-linux
make playbook
make leader-pack-check
make rollback
make rollback-dry-run
make shell-lintRollback helper:
./rollback_installer_backups --list
./rollback_installer_backups --dry-run
./rollback_installer_backupsThe installers also manage ~/.config/starship.toml from run_commands/my_starship.toml and create timestamped backups before replacing it.
Pull requests also run repository smoke checks in GitHub Actions (.github/workflows/smoke-checks.yml).
Installer and verification changes also run a disposable Ubuntu golden-path bootstrap workflow (.github/workflows/golden-path-bootstrap.yml).
Shell scripts are linted in CI with shellcheck + shfmt (.github/workflows/shell-lint.yml).
After installation youβll have a clean, ready-to-work terminal stack:
- zsh + starship prompt with Git & Python awareness
- tmux for persistent terminal sessions
- neovim configured for Python and AI workflows
- Python environment ready with key ML libraries
Example:
tmux new -s ai_env
nvim my_script.pyFor Neovim productivity:
:Exβ File explorer<leader>fβ Fuzzy searchgdβ Go to definitionKβ Hover docs
For practical "what to run when" workflows, see:
TERMINAL_PLAYBOOK.md
Leader-pack helpers from run_commands/my_zshrc:
leader-pack-helpto print shortcutstmux-researchfor benchmarking + monitoring + codingtmux-deliveryfor edit + verify loop + security checkstmux-incidentfor live triage (system, k8s, DNS)make playbookto quickly locate the playbook filemake leader-pack-checkto validate playbook + zsh template wiring
Per-tool, power-user guides live in:
docs/cheatsheets/tmux.mddocs/cheatsheets/zsh.mddocs/cheatsheets/nvim.mddocs/cheatsheets/starship.mddocs/cheatsheets/lazygit.mddocs/cheatsheets/btop.mddocs/cheatsheets/hyperfine.mddocs/cheatsheets/procs.mddocs/cheatsheets/xh.mddocs/cheatsheets/doggo.mddocs/cheatsheets/trivy.mddocs/cheatsheets/kubectl.mddocs/cheatsheets/k9s.mddocs/cheatsheets/watchexec.mddocs/cheatsheets/direnv.mddocs/cheatsheets/atuin.mddocs/cheatsheets/dua.mddocs/cheatsheets/dust.mddocs/cheatsheets/gh.mddocs/cheatsheets/zoxide.mddocs/cheatsheets/fd.mddocs/cheatsheets/rg.mddocs/cheatsheets/jq.mddocs/cheatsheets/bat.mddocs/cheatsheets/br.mddocs/cheatsheets/uv.mddocs/cheatsheets/make.mddocs/cheatsheets/zellij.mddocs/cheatsheets/ghostty.md
Each cheatsheet includes:
- top commands to memorize
- practical examples
- high-leverage workflows for engineering and incident response
Run the smoke test script after installation to validate your terminal stack:
./verify_post_install_unixIt checks:
- required CLI tools (
zsh,tmux,nvim,fzf,zoxide,starship,direnv,atuin) - monitoring tools (
btopplusbtmon macOS,nvtopon Linux with detected GPU) - advanced productivity tools (
lazygit,hyperfine,dua,dust,procs,xh,doggo,watchexec,kubectl,k9s,trivy,zellij) as optional checks - expected config files (
~/.zshrc,~/.tmux.conf,~/.config/nvim/init.lua) - syntax/startup checks for Zsh, tmux, and Neovim
- Ghostty config validation on macOS when installed
If the script reports FAIL > 0, fix those items before continuing.
Verification flags:
--stricttreats warnings as failures (useful for CI and clean-room setup validation)--jsonprints a machine-readable summary (status,strict,pass,warn,fail)
Doctor mode:
make doctorruns strict verification and prints actionable fix hints for common failures.
Edit your ~/.zshrc or add functions in ~/.zsh.d/ for modularity.
Example alias:
alias gs='git status'
alias py='python3'Template extras in run_commands/my_zshrc:
zsh-history-substring-search+fzf-tabfor better recall/completion UXdirenvhook for per-project env loadingatuinhook for searchable shell historyghostty-reloadhelper to validate and edit Ghostty config quickly- leader-pack shortcuts:
lg,hf,dui,ds,px,hget,dns,k,kga,tfscan - tmux templates:
tmux-research,tmux-delivery,tmux-incident
Secrets best practice:
mkdir -p ~/.config/secrets
cp ./run_commands/secrets_shell.env.example ~/.config/secrets/shell.env
chmod 600 ~/.config/secrets/shell.envInteractive helper:
./bootstrap_shell_secrets
# or
make bootstrap-secretsConfig file: ~/.config/starship.toml
Base config in this repo: run_commands/my_starship.toml
Power-user reference: docs/cheatsheets/starship.md
mkdir -p ~/.config
cp ./run_commands/my_starship.toml ~/.config/starship.toml
starship explainKeep personal prompt tweaks in a clearly marked block so they are easy to remove later.
Template defaults include:
- compact git dirtiness counts only when dirty (example:
+2 !1 ?3) - command-duration tiers: show after 2s, notify after 15s
[git_branch]
symbol = "ο "
[python]
symbol = "ξΌ "Edit ~/.tmux.conf for shortcuts, layouts and themes.
Example:
set -g mouse on
bind r source-file ~/.tmux.conf \; display "Reloaded!"
Template defaults also include tmux-sensible and an opt-in switch for status plugins:
set -g @qol_status_plugins 'off' # change to 'on' for battery/network status plugins
Session persistence defaults are also enabled via TPM plugins:
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
- Use
btopas your default monitor for CPU, memory, processes, and IO - On macOS,
btm(bottom) is installed as the richer TUI alternative tohtop - On Apple Silicon,
asitopis installed when available to expose SoC metrics - On Linux with a detected GPU,
nvtopis installed when the package exists
lazygit: fast interactive Git UI; start withlazygit, stage withspace, commit withchyperfine: benchmark commands reliably; usehyperfine 'python script.py' 'uv run python script.py'duaanddust: inspect disk usage quickly; rundua ifor interactive mode anddust -d 3for top foldersprocs: modern process viewer; tryprocs --sortd cpuorprocs pythonxh: readable HTTP client; usexh GET https://api.github.com/repos/dmoliveira/utils-scriptsdoggo: DNS debugging; usedoggo openai.com Aordoggo github.com MXwatchexec: rerun on file changes;watchexec -e py 'pytest -q'kubectlandk9s: Kubernetes CLI + TUI; runkubectl get pods -Athenk9strivy: security scan for files/images;trivy fs .andtrivy image python:3.12zellij: terminal workspace manager; start withzellijand split panes from built-in help (Ctrl-g+?)
Config file: ~/.wezterm.lua
Base config in this repo: run_commands/my_wezterm.lua
cp ./run_commands/my_wezterm.lua ~/.wezterm.lua
Config file: ~/.config/ghostty/config
Base config in this repo: run_commands/my_ghostty_config
mkdir -p ~/.config/ghostty
cp ./run_commands/my_ghostty_config ~/.config/ghostty/config
Modify ~/.config/nvim/init.lua to adjust plugins or keymaps.
Power-user reference: docs/cheatsheets/nvim.md
Template defaults include:
- LSP support (
pyright,lua_ls) - Formatter orchestration (
conform.nvim) - AI workflow (
CopilotChat.nvim) - Code navigation (
aerial.nvim) - Test workflow (
neotest,neotest-python) - SQL workflow (
vim-dadbod,vim-dadbod-ui) - Core UI/search (
nvim-treesitter,telescope.nvim,lualine.nvim)
Template defaults now include Mason bootstrap for language servers:
require("mason").setup()
require("mason-lspconfig").setup({ ensure_installed = { "lua_ls", "pyright", "bashls", "jsonls" } })
The Neovim template is modularized under:
run_commands/my_nvim_init.luarun_commands/nvim/lua/utils_scripts/plugins.luarun_commands/nvim/lua/utils_scripts/options.luarun_commands/nvim/lua/utils_scripts/lsp.luarun_commands/nvim/lua/utils_scripts/keymaps.luarun_commands/nvim/lua/utils_scripts/ui.lua
After opening Neovim, run:
:Mason
Useful default keymaps:
<leader>fmformat current buffer<leader>ccCopilot Chat toggle<leader>aaAerial outline toggle<leader>tnrun nearest test<leader>tfrun tests in current file<leader>tstoggle neotest summary<leader>toopen neotest output<leader>tddebug nearest test with DAP<leader>dbtoggle Dadbod UI
Keep requirements.txt up to date with your preferred ML stack.
Recommended additions:
xgboost
lightgbm
sentence-transformers
gradio
mlflow
If you see Ghostty config validation failed, run:
/Applications/Ghostty.app/Contents/MacOS/ghostty +validate-config --config-file ~/.config/ghostty/configFix the reported key/value and rerun make verify.
./verify_post_install_unix --strict intentionally converts warnings into failures.
Use strict mode in CI or when validating a clean machine setup.
If terminal features look incorrect in tmux/Neovim under Ghostty, use term = xterm-256color in ~/.config/ghostty/config until xterm-ghostty terminfo is available on your system.
On Debian/Ubuntu, packages install commands as fdfind and batcat.
Run:
make verify-linuxIf needed, install variants with:
sudo apt install -y fd-find batEnsure ~/.config/secrets/shell.env exists and has safe permissions:
chmod 600 ~/.config/secrets/shell.envYou can bootstrap it with:
make bootstrap-secretsInstallers create timestamped backups like ~/.zshrc.<timestamp>.bak.
Use:
make rollback-dry-run
make rollbackReleases are automated through GitHub Actions when a version tag is pushed.
Workflow:
.github/workflows/release-on-tag.yml.github/RELEASE_NOTES_TEMPLATE.md- Trigger: push tag matching
v*(example:v1.2.0) - Outcome: GitHub Release created with structured notes sections (
Adds,Changes,Fixes,Removals) plus generated changelog entries
Template workflow details:
- release workflow renders
.github/RELEASE_NOTES_TEMPLATE.mdusing current tag/date - placeholders supported:
{{VERSION}},{{DATE}} - update template content before tagging if you want custom release messaging
Recommended release flow:
- update
.github/RELEASE_NOTES_TEMPLATE.mdwith release highlights - create and push your version tag
- review the generated GitHub Release notes and publish
Preview template rendering locally:
VERSION=v1.2.0
DATE_UTC="$(date -u +%Y-%m-%d)"
sed "s/{{VERSION}}/${VERSION}/g; s/{{DATE}}/${DATE_UTC}/g" .github/RELEASE_NOTES_TEMPLATE.mdExample:
git tag v1.2.0
git push origin v1.2.0Contributions, feedback, and improvements are always welcome. π
- Fork this repo
- Create a new branch (
git checkout -b feature/your-feature) - Commit and push your changes
- Open a pull request
Please keep scripts portable and dependencies minimal so the setup stays approachable for everyone.
If this project helped you save time or setup headaches, consider supporting:
Your contribution helps keep these utilities maintained and up to date.
This project is licensed under the GNU GPL-2.0 License.
Author: Diego Marinho
Repository: github.com/dmoliveira/utils-scripts
Last Updated: 2026-02-13