
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@johnlindquist/ghi
Advanced tools
A powerful CLI tool for deep repository analysis. Quickly scan, analyze, and generate detailed reports of GitHub repositories or local directories. Perfect for understanding new codebases, generating documentation, or analyzing code patterns.
pnpm add -g ghi
ghi [options] <repo-or-path>
# Analyze a GitHub repo using default settings
ghi https://github.com/owner/repo
# Analyze a local directory with custom patterns
ghi /local/path --include "*.ts" --exclude "*.spec.*"
# Clone specific branch, limit file size, pipe output
ghi https://github.com/owner/repo --branch develop --max-size 500000 --pipe
# Multiple include/exclude patterns
ghi /path --include "*.ts,*.js" --exclude "*.test.*,node_modules"
# Open results in editor
ghi /path --open
--include, -i - Glob or path patterns to include (comma-separated or multiple flags)--exclude, -e - Glob or path patterns to exclude (comma-separated or multiple flags)--branch, -b - Git branch to clone if using a repo URL--commit, -c - Specific commit SHA to checkout if using a repo URL--max-size, -s - Maximum file size to process in bytes (default: 10MB)--pipe, -p - Pipe output to stdout (still saves results file)--open, -o - Open results in editor--debug - Enable debug loggingThe tool automatically excludes common patterns like:
node_modulesdist, build.gitResults are saved as markdown files in your system's config directory:
~/Library/Preferences/ghi/config/~/.config/ghi/config/%APPDATA%/ghi/config/The output includes:
By default, results are saved to a file but not opened. Use the --open flag to open results in your configured editor.
When opening results for the first time, you'll be prompted to specify your preferred editor command (e.g., 'code', 'vim', 'nano').
Settings can be modified in your system's config directory.
# Clone the repo
git clone https://github.com/owner/ghi.git
# Install dependencies
pnpm install
# Run directly
pnpm node index.ts [options] <repo-or-path>
# Build and link
pnpm build
pnpm link
MIT
FAQs
Ingest GitHub repositories and local directories for analysis
The npm package @johnlindquist/ghi receives a total of 649 weekly downloads. As such, @johnlindquist/ghi popularity was classified as not popular.
We found that @johnlindquist/ghi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.