Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Code ForestNew to Visual Studio Code? Get it now.
Code Forest

Code Forest

playbox

|
2 installs
| (0) | Free
Grow a forest from your coding activity, one git branch at a time.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code Forest

Grow a forest from your coding. Code Forest adds its own icon to the Activity Bar (the strip of icons at the side of the window). Click the tree icon to open the forest. Every git branch grows its own forest from the work you actually do: typing, saving, committing and passing tests. Animals move in as the forest grows. When a branch is merged into main, an excavator and a crew of workers clear the forest, leave a "shipped" sign, and your next branch starts on fresh ground.

The trees are drawn by code, so every forest is different, and the sky follows your system clock from dawn to dusk to a starry night.

How it works

One forest per git branch. Switch branches and you switch forests. The forests on main and master are never cleared.

Trees grow from what you do:

You do Points The tree
Edit a line 1 (each line counts once per 10 minutes, at most 20 per change) grows taller and branches out
Save a file yourself 3 (auto-saves do not count) gets a fuller, greener canopy
Make a commit of your own 30 gets a growth spurt: a new limb, pine tier or bamboo stalk
Pass a test run 20 (at most once every 2 minutes) gets acorns, cones, catkins, blossoms or new shoots

A tree is fully grown at 250 points. At 200 points the next sapling sprouts and takes over, so a busy day grows several trees and a forest never stops getting bigger. Each new tree is a random species: oak, pine, birch, cherry blossom or bamboo.

Test runs are recognised from your terminal commands (npm test, pytest, go test, cargo test, flutter test and many more, when the command finishes successfully) and from VS Code tasks in the Test group. Terminal detection needs VS Code's shell integration.

Errors become pests. Every error in your Problems panel shows up as a little bug crawling on the tree you are growing. Fix the error and the bug flies away. Pests never hurt a tree.

Animals move in on their own as trees finish growing:

Animal Arrives with
Rabbit 3 finished trees
Songbirds 7
Hedgehog 12
Fox 20
Deer 30

They wander, rest, perch in the treetops and sleep at night.

Merging clears the forest. When the last commit you made on a branch reaches main (a merge, a fast-forward, or a pull request you have pulled), the view plays a short scene: the excavator and workers arrive, the animals run off, the trees come down, and a signpost reads "feature/login · 14 trees · shipped". The footer counts your shipped forests. Squash merges leave no trace on main, so when the remote branch disappears Code Forest asks whether it was merged.

Commands

  • Code Forest: Call the Excavator clears the current branch's forest by hand.
  • Code Forest: Show Shipped Forests lists every forest you have shipped.

Settings

Setting Default
codeForest.favouriteSpecies all five Species that new trees are chosen from, e.g. only pines for a pine forest
codeForest.pests.enabled true Show pests for errors
codeForest.mainBranches ["main", "master"] Branches whose forests are never cleared, and which count as "main" for merges

The Code Forest view has its own place in the side bar, so it never takes space from your file tree. You can also drag it into the Explorer or into the bottom panel. If your system uses reduced motion, animals stay still and the clearing scene becomes a simple fade.

Privacy

Code Forest stores only counts (lines, saves, commits, test runs), commit hashes, and branch and repository names, in VS Code's own extension storage on your machine. It never reads or stores your code, file names or file contents. It makes no network requests and sends no telemetry.

Good to know

  • It needs VS Code's built-in Git extension. Without git, you get a single forest per folder that is never cleared and commits are not counted.
  • Only commits made with your own user.email count; commits pulled from teammates do not.
  • A detached HEAD, or a rebase or merge in progress, pauses growth ("forest resting").
  • A renamed branch starts a new forest.
  • A branch that was rebased before it was merged has new commit hashes, so it cannot be recognised as merged. Use the squash-merge question or Call the Excavator.
  • The extension runs next to your git repository, so on remote machines (SSH, WSL, containers) the forest lives there. vscode.dev (the browser) is not supported yet.

Development

npm install
npm run build              # bundle the extension and the webview into dist/
npm test                   # unit tests (Vitest)
npm run typecheck
npm run gallery            # then open gallery/index.html: every tree, animal, sky and the live scene
                           #   gallery/index.html?clearing&t=5 jumps to a moment of the clearing scene
npm run test:integration   # starts a real VS Code with a temporary git repository (branch, commit, merge)
npm run package            # builds the .vsix

Press F5 in VS Code to start an Extension Development Host. The "Code Forest" output channel logs what is being counted.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft