Draw diagrams from private repositories on GitHub, GitLab, Bitbucket and Azure DevOps
Connect a repository host, pick a private repository, choose the names people will see, and stay in control of what Flowgraph Studio reads, what it sends to AI, and how to disconnect.
Flowgraph Studio draws a repository's services, pipelines, data model and packages from its own files. For a public repository your browser reads the files straight from the host. A private repository needs your permission, so you connect your account on the host first. This guide covers connecting each of the four hosts, importing, the extra steps that keep private names private, and how to see and withdraw what Flowgraph can do.
Plan: Pro and Pro Max. Free imports public repositories only (3 in all, with 50 refreshes a month; see Repositories on the Free plan).
Connect a host
Connect from Account, or from the import dialog when you first need it.

GitHub. Under Account → GitHub repositories, choose Connect GitHub. GitHub asks you to allow the Flowgraph Studio app, then you choose which repositories it may read: all of yours, or only some. Change that choice at any time with Choose repositories.
GitLab, Bitbucket and Azure DevOps. Under Account → GitLab, Bitbucket, and Azure DevOps, choose Connect GitLab, Connect Bitbucket or Connect Azure DevOps. Each host asks you to agree to read-only access:
| Host | What the connection can read |
|---|---|
| GitHub | Only the repositories you choose for the Flowgraph Studio app |
| GitLab | The projects you can read |
| Bitbucket | The repositories in your workspaces |
| Azure DevOps | Code in your organisations. It needs a work or school Microsoft account |
On every host, the connection can only read. Flowgraph never changes your repositories, and reads them only while you can read them yourself. Once connected, Account shows Connected as with your name on that host.
Import a private repository
- In Projects, choose Import repository.
- Under Your repositories, pick the host's tab. Your repositories are listed, most recently updated first, with a lock on the private ones. When there are many, type in Filter your repositories to find one. Or paste its address above, as you would for a public repository.
- Pick one. Flowgraph's server reads it through your connection, and the scan lists what it found, with a Private label beside the repository's name.
- Tick the diagrams you want and choose Next: names.
If a repository is missing on GitHub, choose Choose repositories on GitHub to give the app access to it. On the other hosts, only the most recent repositories may be listed; paste the address of an older one.
Choose the names people will see
A private repository's diagrams get one step more than a public one's: Choose the names people will see. The import fills in its own names, such as the repository and file names, and you can change them here:
- Project name, when the diagrams go into a new project.
- Each diagram's title.
- Description, written by the AI, for an AI overview.
A name that gives the repository away is marked "This names the repository." or "This includes a file or folder path from the repository." These names matter because if you share a diagram, its title appears on the link and in exported images, and the API and MCP return it. Choose Add and open, or Add 3 diagrams for several, when they're right.
The record of where each diagram came from (repository, commit and files) stays private. It shows only to you, in From GitHub (or From GitLab, From Bitbucket, From Azure DevOps) in the editor's top bar.
Share with care
The first time you share a diagram made from a private repository, Flowgraph asks you to confirm. People you share it with see the diagram and its title, which may show how the code is built. They never see its record of where it came from. Rename it first if the name is private too.
AI overviews of private code
With Pro and Pro Max, Make overview and Make request flow in the scan result have AI read the code and draw the system's parts, or its main request traced step by step. Each uses 5 AI credits.
For a private repository, Flowgraph asks first, once for each repository, before any of its code is read for AI. It says that excerpts of code will be sent to Anthropic, our AI provider, that they aren't used to train models, and that Anthropic may keep them for up to 30 days for safety monitoring. Files that hold credentials are left out, and values that look like secrets are replaced. Choose Agree and make overview, or Not now.
To change your mind, find the repository under AI overviews allowed in Account and choose Withdraw. The next overview of it asks again. An overview of a private repository is made for you alone and never shared with other accounts, so it always uses its credits.
See what Flowgraph read
Each host's section in Account has What Flowgraph read (last 90 days): for each read of a private repository, the repository, the commit, how many files, and whether it was for an AI overview. Flowgraph keeps no file names or code from it.
Refresh and disconnect
Refresh from GitHub (or the other hosts) in From GitHub reads the branch's latest commit through the same connection and shows what changed, so you can replace the diagram or add the new drawing beside it.
To stop Flowgraph reading a host, choose Disconnect in its Account section. Flowgraph deletes its tokens. On GitHub, it also withdraws the app's access there. Some hosts give Flowgraph no way to withdraw its own access, and then Account links to the host's page of authorised apps so you can remove Flowgraph Studio there too. The diagrams you made stay in your account, but can't be refreshed until you connect again.
For what each scan draws on each host, see the guides for GitHub, GitLab, Bitbucket and Azure DevOps, and Diagrams from repositories in the docs.
More guides
- Edit Mermaid diagrams visually in VS CodeDrag, connect and restyle a Mermaid diagram on Flowgraph's canvas inside VS Code, and every change is written back into the .mmd file or Markdown block as ordinary code.
- Keep a diagram's style in its code with %% flowgraph-themeOne comment line keeps a Mermaid diagram's Flowgraph theme in the file, so it looks the same in your repository, in VS Code, from the CLI and through the render API.
- Preview Flowgraph diagrams in VS Code, with icons, layout and your themeInstall the Flowgraph Studio extension to preview Mermaid files and Markdown blocks in VS Code as Flowgraph draws them, see mistakes in plain words, and export SVG or PNG.