Treehouse for developers. Branches are git branches, leaves are features, roots are dependencies, termites are bugs.
  • JavaScript 100%
Find a file
2026-06-30 11:14:01 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 test: add e2e tests 2026-06-28 11:09:27 +00:00
src feat(#1): treehouse engine — branches, leaves, roots, termites, ASCII tree 2026-06-15 13:05:33 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:13:59 +00:00
package.json feat(#1): treehouse engine — branches, leaves, roots, termites, ASCII tree 2026-06-15 13:05:33 +00:00
README.md feat(#1): treehouse engine — branches, leaves, roots, termites, ASCII tree 2026-06-15 13:05:33 +00:00

code-treehouse

Treehouse for developers. Branches are git branches, leaves are features, roots are dependencies, termites are bugs.

Usage

const { Treehouse, SEASONS } = require('./src/treehouse');

const th = new Treehouse('Great Oak');
th.hireBuilder('Alice', 5);

// Create branches
th.createBranch('feature/auth');
th.createBranch('feature/payments');

// Plant features (leaves)
th.plantLeaf('feature/auth', 'login-form', 'feature');
th.plantLeaf('feature/auth', 'jwt-tokens', 'feature');
th.plantLeaf('main', 'unit-tests', 'test');

// Build platforms
th.buildPlatform('main', 'Lookout Tower');

// Merge branches
th.mergeBranch('feature/auth');

// Time passes
for (let i = 0; i < 10; i++) th.tick();
th.setSeason(SEASONS.AUTUMN);
th.prune('main');

console.log(th.treeView());
console.log(th.report());

Components

  • Branch — Git branches with leaves, integrity, termites, platforms, bridges
  • Leaf — Features with health/maturity/growth, seasonal colors, can fall
  • Root — Dependencies (npm, postgres, redis, docker) that feed the tree, can rot
  • Termite — Bugs eating branches, severity-based damage
  • Treehouse — Seasons, builders, merge system, ASCII tree cross-section