In today's rapidly growing development world, efficient collaboration and reliable version control are non-negotiable. Whether you're a solo developer or part of a large team, managing changes to your API collections is crucial.
Bruno, as a file-based API client, integrates seamlessly with your existing Git workflow, making version control straightforward and powerful. This guide will walk you through setting up Bruno with GitHub, ensuring your API collections are always in sync with your codebase.
Feel free to check out our new guide on setting up Bruno with Bitbucket.
Just like your source code, your API requests, environments, and collections are living documents. Versioning them provides several key benefits:
Integrating Bruno with GitHub is simple, leveraging Git's standard commands. Since Bruno stores your collections directly on your filesystem as plain text files (e.g., .bru
, bruno.json
), they are perfectly suited for Git.
To interact securely with your GitHub repositories, especially private ones, using SSH keys is the recommended and most convenient method. SSH eliminates the need to enter your GitHub username and password for every Git operation, making it ideal for frequent use.
While you can also configure access using HTTPS with a Personal Access Token (PAT), SSH provides a smoother and more secure workflow for most use cases.
Open your terminal (macOS/Linux) or Git Bash (Windows).
ssh-keygen -t ed25519 -C "your_email@example.com"
Press Enter to accept the default file location (`~/.ssh/id_ed25519`). You can optionally set a strong passphrase for added security (you'll need to enter it once per session when using the key).
*Note: `ed25519` is generally preferred over `rsa` for new keys due to better security and performance.*
The SSH agent holds your keys in memory so you don't have to enter your passphrase every time.
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
If you created a key with a different name (e.g., `id_rsa_github`), specify that path instead: `ssh-add ~/.ssh/id_rsa_github`.
Your public key is what you'll add to GitHub.
cat ~/.ssh/id_ed25519.pub
Copy the entire output, starting with `ssh-ed25519` (or `ssh-rsa`) and ending with your email.
You may be prompted to confirm your GitHub password.
Verify your setup by trying to connect to GitHub via SSH.
ssh -T git@github.com
You should see a message like "Hi [your-username]! You've successfully authenticated, but GitHub does not provide shell access." This confirms your SSH key is working.
Now, open Bruno and point it to a location within your Git repository.
Once you have initialized your collection, the next step is to connect it to a remote Git repository.
With your Bruno collection now residing within your Git repository, you can manage its changes just like any other code file.
Push your local changes to the remote repository with just a few clicks.
Collaboration becomes seamless once your Bruno collections are on GitHub.
This ensures you have the most up-to-date API requests and environments from your teammates. Bruno will automatically reflect these changes.
Once the branch is created, you can start making changes to the branch.
Feel free to use this Bruno collection from GitHub to explore the Git UI feature.
Bruno's file-based nature makes it a perfect companion for Git and GitHub. By treating your API collections as a part of your codebase, you unlock powerful version control capabilities, streamline collaboration, and ensure consistency across your development team.
Start versioning your Bruno collections today and join our Discord server because your APIs deserve better collaboration.