{"id":21508607,"url":"https://github.com/simolinuxdesign/modular-bashrc-manager","last_synced_at":"2026-03-15T02:56:12.493Z","repository":{"id":264365001,"uuid":"866284217","full_name":"SimoLinuxDesign/Modular-Bashrc-Manager","owner":"SimoLinuxDesign","description":"A simple, modular, and clean way to manage your .bashrc file on linux.","archived":false,"fork":false,"pushed_at":"2024-12-27T12:56:32.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T01:34:13.561Z","etag":null,"topics":["bash-script","debian-linux","linux","linux-shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SimoLinuxDesign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-02T01:01:53.000Z","updated_at":"2024-12-27T12:56:37.000Z","dependencies_parsed_at":"2024-11-23T18:41:20.877Z","dependency_job_id":null,"html_url":"https://github.com/SimoLinuxDesign/Modular-Bashrc-Manager","commit_stats":null,"previous_names":["simolinuxdesign/modular-bashrc-manager"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimoLinuxDesign%2FModular-Bashrc-Manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimoLinuxDesign%2FModular-Bashrc-Manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimoLinuxDesign%2FModular-Bashrc-Manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimoLinuxDesign%2FModular-Bashrc-Manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimoLinuxDesign","download_url":"https://codeload.github.com/SimoLinuxDesign/Modular-Bashrc-Manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244055784,"owners_count":20390716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-script","debian-linux","linux","linux-shell"],"created_at":"2024-11-23T21:07:08.260Z","updated_at":"2026-03-15T02:56:12.482Z","avatar_url":"https://github.com/SimoLinuxDesign.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modular Bashrc Manager\n### A simple, modular, and clean way to manage your .bashrc file in Linux.\n---\n\nThis project provides a modular system for managing Bash scripts within the .bashrc environment. It allows users to easily enable, disable, create, and manage custom scripts through a well-structured directory layout, making the .bashrc configuration cleaner and easier to maintain.\n\n## Features\n\n- **Modular Setup**: Keep your .bashrc organized by loading only necessary scripts at runtime.\n- **Script Management**: Easily create, enable, disable, and manage scripts through a simple command interface.\n- **Automatic Directory Structure**: The installer automatically creates directories for managing available, enabled, removed, and required scripts.\n- **Customizable Script Templates**: When creating a new script, a template with placeholders for options, variables, functions, and execution logic is provided.\n- **Easy Integration**: Automatically integrate with your existing .bashrc setup.\n- **Colorful Echo (`ccecho`)**: Print colored and styled messages for better terminal output, ( usable even outside of the brc-script environment )\n\n## Directory Structure\n\nAfter installation, the system uses the following directory layout to manage scripts:\n\n- `~/.bashrc.d/`: Main directory for managing Bash scripts.\n  - `installer/`: Contains the installer and base script.\n    - `brc-script-install.sh`\n  - `scripts-available/`: Scripts available to be enabled.\n  - `scripts-enabled/`: Symbolic links to enabled scripts.\n  - `scripts-needed/`: Essential scripts required for the system to work.\n    - `brc-script.sh`\n    - `ccecho.sh`\n  - `scripts-removed/`: Backup of removed scripts, timestamped.\n\n## Installation\n\n### Automated Installation\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/SimoLinuxDesign/Modular-Bashrc-Manager.git\n    cd modular-bashrc-manager/installer\n    ```\n\n2. Make the installer executable and run it:\n    ```bash\n    chmod +x brc-script-install.sh\n    ./brc-script-install.sh\n    ```\n\nThe installer will:\n- Create the necessary directory structure: `scripts-needed`, `scripts-enabled`, `scripts-available`, and `scripts-removed`.\n- Append the required configuration to your .bashrc file.\n- Copy the main `brc-script.sh` script and `ccecho.sh` to `scripts-needed/`.\n\nReload the `.bashrc` file by running:\n```bash\nsource ~/.bashrc\n```\n\n### Manual Installation\n\n1. Copy the `brc-script.sh` and `ccecho.sh` files to the `~/.bashrc.d/scripts-needed/` folder:\n    ```bash\n    cp brc-script.sh ccecho.sh ~/.bashrc.d/scripts-needed/\n    chmod 750 ~/.bashrc.d/scripts-needed/brc-script.sh ~/.bashrc.d/scripts-needed/ccecho.sh\n    ```\n\n2. Append the following lines to your `.bashrc` file:\n    ```bash\n    # Modular Bashrc\n    if [ -d ~/.bashrc.d ]; then\n        for needed in ~/.bashrc.d/scripts-needed/*.sh; do\n            [ -r \"$needed\" ] \u0026\u0026 source \"$needed\"\n        done\n        unset needed\n        for file in ~/.bashrc.d/scripts-enabled/*.sh; do\n            [ -r \"$file\" ] \u0026\u0026 source \"$file\"\n        done\n        unset file\n    fi\n    ```\n\n3. Create the necessary directories:\n    ```bash\n    mkdir -p ~/.bashrc.d/scripts-needed ~/.bashrc.d/scripts-enabled ~/.bashrc.d/scripts-available ~/.bashrc.d/scripts-removed\n    ```\n\n4. Reload `.bashrc`:\n    ```bash\n    source ~/.bashrc\n    ```\n\n## Usage\n\nThe `brc-script.sh` script provides a series of commands to manage your .bashrc scripts:\n\n- `-c` : Create a new script in the `scripts-available/` folder.\n- `-m` : Modify an existing script.\n- `-l` : List all available and enabled scripts.\n- `-e` : Enable a script from the `scripts-available/` folder.\n- `-d` : Disable an enabled script.\n- `-r` : Remove a script, backing it up in `scripts-removed/`.\n\n### Example Commands\n\n- Create a new script:\n    ```bash\n    brc-script -c\n    ```\n\n- List all available scripts:\n    ```bash\n    brc-script -l\n    ```\n\n- Enable a script:\n    ```bash\n    brc-script -e\n    ```\n\n- Disable a script:\n    ```bash\n    brc-script -d\n    ```\n\n- Remove a script:\n    ```bash\n    brc-script -r\n    ```\n\n## Extra Utilities\n\n### `ccecho`: Colorful Echo for Enhanced Output\n\nThe project includes a utility script `ccecho.sh` located in `scripts-needed/`, which defines a function `ccecho`. This command allows you to print styled and colored messages to the terminal.\n\n#### Usage\n\n```bash\nccecho -t green -b black -s bold \"Success!\"\nccecho -t red -s underline \"Error!\"\nccecho \"Normal message without styling\"\n```\n\n#### Available Text Colors\n`black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `bblack`, `bred`, `bgreen`, `byellow`, `bblue`, `bmagenta`, `bcyan`, `bwhite`\n\n#### Background Colors\nSame as above, applied with `-b`\n\n#### Styles\n`bold`, `dim`, `italic`, `underline`, `blink`, `reverse`, `hidden`, `strike`\n\n#### Make `ccecho` Globally Available\n\nIf you'd like to use `ccecho` in other terminal sessions or scripts, you can source it in your `.bashrc`:\n\n```bash\nsource ~/.bashrc.d/scripts-needed/ccecho.sh\n```\n\n## Why Use This System?\n\nManaging a large .bashrc file can become unmanageable, especially when adding multiple custom commands or functions. This system offers a structured approach to handle modular scripts, making it easier to enable or disable specific configurations without manually editing the .bashrc file each time.\n\n### Benefits\n\n- **Organization**: Keep your .bashrc clean and easy to maintain by separating scripts.\n- **Simplicity**: Use simple commands to manage scripts without editing .bashrc directly.\n- **Safety**: Removed scripts are safely backed up in the `scripts-removed/` directory.\n\n## Contributing\n\nContributions are welcome! If you find any bugs or have suggestions for improvements, feel free to open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimolinuxdesign%2Fmodular-bashrc-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimolinuxdesign%2Fmodular-bashrc-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimolinuxdesign%2Fmodular-bashrc-manager/lists"}