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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@rightalx/gitfolio-extract

v1.0.2

Published

A CLI tool to extract GitHub repositories data for your portfolio website. Easily fetch repository details, stats, and READMEs in JSON format.

Readme

GitFolio-Extract 🚀

Extract GitHub projects information into a structured JSON format for your portfolio website.

Features ✨

  • 🔑 Simple GitHub authentication via browser
  • 📊 Extracts repository details including:
    • Basic information (name, description, URL)
    • Statistics (stars, forks, last updated)
    • Technical details (languages used)
    • Repository content (README)
  • 💾 Saves data in a clean JSON format
  • 🛠️ Easy to use CLI interface

Installation 📦

# Install globally using npm
npm install -g @rightalx/gitfolio-extract@latest

# Or using pnpm
pnpm add -g @rightalx/gitfolio-extract@latest

# Or using yarn
yarn global add @rightalx/gitfolio-extract@latest

Usage 🔨

After installation, you can use the CLI directly:

# Configure GitHub authentication
gitfolio-extract configure

# Extract repository data (saves to current directory as portfolio.json)
gitfolio-extract extract

# Extract to custom location (specify full path or relative to current directory)
gitfolio-extract extract -o ./my-portfolio.json
gitfolio-extract extract -o C:/Users/username/Documents/my-portfolio.json

# Show help
gitfolio-extract --help

Output Location 📂

  • When using ./my-portfolio.json, the file is saved in your current working directory
  • You can use absolute paths like C:/path/to/my-portfolio.json
  • If the specified directory doesn't exist, it will be created automatically

The tool will save:

  • Your GitHub authentication securely in your system's config directory
  • The portfolio data in JSON format at your specified location (or ./portfolio.json by default)

Output Format 📄

The tool generates a JSON file with the following structure:

{
  "metadata": {
    "generated": "2024-01-20T12:00:00Z",
    "username": "yourusername",
    "totalRepos": 10
  },
  "repositories": [
    {
      "basic": {
        "name": "repo-name",
        "description": "Repository description",
        "url": "https://github.com/user/repo",
        "homepage": "https://project-homepage.com"
      },
      "stats": {
        "stars": 5,
        "forks": 2,
        "lastUpdated": "2024-01-19T10:30:00Z"
      },
      "technical": {
        "languages": ["TypeScript", "JavaScript"],
        "techStack": []
      },
      "content": {
        "readme": "# Project README content..."
      }
    }
  ]
}

Development 🛠️

Project Structure

gitfolio-extract/
├── src/
│   ├── commands/
│   │   ├── configure.ts   # Authentication command
│   │   └── extract.ts     # Data extraction command
│   ├── services/
│   │   ├── github.service.ts    # GitHub API interactions
│   │   └── repository.service.ts # Repository data handling
│   └── index.ts           # CLI entry point
├── package.json
└── tsconfig.json

Building

# Build the project
pnpm build

# Development with watch mode
pnpm dev

Contributing 🤝

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License 📝

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments 🙏

  • Built with TypeScript
  • Uses GitHub's OAuth Device Flow for authentication
  • Powered by Octokit for GitHub API interactions