Skip to content

gh-tree@0.1.0-npm-release

Choose a tag to compare

@mgks mgks released this 21 Dec 23:51
· 998 commits to main since this release

🚀 NPM Package Release: gh-tree

GitHubTree (gh-tree) is a high-performance tool to fetch, visualize, and generate ASCII directory trees for GitHub repositories without cloning. This release introduces the Core API and the CLI tool.

✨ Features

  • CLI Tool: Instant directory visualization via terminal.
    npx gh-tree facebook/react
  • Visual Styles: Supports multiple tree formats:
    • Classic: ├── src/
    • Minimal: Indentation only
    • ASCII: +-- src/
  • Private Repos: Securely access private repositories using a Personal Access Token (PAT).
  • Zero Dependencies: The core logic uses native Node.js/Browser APIs, ensuring a tiny footprint and maximum speed.
  • Web Integration: Powers the web interface at githubtree.mgks.dev.

📦 Installation

# Global Install
npm install -g gh-tree

# Per-project
npm install gh-tree

💻 Usage

CLI:

gh-tree <user/repo> [flags]
# Flags: --icons, --branch, --token

API:

import { GitHubTree } from 'gh-tree';
const gt = new GitHubTree();
const { tree } = await gt.getTree('mgks/gh-tree');
console.log(gt.generateAsciiTree(tree));

View the full documentation on GitHub.

Full Changelog: v0.5...0.1.0