GitBuilder is a powerful command-line tool for managing GitHub repositories, automating the build process, and launching binaries. It provides a comprehensive solution for developers who frequently work with multiple GitHub projects.
- Repository Management: Add, edit, and remove GitHub repositories
- Automated Building: Detect and use the appropriate build system (CMake, Autotools, Make, Gradle, Maven, etc.)
- Binary Management: Find, register, and launch built binaries with an interactive file browser
- Build Configuration: Customize build flags for different build systems
- Repository Updates: Keep repositories up-to-date with the latest commits
- Build Details: View and edit comprehensive information about repositories and their build status
- Smart Caching: Efficient handling of GitHub API requests with 4-hour caching
- Existing Clone Support: Option to use existing repository clones instead of downloading fresh copies
- Interactive File Browser: Browse directories and select executable files with an intuitive interface
- Dependency Management: Specify and automatically install software dependencies for each repository
- Custom Build File Support: Specify custom build file paths for repositories
- gitbuildfile Support: Override auto-detection with a custom build configuration file. Ask your favourite Gits to include a gitbuildfile in their project to automate the build process.
-
Clone this repository:
git clone https://github.com/vr51/gitbuilder.git
-
Make the script executable:
chmod +x gitbuilder
-
Optionally, move it to a directory in your PATH:
sudo cp gitbuilder /usr/local/bin/
GitBuilder requires the following dependencies:
- sqlite3
- curl
- jq
- git
- make
- cmake
- file
The script will check for these dependencies and prompt you to install any that are missing.
Simply run the script:
./gitbuilder
- Add repository: Add a new GitHub repository to manage
- Edit repository: Modify an existing repository's details
- Remove repository: Delete a repository from the database
- Download and build: Clone and build a repository (with option to use existing clones)
- See/edit build details: View and edit comprehensive information about a repository, including build configuration, dependencies, and build file paths
- Launch binary: Run a built binary
- Update all repositories: Update all repositories to their latest versions
- Exit: Quit the application
GitBuilder now supports a custom build configuration file called gitbuildfile
. If this file is found in the root of a repository, it will override the auto-detection process and use the specified build configuration.
The gitbuildfile
can contain the following parameters:
# Repository information
REPO_NAME="example-repo"
# Build method (cmake, autotools, make, etc.)
BUILD_METHOD="cmake"
# Space-separated list of dependencies
DEPENDENCIES="libsdl2-dev libssl-dev"
# Path to the build file (relative to repo root or absolute)
BUILD_FILE="src/CMakeLists.txt"
# Build flags
CONFIGURE_FLAGS="--enable-feature1 --disable-feature2"
MAKE_FLAGS="-j4"
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release"
# Path to the compiled binary (relative to repo root or absolute)
BINARY_PATH="build/bin/example"
All parameters are optional. If a parameter is not specified, GitBuilder will use the auto-detected value or the value stored in the database.
GitBuilder automatically detects and uses the appropriate build system:
- CMake: For projects using CMakeLists.txt
- Autotools: For projects using configure scripts or autogen.sh
- Make: For projects using Makefiles
- Gradle: For Java/Android projects using build.gradle
- Maven: For Java projects using pom.xml
- Python: For Python projects with setup.py
- Node.js: For JavaScript projects with package.json
- Meson: For projects using meson.build
After building a project, GitBuilder can:
- Automatically detect built binaries
- Register them for easy access using an interactive file browser
- Browse directories and select executable files with a user-friendly interface
- Launch binaries in either quiet (background) or verbose (terminal output) mode
GitBuilder stores all data in ~/.local/share/gitbuilder/
:
- Database:
repos.db
- Source code:
src/
- Build logs: Within each project directory
- Select "Add repository" from the main menu
- Enter the repository name (e.g., "ZEsarUX")
- Enter the GitHub URL (e.g., "https://github.com/chernandezba/zesarux.git")
- Select "Download and build" from the main menu
- Enter the repository ID to build
GitBuilder can now detect and install software libraries required by individual projects. You can specify dependencies for each repository in the build details menu.
Binaries are installed locally in the ~/.local/share/gitbuilder/src/
directory. This means you do not usually need to use sudo to launch them.
- Select "See/edit build details" from the main menu
- Enter the repository ID
- View and edit comprehensive information about the repository, including:
- Repository details (name, URL, commit dates)
- Build status and type
- Binary information and path (with interactive file browser)
- Custom build file path (with interactive file browser)
- Build configuration flags for different build systems (Configure, Make, CMake)
- Software dependencies required for building
- Use the interactive menu to edit repository details and build configurations
- Select "Launch binary" from the main menu
- Enter the repository ID
- Choose launch mode (quiet or verbose)
- The binary will be executed
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU General Public License v3.0 - see the header in the script file for details.
If you find this tool useful, please consider donating:
- PayPal: https://paypal.me/vr51/
- Cascade - Initial work
- VR51 - Prompt Engineer, Maintainer, Developer, Project Supervisor
GitBuilder - Making GitHub project management easier since 2025