{"id":22311636,"url":"https://github.com/ludbek/bro","last_synced_at":"2025-08-07T09:33:38.324Z","repository":{"id":35424151,"uuid":"39689344","full_name":"ludbek/bro","owner":"ludbek","description":"A project bootstrapper.","archived":false,"fork":false,"pushed_at":"2022-09-26T23:39:33.000Z","size":131,"stargazers_count":37,"open_issues_count":4,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T10:22:06.149Z","etag":null,"topics":["bootstrap","project","task","task-manager","tmux"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ludbek.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-25T14:39:55.000Z","updated_at":"2024-05-26T08:43:10.000Z","dependencies_parsed_at":"2023-01-15T20:48:38.094Z","dependency_job_id":null,"html_url":"https://github.com/ludbek/bro","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/ludbek/bro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludbek%2Fbro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludbek%2Fbro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludbek%2Fbro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludbek%2Fbro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ludbek","download_url":"https://codeload.github.com/ludbek/bro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludbek%2Fbro/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267653260,"owners_count":24122170,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bootstrap","project","task","task-manager","tmux"],"created_at":"2024-12-03T21:25:38.476Z","updated_at":"2025-07-29T08:32:28.455Z","avatar_url":"https://github.com/ludbek.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Bro\nA project bootstrapper.\n\n## Possibilities\n- start text editor, terminal, browser, spaceship and more with single command\n- support for tmux allows one to create complex terminal layouts\n\n## Screencasts\n### 1. Creating fresh project\n![bro-example](https://user-images.githubusercontent.com/8296449/50532502-2cf3e400-0b6e-11e9-84af-c5f77a04e5cc.gif)\n\n### 2. Creating a project from remote template\n![bro](https://user-images.githubusercontent.com/8296449/50532391-d5a14400-0b6c-11e9-9d1f-3f57d271f017.gif)\n\n## Table of content\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n* [Requirement](#requirement)\n  * [OS](#os)\n  * [Tmux](#tmux)\n* [Installation](#installation)\n  * [1. Download and install bro](#1-download-and-install-bro)\n  * [2. Set the directory where bro will reside](#2-set-the-directory-where-bro-will-reside)\n  * [3. Set the directory where bro will store the projects](#3-set-the-directory-where-bro-will-store-the-projects)\n  * [4. Activate bro](#4-activate-bro)\n* [Usage](#usage)\n  * [Create project](#create-project)\n    * [project](#project)\n    * [-t (optional)](#-t-optional)\n    * [-p (optional)](#-p-optional)\n  * [Work on a project](#work-on-a-project)\n  * [Jump to a project directory](#jump-to-a-project-directory)\n  * [List projects](#list-projects)\n  * [Remove a project](#remove-a-project)\n  * [Takeover an existing project](#takeover-an-existing-project)\n  * [Exit from a project](#exit-from-a-project)\n* [Auto Completion](#auto-completion)\n  * [Auto completion for tasks](#auto-completion-for-tasks)\n* [Tmux](#tmux-1)\n  * [structure](#structure)\n  * [window](#window)\n  * [run](#run)\n  * [vsplit](#vsplit)\n  * [hsplit](#hsplit)\n  * [pane](#pane)\n  * [focus](#focus)\n  * [connect](#connect)\n  * [An example tmux setup is given below](#an-example-tmux-setup-is-given-below)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n## Requirement\n### OS\nThe script works only in Linux and Mac.\n\nMac OS needs `gsed`. Install it with `brew install gnu-sed`.\nAlso add following lines to `.bash_profile` if not already present.\n\n```bash\nif [ -f $HOME/.bashrc ]; then\n        source $HOME/.bashrc\nfi\n```\n\n### Tmux\nBro requires tmux 2 and above.\n\n1. Mac\n`brew install tmux`\n\n2. Ubuntu\n`sudo apt-get install tmux`\n\n\n## Installation\nRun following commands for installation.\n\n### 1. Download and install bro\n\n```shell\n$ curl -o  /tmp/bro https://raw.githubusercontent.com/ludbek/bro/master/install \u0026\u0026 sh /tmp/bro\n```\n### 2. Set the directory where bro will reside\n\n```shell\nBRO_STATION? ($HOME/.bro):\n```\n### 3. Set the directory where bro will store the projects\n\n```shell\nWORKSTATION? ($HOME/projects):\n```\n### 4. Activate bro\n\n```shell\n$ source ~/.bashrc\n```\n\n## Usage\nBasic project management commands.\n\n### Create project\n`bro create [-t template -p path] \u003cproject\u003e`\n\n#### project\nName of the project being created.\n\n```shell\n$ bro create aproject\n```\n\n#### -t (optional)\nTemplate is a generic project structure which can be used to create multiple projects.\nIt could be a local directory or a remote git repository. If exists, it executes script\nat `\u003ctemplate-name\u003e/tasks/setup[.ext]`.\n\n[Click here for a remote project template.](https://github.com/ludbek/bro-example)\n\n```shell\n# create project from local directory template\n$ bro create -t /path/to/local/template/ aproject\n\n# create project from remote git repo\n$ bro create -t git@github.com:auser/atemplate-repo.git aproject\n```\n\n#### -p (optional)\nPath where the new project will be created. By default it is created at the default directory\nas specificed by environment variable `WORKSTATION`.\n\nThe path could be in following formats:\n\n1. `-p /absolute/path/to/project`\n2. `-p ~/path/to/project`\n3. `-p category`\n      Path relative to the default project directory.\n\n```shell\n# create project in default project directory\n$ bro create aproject\n\n# create project at home directory\n$ bro create -p ~/ aproject\n\n# categorize projects\n# creates project at $WORKSTATION/web/blog\n$ bro create -p web blog\n\n# creates project at $WORKSTATION/web/gifhunter\n$ bro create -p web gifhunter\n```\n\n### Work on a project\n`$ bro start \u003cproject\u003e` [...params]\n\nTakes user to the project directory. It executes the hook at `\u003cproject-dir\u003e/tasks/init[.ext]` if it exists (More on this later).\nIn then context of above example, to work on the `blog` project, all I have to do is hit following command.\n\n`$ bro start blog`\n\nWe can pass parameters to the `\u003cproject-dir\u003e/tasks/init[.ext]`. It gives us an ability to differ the way we start a project.\n`$ bro start blog test`\n`$ bro start blog open-aws-console`\n\n### Jump to a project directory\n`$bro cd \u003cproject\u003e`\n\nIt takes us to the project directory. Useful in situations where one wishes to jump to the project directory without\ninvoking `init` hook.\n\n### List projects\n`$ bro list`\n\nLists available projects.\n\n### Remove a project\n`$ bro remove \u003cproject\u003e`\n\nRemoves the project reference from bro's project index.\nOnce the project has been removed `bro` will no longer handle it.\nRemoving project won't remove the project directory.\n\n### Takeover an existing project\n`$ bro takeover \u003cproject_path\u003e [project_name]`\n\nIf there are projects which `bro` did not create, one can easily hand it to `bro` with this command.\n\n```shell\n# suppose there is an awesome project at ~/path/to/awesome-project\n# to let 'bro' handle it, execute following command\n$ bro takeover ~/path/to/awesome-project awesome-project\n```\n\nTo takeover projects in remote repo, use `create` command.\n\n`$ bro create -t git@github.com:auser/awesome-project.git awesome-project`\n\n### Exit from a project\nOne can quit current tmux session with `bro exit` command.\n\n\n## Auto Completion\nAll the commands are auto completed by default.\n\n### Auto completion for tasks\nYou can have some tasks to be executed inside `\u003cproject_root\u003e/tasks/init.sh`.\nAny function within init.sh is automatically displayed as auto completion option.\n\nFor example, you want to run docker containers using docker-compose with the command\n`bro start \u003cyour_project\u003e start-docker` so that you don't have to manually run the command.\nThen the `init.sh` could be:\n\n```shell\n# $1 is always the project name\n# $2 is what you provide after project name in the bro start command\naction=$2\n\nstart-docker () {\n    docker-compose up\n}\n\n# or you want to assemble your android project\nassemble () {\n    cd android\n    ./gradlew assembleDebug\n}\n\n$action\n\n```\nIn this case, `start-docker` and `assemble` will appear as auto completion options while starting project.\n\n## Tmux\n`bro` provides essential apis for intereacting with `tmux`.\n`bro` requires `tmux` 2 or greater.\nThese apis are available only inside the task files.\n\n### structure\n`$ structure \u003cproject\u003e`\n\nStarts new tmux session.\n\n### window\n`$ window \u003cname\u003e`\n\nCreates new `tmux` window.\n\n### run\n`$ run \"\u003cshell command\u003e\"`\n\nSends given shell command to current window or pane.\n\n### vsplit\n`$ vsplit`\n\nVertically splits current window and selects the left pane.\n\n### hsplit\n`$ hsplit`\n\nHorizontally splits the current window and selects the top pane.\n\n### pane\n`pane \u003cright|down\u003e`\n\nSelects the right pane or the pane below the current pane.\n\n### focus\n`focus \u003cwindow\u003e`\n\nSelects a window with given name.\n\n### connect\n`connect \u003cproject\u003e`\n\nAttach to a tmux session with given project name.\n\n### An example tmux setup is given below\nThese apis are available only at `\u003cproject-name\u003e/tasks/init` script.\nIt must be a bash script.\n\n```shell\n#!/bin/sh\n\nstructure $project\n  window editor\n    run \"nvim\"\n  window shell\n    run \"python manage.py shell\"\n  window terminal\n  window builds\n    vsplit\n      run \"python manage.py runserver\"\n    pane right\n      hsplit\n        run \"webpack --watch\"\n      pane down\n        run \"cd semantic\"\n        run \"gulp watch\"\n\nfocus editor\nconnect $project\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fludbek%2Fbro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fludbek%2Fbro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fludbek%2Fbro/lists"}