Import

Diagrams from GitHub, GitLab, Bitbucket and Azure DevOps

Flowgraph Studio draws a repository from its own files: its services, CI pipeline, data model and packages from configuration, and maps of its folders, imports, classes, routes and functions from the code, with no AI. On Pro and Pro Max, AI can also draw an overview of its architecture and its main request. Public repositories work on every plan; private ones on Pro and Pro Max. Each diagram remembers where it came from, so it can be checked and refreshed.

Import a repository

Scan a public repository on GitHub, GitLab, Bitbucket or Azure DevOps and choose the diagrams to add.

  1. In Projects, choose Import repository (in the sidebar under Open file, or in an empty project).
  2. Paste the repository’s address: github.com/owner/repository, gitlab.com/group/project, bitbucket.org/workspace/repository or dev.azure.com/organisation/project/_git/repository.
  3. To scan one folder of a large repository, add the branch and folder: /tree/branch/folder on GitHub, /-/tree/branch/folder on GitLab, /src/branch/folder on Bitbucket. On Azure DevOps, open the branch and folder in Azure and paste that address.
  4. Choose Scan repository. The dialog says what it’s doing: finding the latest commit, reading the files that describe the project, drawing.
  5. The result shows the branch, the commit (linked to the host) and the folder, any notes about what was left out, and the diagrams found. Each is ticked; untick those you don’t want, or use Clear all and Select all.
  6. Under Style, pick a theme, or the style of one of your templates or presets. Left as it is, the diagrams take the editor’s current style. Your choice is remembered in this browser.
  7. Choose Add and open (or Add 3 diagrams for several). They go into a new project named after the repository, or into the open project when your plan has no room for another.
  • Plans: scanning needs no account. Adding diagrams needs one; Free counts repositories (see Limits on Free). No AI is used, so no credits.
  • Your data: your browser reads a public repository straight from the host. The files aren’t sent to Flowgraph, which keeps only the diagrams you add and where they came from. Code diagrams of GitHub and Bitbucket are the exception: see Codebase map.
  • If it doesn’t work: hosts limit how often one network can read without signing in. GitHub’s limit is shared by everyone on your network’s address, and Bitbucket allows only about 60 reads an hour, so scan one folder of a large Bitbucket repository. When a limit runs out, the scan says when to try again. Scan another goes back to the address.

Guides: GitHub, GitLab, Bitbucket, Azure DevOps.

Import repository, paste the address, Scan repository, pick a style, then Add and open.

From the repository’s files

The scan draws what the repository’s configuration already describes. Each kind of file becomes its own diagram, ready to edit, style and export like any other.

  • Services from Docker Compose: a node for each service, with an icon from its image and its published ports. depends_on and links become arrows, named volumes cylinders, and networks groups.
  • Kubernetes from manifests in folders such as k8s/, deploy/ or manifests/: Ingresses and routes to Services, Services to the workloads they select, and the ConfigMaps, Secrets and volume claims each uses (names only, never a Secret’s values). Kustomize overlays and Helm charts aren’t drawn.
  • Infrastructure from Terraform: each folder of .tf files, with a node for each resource and module, and an arrow wherever one refers to another.
  • Endpoints from an OpenAPI 3 or Swagger 2.0 description: the paths grouped by tag, each with a badge for every method.
  • The CI pipeline from GitHub Actions, GitLab CI (.gitlab-ci.yml, with its local includes), Bitbucket Pipelines (bitbucket-pipelines.yml) or Azure Pipelines (azure-pipelines.yml): triggers, jobs and the order they run in.
  • The data model from a SQL schema, or from the migrations replayed in order, and from a Prisma schema, as ER diagrams.
  • The package map of npm, pnpm and Yarn workspaces, with the dependencies between packages.
  • Mermaid diagrams already written in the README and other Markdown.

If nothing is found, the result says what it looks for. A generated diagram is a starting point: compare it with what runs, since Compose files often describe local development, and a call over HTTP without a depends_on line has no arrow until you add one. The notes in the scan result say what was left out and why, such as files over 1 MB or stored with Git LFS.

The same diagrams can be drawn outside the app with flowgraph-cli: flowgraph scan on a folder on disk, and flowgraph sync in CI, which redraws them on every push and commits them into your README.

Guides: Kubernetes, SQL to an ER diagram, Keep architecture diagrams up to date, Keep README diagrams up to date in CI.

The scan lists what the configuration describes: here Compose services, Kubernetes and the GitHub Actions pipeline.

Codebase map

A map of the repository’s folders, drawn from left to right: what each holds (routes, models, migrations, components, tests, commands, documentation, or the package it is), its files and lines of code, its main language, and the files where programs start.

  1. In Projects, choose Import repository, paste the address and choose Scan repository.
  2. In the scan result, find the diagram under From the code.
  3. Read the line under Codebase map, such as “40 files in 7 folders, code in JavaScript”, and choose Draw.
  4. The row shows the map’s summary and notes, ticked to add with the other diagrams.
  5. For a large repository, choose one of the folders listed under the map (Scan a folder for more detail) to scan it on its own.

How every diagram under From the code reads the code:

  • No AI, and the same commit always gives the same diagram.
  • The files are read only when you choose Draw: at most 2,000 files and 25 MB, and no file over 400 KB. The result says what was left out.
  • The commit comes as one download where the host allows it: from GitLab and Azure DevOps straight to your browser; from GitHub and Bitbucket, when you’re signed in, passed through Flowgraph’s server as it arrives (at most 50 MB), without being kept or logged. Otherwise the files are read one by one.
  • A large repository is shown to about 50 folders: the largest are opened first and the rest counted in the folders that hold them.

The same code diagrams can be drawn from a folder on disk with flowgraph-cli, for scripts and CI: see drawing diagrams from the code in CI, and keeping them in your README.

Scan a repository, choose Draw beside Codebase map, then add the map and open it.

Module dependencies

Which files import which, for TypeScript, JavaScript, Python, Java, Go and C#, with circular imports marked.

  1. In Projects, choose Import repository, paste the address and choose Scan repository.
  2. In the scan result, find the diagram under From the code.
  3. Under Module dependencies, choose Draw. The row counts the files as your browser parses them (“Finding imports: 8 of 12 files…”).
  4. When it’s drawn, the row shows the summary and notes, ticked to add.
  • What it follows: relative imports, index files, tsconfig paths, workspace packages and their exports; Python packages and relative imports; Java packages across Maven and Gradle modules; Go packages by their module path from go.mod (drawn by package, its folder, rather than by file); C# namespaces, usings and .csproj project references.
  • Size: up to 30 files are drawn one by one. More are drawn by folder, with the number of imports on each arrow.
  • Marked and counted: circular imports are dotted arrows marked “circular” and named in the notes. Imports from outside packages, imports worked out when the code runs, and test files are counted, not drawn.
  • Your data: your browser parses the code with Tree-sitter, loaded from Flowgraph’s own site only when the code has that language. Nothing is sent anywhere.
Choose Draw beside Module dependencies: your browser reads the imports, and the diagram opens in the editor.

Class diagrams

The classes, interfaces, abstract classes and enums of TypeScript, JavaScript, Python, Java, Go and C#, as Mermaid class diagrams you can edit in Manual mode: their fields and methods with visibility and types, what each extends and implements, and which classes each uses through its field and parameter types.

  1. In Projects, choose Import repository, paste the address and choose Scan repository.
  2. In the scan result, find the diagram under From the code.
  3. Under Class diagrams, choose Draw for one diagram, or One per folder for a diagram for each folder.
  4. The row shows what was drawn, such as “3 classes, 1 interface, 2 relationships”, with notes. Draw one per folder instead (or Draw as one diagram instead) switches between the two.
  • Also drawn: TypeScript types that describe objects, Java records, and C#’s structs, records and partial classes (as one).
  • Names are matched across files through the imports, or in C# through the namespaces in scope. Classes from packages or other folders are drawn as empty boxes, and outside interfaces as circles on the class.
  • Size: a diagram shows up to 25 classes with their members; more are drawn without them, and more than 40 are split by folder. A class with many members shows 10, private ones left out first. The notes say what was left out.
  • Python shows type hints where there are some, and says how many are missing. Go’s structs show the methods declared on them in any file of the package, and an interface as implemented when a type declares each of its methods.

Guide: Mermaid class diagrams.

Choose Draw beside Class diagrams (or One per folder), then add the diagram and open it.

Route map

Each endpoint, page and command the code declares, and the function that handles it, with middleware and guards as badges.

  1. In Projects, choose Import repository, paste the address and choose Scan repository.
  2. In the scan result, find the diagram under From the code.
  3. The Route map row names the frameworks it recognised, such as “Express; 10 files to look through for routes”. Choose Draw.
  4. The row shows how many routes were found, with notes on what was read and what couldn’t be followed.
  • Frameworks: Express, Hono, Fastify, Koa, NestJS, Next.js and Remix; FastAPI, Flask and Django; Spring and JAX-RS; Commander, Click and Typer commands; Go’s net/http, Gin, Echo and chi; and ASP.NET Core’s controllers and minimal APIs. It is offered only when the manifests or file names show one of them.
  • Routers mounted in others are followed with their prefixes where the code says so plainly, as are Spring’s and JAX-RS’s class-level paths. A prefix worked out when the code runs shows as “…”.
  • Routes made when the code runs, in a loop or from a list, can’t be found. With an OpenAPI description in the repository, the notes compare the two.
  • A large app is drawn with plain labels, and a very large one by file, so it stays readable.

The route map also lets you choose which route the AI request flow traces.

The Route map row names the framework it found. Choose Draw, then add the map and open it.

Function flowchart

One function’s logic as a flowchart, for TypeScript, JavaScript, Python, Java, Go and C#: its steps, decisions, loops and errors.

  1. In Projects, choose Import repository, paste the address and choose Scan repository.
  2. In the scan result, find the diagram under From the code.
  3. Under Function flowchart, type part of a file’s path and choose the file. Only that file is read.
  4. Its outline lists its functions, methods, classes and named arrow functions, with their lines. Choose Draw beside one.
  5. The flowchart is added to the list below, ticked. Draw more from the same file, or Change file.
  • What it shows: if, switch, match and ternaries that stand for statements as decisions; loops with their arrow back; try/catch/finally; early returns, break and continue; thrown errors as ends of their own. In Go also select, type switches, defer and go as steps, panic as a thrown error and goto as an arrow to its label. Four or more plain statements in a row are one step.
  • Limits: functions over 500 lines, more than 6 deep, or with more than 60 steps aren’t drawn, and the outline says why.
  • Refresh finds the function again by its name, so moved lines don’t matter. In the diagram’s From GitHub panel, a step that calls a function of the same repository can draw that function’s flowchart too, linked from the step.
Under Function flowchart, find a file, choose Draw beside a function, then add the flowchart and open it.

Call map

Which function calls which, in the folder scanned or in one file, for TypeScript, JavaScript, Python, Java, Go and C#. It is approximate and says so on the diagram: calls are found by name, so calls through interfaces, callbacks and events aren’t shown.

  1. In Projects, choose Import repository, paste the address and choose Scan repository.
  2. In the scan result, find the diagram under From the code.
  3. Under Call map, choose Draw for the whole folder, or Draw the call map of one file and choose the file.
  4. The map is added, ticked. If it doesn’t fit, the row suggests a smaller folder, one file or a function’s flowchart instead.
  • Calls it can’t match (methods on other objects, callbacks, packages) are counted on each function, never guessed. A call made more than once is one arrow with its count.
  • Rounded boxes are entry points: exported functions, and functions nothing in the map calls.
  • Size: up to 40 boxes. Over that, functions with no matched calls are left out first, then functions are grouped, such as “7 helpers of buildRequest()”; entry points stay open. A folder of more than 80 source files is refused before anything is read, with smaller folders to scan.
  • In the map’s From GitHub panel, each function can draw its flowchart, linked from its box.
Choose Draw beside Call map for the folder, then add the map and open it. It is approximate, and says so.

A folder on your computer

Draw a project that isn’t on a host, or one you have checked out, from a folder on your computer. You get the same diagrams as from a repository, configuration and code alike.

  1. In Projects, choose Import repository.
  2. Under the address, choose Choose a folder and pick the folder, or drop the folder on that box.
  3. The result says “A folder on this computer”. Draw, tick and add the diagrams as for a repository.
  • Your data: your browser reads the folder. Nothing is uploaded.
  • Plans: it counts as one of Free’s 3 repositories, by the folder’s name.
  • Refresh: its diagrams show From your computer in the editor’s top bar. There, Refresh from the folder asks you to choose the same folder again, draws it as it is now, and shows what changed. That counts as a refresh.
  • AI overviews aren’t offered for a folder.
Choose a folder in the import dialog: your browser reads it and nothing is uploaded.

Limits on Free

On Free, diagrams can come from 3 repositories in all (not a month), and be refreshed 50 times a month. Pro and Pro Max have no limit on either.

  • What counts: a repository takes a place the first time you add diagrams from it. More diagrams from it are always fine, and its folders are the same repository. Each host and name is its own repository, and a folder on your computer counts as one.
  • What doesn’t: scanning, and opening, editing, exporting or sharing a diagram you have.
  • Refreshes: each refresh you start counts, even when the diagram turns out to be up to date. They reset on the first of each month.

To see where you are:

  1. In the import dialog, read the line such as “Free plan: 2 of 3 repositories, 14 of 50 refreshes this month.”
  2. Or open Account: the Plan section has the meters Repositories imported from and Refreshes this month.

To make room for another repository, delete every diagram from one of yours. The next new repository takes its place. One place can be freed this way each month, and not for a repository imported in the last hour. Diagrams from repositories also count towards Free’s 25 diagrams in 3 projects. Guide: Repositories on the Free plan.

On Free, the import dialog and Account show how many repositories and refreshes you have used.

Private repositories

On Pro and Pro Max, connect your account on a host to draw its private repositories. The connection can only read.

  1. Open Account. Under GitHub repositories, choose Connect GitHub; under GitLab, Bitbucket, and Azure DevOps, choose Connect GitLab, Connect Bitbucket or Connect Azure DevOps. (Or use the host’s tab under Your repositories in the import dialog.)
  2. The host asks you to sign in and to allow Flowgraph Studio. On GitHub, you then choose which repositories the app may read: all, or only some.
  3. Back in Flowgraph, Account says Connected as with your name on that host.
  4. In Projects, choose Import repository. Under Your repositories, pick the host’s tab and a repository (filter the list when it’s long), or paste its address.
  5. Tick the diagrams and choose Next: names. Change the project’s name and the diagrams’ titles if they give private names away: a warning marks a name that names the repository or a file path. Then choose Add and open.
  • What each connection reads: GitHub, only the repositories you chose for the app (Choose repositories changes that); GitLab, the projects you can read; Bitbucket, the repositories in your workspaces; Azure DevOps, code in your organisations, with a work or school Microsoft account only.
  • Your data: Flowgraph’s server reads the repository with your connection, only while you can read it yourself, and hands the files to your browser to draw. It never stores, caches or logs the code. What Flowgraph read (last 90 days) in Account lists each read: repository, commit and number of files.
  • Sharing: the first time you share a diagram from a private repository, Flowgraph asks you to confirm. People see its title and drawing, never the record of where it came from.
  • Disconnect in Account deletes Flowgraph’s tokens. The diagrams stay, but can’t be refreshed until you connect again.

Guide: Private repositories.

On Pro, Your repositories in the import dialog has a tab for each host, with its Connect button.

AI architecture overview and request flow

On Pro and Pro Max, AI reads the code and draws what configuration can’t say: the AI architecture overview shows what the system is made of and how its parts connect (apps, services, background jobs, databases, queues and outside services), and the AI request flow traces its main request step by step as a sequence diagram.

  1. Scan a repository on GitHub, GitLab, Bitbucket or Azure DevOps, public or private.
  2. At the top of the result, choose Make overview or Make request flow. For the request flow, Choose a route picks the route it traces, from those the route map finds; otherwise the AI picks the main one.
  3. Wait up to a minute (“Reading the code and asking the AI”). The finished diagram joins the top of the list, ticked, with what it used.
  4. Add it with the others.
  • Credits: each uses 5 AI credits. One someone already made of the same public commit and folder is given at once and costs nothing (“Made earlier for this commit, so it wasn’t counted”).
  • Your data: Flowgraph’s server reads the repository from its host and sends excerpts to Anthropic: the outline, README, configuration and the start of the main files. Files that hold credentials are left out, and values that look like secrets are replaced. A public overview is kept for 30 days for that commit; the files aren’t kept.
  • Private repositories: the first overview asks you to agree, once for each repository: Agree and make overview or Not now. Withdraw it under AI overviews allowed in Account. Private overviews are never shared with other accounts, so they always use their credits.
  • Check each part against the code: AI can miss or misread how parts connect. The diagram’s From GitHub panel lists the files each part came from.

Guides: AI architecture overview of a repository, AI request flow.

On Pro, choose Make overview in the scan result; the AI reads the code and draws the system’s parts.

Where it came from, and refresh

Every diagram made from a repository keeps the repository, branch, commit and files it was drawn from, so you can check it and bring it up to date.

  1. Open the diagram in the editor.
  2. Click the From GitHub button in the top bar (a folder icon; From GitLab, From Bitbucket, From Azure DevOps or From your computer for the others).
  3. Read where it came from: the repository and folder (linked to the host), branch, commit, what it was made from, when, and whether you have changed it since. For an AI overview, each part with its files, and what the AI couldn’t see.
  4. Choose Refresh from GitHub. If nothing changed, it says the diagram is up to date. Otherwise it shows the diagram now and the new drawing side by side, with every change marked.
  5. Choose Replace this diagram (the earlier version goes into version history, and Ctrl + Z undoes it), or Add as a new diagram to keep both.
  • Plans: refresh needs an account. Free has 50 a month; Pro and Pro Max no limit.
  • Public repositories are read by your browser, private ones through your connection.
  • AI overviews aren’t refreshed: Regenerate makes a new one from the branch’s latest commit, beside this one, for 5 AI credits.
  • If it doesn’t work: when the latest commit no longer has the files, it says there is nothing to refresh with. When a file holds several diagrams that could be this one, import the repository again to choose.
From GitHub in the top bar shows where a diagram came from; Refresh from GitHub draws it again from the latest commit.

A link can open the import with a repository already filled in, so readers of your README can draw it themselves.

  • flowgraph.studio/github/owner/repository, with /tree/branch/folder for one folder
  • flowgraph.studio/gitlab/group/project, with /-/tree/branch/folder
  • flowgraph.studio/bitbucket/workspace/repository, with /src/branch/folder
  • flowgraph.studio/azure-devops/organisation/project/repository (its default branch)

To add the badge to a README:

  1. Scan the repository (or the folder and branch the badge should open).
  2. At the bottom of the result, open Add an Open in Flowgraph badge to the README.
  3. Choose Copy Markdown and paste it into the README.

Nothing is read from the host until the person who follows the link chooses Scan repository. Guide: Mermaid diagrams in a GitHub README. For diagrams in other files, see Projects and diagrams.

A /github/owner/repository link opens the import filled in; the scan result has the README badge to copy.