Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

corvid-agent/arbor

Repository files navigation

arbor

Fast, beautiful directory tree CLI. Zero runtime dependencies.

.
+-- src 12K
| +-- test 3.2K
| | +-- color.test.ts 1.1K
| | +-- walk.test.ts 2.1K
| +-- cli.ts 4.1K [M]
| +-- render.ts 2.9K
| +-- walk.ts 4.5K [?]
+-- package.json 1.2K
+-- tsconfig.json 512 B

2 directories, 7 files, 14K

Features

  • File type icons (nerd font)
  • Color-coded filenames by language
  • Git status indicators -- [M]odified, [A]dded, [?] untracked, [S]taged
  • .gitignore-aware -- automatically skips ignored files
  • File sizes with human-readable units
  • Glob pattern filtering
  • Directories-first sorting with name/size/modified options
  • Programmatic API for use in other tools

Install

npm install -g arbor-tree

Or run directly:

npx arbor-tree

Usage

arbor [directory] [options]

Options

Flag Description
-d, --max-depth Max depth to recurse (default: unlimited)
-a, --all Show hidden files (dotfiles)
-s, --size Show file sizes
--no-icons Disable file icons
--no-git Disable git status indicators
--no-gitignore Don't respect .gitignore files
-D, --dirs-only Only show directories
-p, --pattern Filter files by glob (e.g. '*.ts')
--no-color Disable color output
--no-summary Disable summary line
--sort Sort by: name, size, modified
-r, --reverse Reverse sort order

Examples

API

import { walkTree, renderTree, defaultOptions } from 'arbor-tree';

const tree = walkTree({ ...defaultOptions, root: './src', showSize: true });
const output = renderTree(tree, { ...defaultOptions, showSize: true });
console.log(output);

Requirements

  • Node.js >= 20
  • A terminal with nerd font for icons (optional -- works fine without, icons just won't render)

License

MIT

About

Fast, beautiful directory tree CLI with file icons, git status, .gitignore support, and smart filtering. Zero deps. TypeScript-first.

Resources

Readme

License

MIT license

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors