bash-it
CLAUDE.md15k starsChanged 13 months agoMITView on GitHub
Bash-it is a collection of community Bash commands and scripts for Bash 3.2+, providing a framework for aliases, themes, plugins, and completions. It's structured as a modular system where components can be individually enabled or disabled. The project uses a gradual pre-commit system implementation via clean_files.txt allow-list: Gradual Linting System: - cleanfiles.txt: Allow-list of files/directories that pass all linting rules - lintcleanfiles.sh: Runs pre-commit hooks only on allow-listed files - When modifying files NOT in cleanfiles.txt, ensure they pass linting…
- Commits and pushes
We split this CLAUDE.md into the rules it gives an agent
14 rules. About 0 are common, 7 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 69
When modifying files NOT in clean_files.txt, ensure they pass linting before adding them to the allow-list
- Very specific: line 70
Before creating a PR, add newly cleaned files to clean_files.txt to expand coverage
- Very specific: line 114
Always create a feature branch for new work: git checkout -b feature/feature-name
- Distinctive: line 115
Keep feature branches focused on a single issue/feature
- Distinctive: line 116
Create separate branches for separate features
- Very specific: line 119
Use --force-with-lease for rebased branches
- Very specific: line 122
Use composure metadata: about, group, author, example
- Very specific: line 123
Follow naming convention: {name}.{type}.bash
- Distinctive: line 124
Test components before submitting
- Distinctive: line 129
Use BATS framework for shell script testing
- Very specific: line 130
Test files follow pattern: {component}.bats
- Distinctive: line 133
Use shellcheck for linting
- Distinctive: line 134
Follow existing code style in the repository
- Distinctive: line 135
Add appropriate metadata using composure functions
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Bash-it is a collection of community Bash commands and scripts for Bash 3.2+, providing a framework for aliases, themes, plugins, and completions. It's structured as a modular system where components can be individually enabled or disabled.
Architecture
Core Components
- bash_it.sh: Main entry point that initializes the framework
- lib/: Core libraries providing utilities, logging, helpers, and appearance functions
- scripts/reloader.bash: Component loader that sources enabled components
- install.sh: Installation script with interactive and silent modes
- enabled/: Symlinks to active components from available/ directories
Component Types
- Aliases (
aliases/available/): Command shortcuts and convenience functions - Plugins (
plugins/available/): Extended functionality and integrations - Completions (
completion/available/): Tab completion definitions - Themes (
themes/): Prompt customizations and visual styles
Loading Order
- Libraries (except appearance)
- Global enabled directory
- Enabled aliases, plugins, completions
- Theme files (if BASH_IT_THEME is set)
- Custom files from BASH_IT_CUSTOM directory
Development Commands
Testing
# Run all tests using BATS (Bash Automated Testing System)
test/run
# Run specific test suites
test/run test/bash_it test/completion test/plugins
# Tests require git submodules to be initialized
git submodule init && git submodule updateLinting and Code Quality
The project uses a gradual pre-commit system implementation via clean_files.txt allow-list:
# Run pre-commit hooks only on allow-listed clean files
./lint_clean_files.sh
# Run pre-commit hooks on all files (for testing new coverage)
pre-commit run --all-files
# Manual shellcheck on bash files
shellcheck **/*.bash
# Format shell scripts
shfmt -w **/*.bashGradual Linting System:
clean_files.txt: Allow-list of files/directories that pass all linting ruleslint_clean_files.sh: Runs pre-commit hooks only on allow-listed files- When modifying files NOT in
clean_files.txt, ensure they pass linting before adding them to the allow-list - Before creating a PR, add newly cleaned files to
clean_files.txtto expand coverage - This system allows gradual improvement of code quality across the large codebase
Vendor Directory Policy:
- Files in
vendor/are treated as immutable external dependencies - Pre-commit hooks exclude vendor files via
.pre-commit-config.yamlglobal exclude pattern clean_files.txtdoes not include vendor shell scripts, only.gitattributes- CI and local linting will skip vendor files entirely
Component Management
# Enable/disable components
bash-it enable alias git
bash-it enable plugin history
bash-it enable completion docker
# Show available components
bash-it show aliases
bash-it show plugins
bash-it show completions
# Search components
bash-it search dockerKey Configuration
Environment Variables
BASH_IT: Base directory pathBASH_IT_THEME: Active theme nameBASH_IT_CUSTOM: Custom components directoryBASH_IT_LOG_PREFIX: Logging prefix for debug output
File Structure Conventions
- Available components:
{type}/available/{name}.{type}.bash - Enabled components:
{type}/enabled/{name}.{type}.bash(symlinks) - Custom components:
custom/{name}.bash - Themes:
themes/{name}/
Development Guidelines
Git Workflow
- NEVER commit directly to master branch
- Master should always stay in sync with
origin/master - Always create a feature branch for new work:
git checkout -b feature/feature-name - Keep feature branches focused on a single issue/feature
- Create separate branches for separate features
- Push feature branches with upstream tracking:
git push -u fork feature-branch-name- This allows manual pushes later with just
git push - Use
--force-with-leasefor rebased branches
- This allows manual pushes later with just
Component Development
- Use composure metadata:
about,group,author,example - Follow naming convention:
{name}.{type}.bash - Test components before submitting
- Components should be modular and not conflict with others
Testing Components
- Each component type has dedicated test files in
test/ - Use BATS framework for shell script testing
- Test files follow pattern:
{component}.bats
Code Standards
- Use shellcheck for linting
- Follow existing code style in the repository
- Add appropriate metadata using composure functions
- Components should handle missing dependencies gracefully
- Prefix sensitive commands with
commandto bypass user aliases:command mvinstead ofmv(users may havealias mv='mv -i')command grepinstead ofgrep(users may have custom grep flags)command rminstead ofrm(users may havealias rm='rm -i')- Apply to any command that could be aliased and break core functionality
- This prevents surprises from user's alias configurations in bash-it core functions
- Use parameter expansion with default for potentially unset variables:
${VARIABLE-}instead of$VARIABLEwhen variable may be unset- Prevents errors when
set -uis active in user's shell - Examples:
${BASH_VERSION-},${HOME-},${PATH-} - Critical for variables checked in conditionals:
if [ -n "${BASH_VERSION-}" ] - This defensive practice ensures scripts work regardless of user's shell options
Project Planning & Roadmaps
Strategic planning documents are maintained in docs/plans/:
- Quick Reference - TL;DR summary of current issues and action items
- Comprehensive Issue Analysis - Detailed breakdown of all open issues with categorization and recommendations
- 2025 Roadmap - 6-month technical debt reduction plan with phases and success metrics
These documents guide ongoing maintenance, issue triage, and code quality improvements.
Trending
More talk lately.about the whole repository
Who's talking about Bash-it/bash-it
- Punjabi Anonymous“How to Customize the Termux By Changing Font Colour using [bash-it | zsh] and Changing the Banner.”YouTube · May 5, 2020 · 245 views
- Beatriz Dadalto“subversion: instalação + comandos: commit, merge, add, status, update, checkout, delete, svnserver”YouTube · May 22, 2020 · 157 views
- The Computer Oracle“Remote SSH Commands - bash bind warning: line editing not enabled”YouTube · Dec 27, 2023 · 39 views
- Gourcer“Bash-it/bash-it - Gource visualisation”YouTube · Aug 26, 2022 · 15 views
- A Hacker News story“Bash-it: A community Bash framework”Hacker News · Feb 5, 2020 · 3 points
The biggest 5 of 62 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 62
Talked about on GitHub, YouTube, Stack Overflow, Hacker News and the web (62 times).
On GitHub · 50
- Jun 19, 2024[Feature] Extract compressed files bash function — amber-lang/amber2 reactions · 9 comments
- Apr 10, 2025feat(tmux): new completion — scop/bash-completion1 reaction · 19 comments
- Jul 15, 2023Package request: bash-it — NixOS/nixpkgs1 reaction · 3 comments
- Jul 6, 2021`__bp_preexec_invoke_exec "$_"` printed when running multiple commads — rcaloras/bash-preexec1 reaction · 3 comments
- Jul 4, 2018contrib/bash/completion.sh: replaced -VAGRANTSLASH- with a literal sl… — hashicorp/vagrant1 reaction · 1 comment
45 more on GitHub
- Oct 26, 2026Update dependency Bash-it/bash-it to v3.2.0 — mAAdhaTTah/tea-party0 reactions
- Apr 10, 2025feat(tmux): new completion — dseomn/bash-completion0 reactions
- Feb 24, 2025chore(deps): bump vendor/bash-it from `d985e4c` to `43285e7` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Feb 17, 2025chore(deps): bump vendor/bash-it from `d985e4c` to `f42295e` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Feb 10, 2025chore(deps): bump vendor/bash-it from `d985e4c` to `d8eafdd` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Feb 3, 2025chore(deps): bump vendor/bash-it from `d985e4c` to `2768b4c` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Jan 27, 2025chore(deps): bump vendor/bash-it from `d985e4c` to `14ee27c` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Jan 13, 2025chore(deps): bump vendor/bash-it from `d985e4c` to `9a4af68` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Dec 30, 2024chore(deps): bump vendor/bash-it from `d985e4c` to `bbbf62a` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Nov 25, 2024chore(deps): bump vendor/bash-it from `d985e4c` to `fc83d4c` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Nov 18, 2024chore(deps): bump vendor/bash-it from `d985e4c` to `d3a4ade` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Nov 11, 2024chore(deps): bump vendor/bash-it from `d985e4c` to `8afb3a0` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Dec 11, 2023chore(deps): bump vendor/bash-it from `4339ee9` to `d985e4c` — ivankatliarchuk/dotfiles0 reactions
- Nov 20, 2023chore(deps): bump vendor/bash-it from `4339ee9` to `d985e4c` — ivankatliarchuk/dotfiles0 reactions
- Oct 30, 2023chore(deps): bump vendor/bash-it from `4339ee9` to `e01854d` — ivankatliarchuk/dotfiles0 reactions
- Mar 27, 2023chore(deps): bump vendor/bash-it from `66ae9b0` to `e38696a` — ivankatliarchuk/dotfiles0 reactions
- Feb 27, 2023chore(deps): bump vendor/bash-it from `66ae9b0` to `e38696a` — ivankatliarchuk/dotfiles0 reactions
- Jan 30, 2023chore(deps): bump vendor/bash-it from `66ae9b0` to `feb468b` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Dec 12, 2022chore(deps): bump vendor/bash-it from `1c9cfd0` to `66ae9b0` — ivankatliarchuk/dotfiles0 reactions
- Dec 5, 2022chore(deps): bump vendor/bash-it from `1c9cfd0` to `ad2b558` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Nov 7, 2022chore(deps): bump vendor/bash-it from `bf2034d` to `1c9cfd0` — ivankatliarchuk/dotfiles0 reactions
- Oct 31, 2022chore(deps): bump vendor/bash-it from `bf2034d` to `1c9cfd0` — ivankatliarchuk/dotfiles0 reactions
- Oct 24, 2022chore(deps): bump vendor/bash-it from `bf2034d` to `00062bf` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Oct 17, 2022chore(deps): bump vendor/bash-it from `bf2034d` to `00062bf` — ivankatliarchuk/dotfiles0 reactions
- Oct 16, 2022[README.md not found!] — Hunlongyu/ReadMe0 reactions
- Aug 22, 2022chore(deps): bump vendor/bash-it from `5a62acd` to `d770030` — ivankatliarchuk/dotfiles0 reactions
- Aug 15, 2022chore(deps): bump vendor/bash-it from `2ef5d48` to `5a62acd` — ivankatliarchuk/dotfiles0 reactions
- Jun 13, 2022chore(deps): bump vendor/bash-it from `4dddba3` to `2ef5d48` — ivankatliarchuk/dotfiles0 reactions
- Apr 25, 2022chore(deps): bump vendor/bash-it from `b950941` to `35334cd` — ivankatliarchuk/dotfiles0 reactions
- Apr 18, 2022chore(deps): bump vendor/bash-it from `b950941` to `35334cd` — ivankatliarchuk/dotfiles0 reactions
- Apr 14, 2022Kitty shell integration sets `$precmd_functions` even for Bash — kovidgoyal/kitty0 reactions · 3 comments
- Apr 11, 2022chore(deps): bump vendor/bash-it from `1ffbc85` to `b950941` — ivankatliarchuk/dotfiles0 reactions
- Mar 21, 2022chore(deps): bump vendor/bash-it from `0619c19` to `1ffbc85` — ivankatliarchuk/dotfiles0 reactions
- Mar 14, 2022ndor/bash-it from `e1ddf6e` to `d1b831a` — ivankatliarchuk/dotfiles0 reactions · 1 comment
- Mar 7, 2022chore(deps): bump vendor/bash-it from `0619c19` to `23ac376` — ivankatliarchuk/dotfiles0 reactions
- Feb 21, 2022chore(deps): bump vendor/bash-it from `0619c19` to `33bade2` — ivankatliarchuk/dotfiles0 reactions
- Feb 19, 2022Request for public/stable APIs to enable/disable the hooks and to manually invoke registered functions — rcaloras/bash-preexec0 reactions · 12 comments
- Feb 14, 2022chore(deps): bump vendor/bash-it from `578c702` to `0619c19` — ivankatliarchuk/dotfiles0 reactions
- Feb 7, 2022chore(deps): bump vendor/bash-it from `578c702` to `4dbe92e` — ivankatliarchuk/dotfiles0 reactions
- Jan 31, 2022chore(deps): bump vendor/bash-it from `973a1f9` to `578c702` — ivankatliarchuk/dotfiles0 reactions
- Jan 24, 2022chore(deps): bump vendor/bash-it from `c90a628` to `973a1f9` — ivankatliarchuk/dotfiles0 reactions
- Jan 17, 2022chore(deps): bump vendor/bash-it from `c90a628` to `86c1e3c` — ivankatliarchuk/dotfiles0 reactions
- Jan 10, 2022chore(deps): bump vendor/bash-it from `c90a628` to `86c1e3c` — ivankatliarchuk/dotfiles0 reactions
- Dec 24, 2021todos — ohmybash/oh-my-bash0 reactions · 1 comment
- Dec 16, 2021Segfault when command not found — starship/starship0 reactions · 2 comments
On YouTube · 4
- May 5, 2020How to Customize the Termux By Changing Font Colour using [bash-it | zsh] and Changing the Banner. — Punjabi Anonymous245 views · 2 comments
- May 22, 2020subversion: instalação + comandos: commit, merge, add, status, update, checkout, delete, svnserver — Beatriz Dadalto157 views
- Dec 27, 2023Remote SSH Commands - bash bind warning: line editing not enabled — The Computer Oracle39 views
- Aug 26, 2022Bash-it/bash-it - Gource visualisation — Gourcer15 views
On Stack Overflow · 4
- Sep 28, 2019what does {1} mean in |master {1} ✓| with bashit?3 votes · 1 answer
- Jul 29, 2019How to open working directory of a file showing on iterm2 by mouse?3 votes
- Oct 8, 2015R console in terminal. Error: R function requires 1 argument0 votes
- Jul 3, 2015How can I install iterm2 bash-it themes?-1 votes · 1 answer
On Hacker News · 2
- Feb 5, 2020Bash-it: A community Bash framework3 points
- Nov 12, 2020Bash-it: A community Bash framework1 point
On the web · 2
- Oct 31, 2016can not install · Issue #817 · Bash-it/bash-it — google.com
- Apr 15, 2014Transferring bash-it config between computers · Issue #283 — google.com
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

