npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gofio-tree

v0.2.0

Published

A vibe-coded CLI for rendering directory trees with icons and colors

Downloads

758

Readme

gofio-tree

A vibe-coded tool for learning purposes – CLI for rendering directory trees with icons and colors.

The package is published as gofio-tree and provides two commands:

gotree      # recommended
gofiols     # alias

Set the default icon set per project via .gotreerc (JSON):

{ "icons": "nerd" }

Or globally via the GOTREE_ICONS environment variable:

export GOTREE_ICONS=nerd   # in ~/.bashrc, ~/.zshrc, etc.

Precedence: --icons flag > .gotreerc > GOTREE_ICONS > emoji (default).

Installation

npm install -g gofio-tree

Usage

gotree
gotree .
gotree src --depth 2
gotree . --all
gotree . --dirs-only
gotree . --size
gotree . --human
gotree . --icons emoji
gotree . --icons nerd
gotree . --icons ascii
gotree . --no-color
gotree . --copy
gotree . --all --copy
gotree . --all --no-color > tree.txt
gotree . --sort size
gotree . --sort mtime --reverse
gotree . --no-gitignore

Options

| Option | Alias | Description | |--------|-------|-------------| | -a, --all | -a | Show hidden files and all directories (including node_modules, dist, build, etc.) | | -c, --copy | -c | Copy output to clipboard (automatically disables colors) | | -d, --depth | -d | Limit tree depth (e.g., --depth 2) | | -s, --size | -s | Show file sizes in bytes | | -H, --human | -H | Show file sizes in human-readable format (B, KB, MB, GB) – includes directory sizes | | --dirs-only | | Show directories only (no files) | | --icons | | Icon set: emoji (default), nerd, or ascii | | --no-color | | Disable ANSI colors | | GOTREE_ICONS | (env) | Default icon set: nerd, emoji, or ascii (overridable by --icons) | | --no-gitignore | | Disable .gitignore rules (ignored files are shown) | | --sort | | Sort entries by name, size, or mtime (default: name) | | -r, --reverse | -r | Reverse sort order | | -h, --help | -h | Show help message | | -v, --version | -v | Show version |

Examples

Basic usage

# Show tree of current directory
gotree

# Show tree of specific path
gotree src

# Limit depth to 2 levels
gotree . --depth 2

# Show only directories
gotree . --dirs-only

Show everything (including hidden and ignored)

# Show hidden files + node_modules + dist + everything
gotree . --all

# Warning: this can generate thousands of lines!
gotree . --all --no-color > tree.txt

Show file sizes

# Show sizes in bytes
gotree . --size

# Show sizes in human-readable format (includes directory totals)
gotree . --human
gotree . -H

Copy to clipboard

# Copy tree to clipboard (clean text, no colors)
gotree . --copy
gotree . -c

# Copy full tree including node_modules
gotree . --all --copy

# On Windows, use ASCII icons for better clipboard compatibility
gotree . --icons ascii --copy

Different icon sets

# Emoji icons (recommended)
gotree . --icons emoji

# Nerd Font icons (requires Nerd Font terminal)
gotree . --icons nerd

# ASCII only (no icons, works everywhere, good for Windows)
gotree . --icons ascii

Disable colors

# For piping to files or when colors don't work
gotree . --no-color
gotree . --copy  # automatically disables colors

Icons

By default, gotree uses emoji icons. You can switch to Nerd Font icons with --icons nerd if you have a Nerd Font installed in your terminal.

Emoji icons (recommended)

gotree . --icons emoji

Icon mapping:

| Icon | Type | |------|------| | 📁 | Directories | | 🟨 | JavaScript (.js, .mjs, .cjs) | | 📘 | TypeScript (.ts, .mts, .cts) | | ⚛️ | JSX/TSX (React) | | 💚 | Vue (.vue) | | 🧡 | Svelte (.svelte) | | 🚀 | Astro (.astro) | | 🎨 | Stylesheets (CSS, SCSS, LESS, Stylus) | | 🌐 | HTML/MDX | | 📋 | Templates (EJS, Pug, Handlebars, Liquid, Nunjucks) | | 🐘 | PHP | | ◈ | GraphQL (.graphql, .gql) | | 🐍 | Python (.py, requirements.txt, Pipfile) | | 🔷 | Go (.go, go.mod, go.sum) | | 🦀 | Rust (.rs, Cargo.toml) | | 💎 | Ruby (.rb, Gemfile, Rakefile) | | 🗄️ | Database (SQL, Prisma, Drizzle, SQLite) | | 🔧 | Environment files (.env, .env.*) | | ⚙️ | Config files (JSON, YAML, TOML, INI, etc.) | | ☁️ | Serverless (serverless.yml, vercel.json, netlify.toml) | | 📄 | Documents (Markdown, text, RST, AsciiDoc) | | 🖼️ | Images (PNG, JPG, SVG, GIF, WebP, fonts) | | 🎬 | Videos (MP4, WebM, MOV, AVI, MKV) | | 🎵 | Audio (MP3, WAV, OGG, FLAC, AAC) | | 📜 | Shell scripts (Bash, Zsh, Fish, PowerShell) | | 📦 | Archives (ZIP, TAR, GZ, RAR, 7z) | | 🐳 | Docker / Make / Just | | 🔒 | Lock files (package-lock, yarn.lock, Cargo.lock, etc.) | | 🧪 | Test files — detected before language type | | 👻 | Hidden files (starting with .) | | 📌 | Other files | | 🔗 | Symlinks |

Classification priority: Test files (*.spec.*, *.test.*) take precedence over language-specific icons. A file like Component.test.tsx shows the test icon (🧪/) rather than the React icon. This ensures tests are visually identifiable regardless of their source language.

Nerd Font icons

If you have a Nerd Font installed in your terminal (v2 or v3):

gotree . --icons nerd

Icon mapping (codepoints from Devicons and Font Awesome, all in BMP PUA range):

| Icon | Codepoint | Type | |------|-----------|------| |  | \u{f07b} | Directories | |  | \u{e781} | JavaScript (.js, .mjs, .cjs) | |  | \u{e8ca} | TypeScript (.ts, .mts, .cts) | |  | \u{e7ba} | JSX/TSX (React) | |  | \u{e8dc} | Vue (.vue) | |  | \u{e8b7} | Svelte (.svelte) | |  | \u{e735} | Astro (.astro) | |  | \u{f13c} | Stylesheets (CSS, SCSS, LESS, Stylus) | |  | \u{f13b} | HTML/MDX | |  | \u{f1c9} | Templates (EJS, Pug, Handlebars, Liquid, Nunjucks) | |  | \u{e73d} | PHP | |  | \u{e7f4} | GraphQL (.graphql, .gql) | |  | \u{e73c} | Python (.py, requirements.txt, Pipfile) | |  | \u{e724} | Go (.go, go.mod, go.sum) | |  | \u{e7a8} | Rust (.rs, Cargo.toml) | |  | \u{e739} | Ruby (.rb, Gemfile, Rakefile) | |  | \u{f1c0} | Database (SQL, Prisma, Drizzle, SQLite) | |  | \u{f013} | Config files (JSON, YAML, TOML, INI, etc.) | |  | \u{f0c2} | Serverless (serverless.yml, vercel.json, netlify.toml) | |  | \u{f0f6} | Documents (Markdown, text, RST, AsciiDoc) | |  | \u{f1c5} | Images (PNG, JPG, SVG, GIF, WebP, fonts) | |  | \u{f1c8} | Videos (MP4, WebM, MOV, AVI, MKV) | |  | \u{f1c7} | Audio (MP3, WAV, OGG, FLAC, AAC) | |  | \u{f120} | Shell scripts (Bash, Zsh, Fish, PowerShell) | |  | \u{f1c6} | Archives (ZIP, TAR, GZ, RAR, 7z) | |  | \u{e7b0} | Docker / Make / Just | |  | \u{f023} | Lock files (package-lock, yarn.lock, Cargo.lock, etc.) | |  | \u{f14a} | Test files — detected before language type | |  | \u{f070} | Hidden files (starting with .) | |  | \u{f15b} | Other files | |  | \u{f0c1} | Symlinks |

ASCII mode (no icons)

If icons don't render correctly:

gotree . --icons ascii

Example output: