# v0.4.0 · GPLv3 · C99

A small tree(1) replacement, written in C.

neotree prints directory trees from the shell. It adds glob filtering, a find mode, multi-root traversal, sort options, a stats footer, and markdown export. One static binary, no runtime dependencies.

$ brew tap bharadwajsanket/neotree && brew install neotree
$ curl -sSL https://raw.githubusercontent.com/bharadwajsanket/neotree/main/install.sh | bash
~/code/neotree
> $ neotree src --stats
src
├── cli.c
├── walk.c
├── walk.h
├── filter.c
├── filter.h
├── format.c
├── format.h
└── ignore.c

# 1 directory, 8 files
01

install

Homebrew — macOS / Linux
$ brew tap bharadwajsanket/neotree && brew install neotree
curl — macOS / Linux
$ curl -sSL https://raw.githubusercontent.com/bharadwajsanket/neotree/main/install.sh | bash
PowerShell — Windows
$ irm https://raw.githubusercontent.com/bharadwajsanket/neotree/main/install.ps1 | iex
From source
$ git clone https://github.com/bharadwajsanket/neotree cd neotree && make && sudo make install

# also installs the ntree alias

02

features

  • ·glob filtering

    Include or exclude paths with --pattern.

  • ·find mode

    Locate a file or directory by name in the tree.

  • ·multi-root

    Pass more than one path in a single run.

  • ·stats

    Print a short file / directory count footer.

  • ·sorting

    Sort by name or size, optionally reversed.

  • ·dirs-only

    Skip files and only walk directories.

  • ·.gitignore

    Respects .gitignore and a few sane builtins.

  • ·markdown export

    Write the tree out as txt or markdown.

  • ·zero deps

    Plain C99. Nothing to install at runtime.

  • ·single binary

    One static binary in $PATH.

  • ·ntree alias

    Symlinked as ntree so it's faster to type.

  • ·no config

    No dotfiles. Flags only, like tree(1).

03

examples

multi-root + stats
> $ neotree src tests --stats
src
├── cli.c
├── walk.c
└── format.c
tests
├── test_walk.c
└── test_filter.c

# 2 directories, 5 files
glob pattern
> $ neotree --pattern "*.c"
.
├── cli.c
├── walk.c
├── filter.c
├── format.c
└── tests
    └── test_walk.c
sort by size, reversed
> $ neotree --sort size --reverse
.
├── walk.c
├── format.c
├── cli.c
├── filter.c
└── ignore.c
find a file
> $ neotree --find "walk.c"
.
├── src
│   └── walk.c
└── tests
    └── test_walk.c
find a directory
> $ neotree --find-dir "src"
.
└── src
export markdown
> $ neotree --export-markdown tree.md
# wrote tree.md
05

changelog

v0.4.02026
  • - stats footer
  • - find / find-dir
  • - multi-root traversal
  • - reverse sorting
  • - Homebrew tap
  • - installer pipeline (sh / ps1)
  • - migrated to GPLv3
v0.3.1initial public release