CODEOWNERS Tree is an Visual Studio Code extension designed to simplify the management and visualization of ownership within your codebase. Managing code ownership across various files and directories can be a daunting task, especially in larger teams. With CODEOWNERS Tree, you can easily create and visualize ownership hierarchies in a beautiful tree-like graph, making it effortless to understand who is responsible for what in your codebase.
By default the graph shows what a team effectively owns: every file of the workspace is matched against the CODEOWNERS rules and, as on GitHub, the last matching rule wins. This is useful when a team owns the catch-all * rule and other teams carve their own folders out of it.
- Owned folders and files are yellow: the team owns all their files. They are not expanded.
- Partly owned folders have a dashed border and show
owned/total files: some files belong only to other teams. They are expanded down to what the team owns, and the tooltip lists the owners of the other files. - Co-owned paths are blue: other owners are listed with the team on the same rule. They are shown in italic under the name (
+ deployment), andpartly + deploymentmeans only some of the owned files are co-owned. A folder can be both partly owned and co-owned. - Files other teams get through glob patterns (e.g.
**/pom.xml) don't make a folder partly owned, otherwise most folders would be expanded. The tooltip shows how many there are. - Folders with many owned files show them as a stack of sheets (
13 files), hover it to list them. - Top level paths owned only through the catch-all rule are grouped under
* everything else. - Files owned through glob patterns are listed under glob patterns, one node per pattern, instead of being spread over the tree.
Hover a folder to see its owned files, co-owners, the owners of the other files and the CODEOWNERS rules that apply, followed by each file and folder in it with its ownership (owned, co-owned, partly owned or the other owners). Ignored files are not listed.
To see the CODEOWNERS rules mentioning a team as written instead, set codeownersTeams.graphMode to rules.
The CODEOWNERS file is looked up in .github/, the workspace root and docs/, in this order. Workspace files are listed with git, so ignored files are skipped.
Before using CODEOWNERS Tree, you'll need to install the Graphviz application, which is used for rendering the interactive tree-like graph. Follow the steps below to install Graphviz:
-
Visit the Graphviz download page for Windows.
-
Download the MSI installer for your Windows version (64-bit or 32-bit).
-
Run the installer and follow the on-screen instructions.
-
After installation, make sure to add the Graphviz
bindirectory to your system's PATH environment variable. This allows CODEOWNERS Tree to locate the Graphviz executables.
Install Graphviz using Homebrew by running the following command in your terminal:
brew install graphviz
Homebrew will automatically add Graphviz to your system's PATH.
Open a terminal and run the following command to install Graphviz using the package manager:
sudo apt-get install graphviz
Once you have Graphviz installed, you can start using CODEOWNERS Tree to generate and visualize ownership hierarchies for your codebase.
The new panel is located in the Explorer.

