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

devstat

v1.0.3

Published

CLI tool to fetch coding stats from GitHub, LeetCode, and Codeforces

Readme

📊 devstat: The Ultimate Coding Profile CLI

cli-preview The devstat CLI mascot and branding

"Know thy code. Know thyself."


devstat is a modern, interactive command-line tool that gives you instant, beautiful insights into your coding profiles across GitHub, LeetCode, and Codeforces. Whether you’re tracking your progress, comparing with friends, or just curious about your coding journey, devstat is your all-in-one terminal dashboard.


✨ Features

  • Multi-Platform Support:
    • GitHub: Followers, Following, Public Repos, Gists, Total Stars, Top Languages, Timestamps, and more
    • LeetCode: Total Solved, Difficulty Breakdown, Acceptance Rate, Ranking, Contribution Points, Reputation
    • Codeforces: Rating, Rank, Max Rating, Contribution, Friends, Organization, Location, and more
  • Profile Comparison:
    • Compare any two users on the same platform with side-by-side stats and visual bar charts
  • Interactive CLI:
    • Guided prompts for platform and username selection
    • Animated welcome banner and progress spinners
  • User Configuration:
    • Remembers your usernames for faster lookups
    • Stores config in your working directory (config.json)
  • API Token Support:
    • Use a GitHub Personal Access Token for higher API rate limits
  • Cross-Platform:
    • Works on Windows, macOS, and Linux
  • Open Source & Extensible:
    • Easy to contribute and extend for new platforms

🎬 Demo

A quick video demo devstat demo


🚀 Installation

1. Install via npm (Global)

npm install -g devstat

2. Run Instantly with npx (No Install)

npx devstat

3. Local Development Install

git clone https://github.com/your-username/devstat.git
cd devstat
npm install

🖥️ Usage

Run the CLI

  • Globally installed:
    devstat
  • With npx:
    npx devstat
  • From local clone:
    node index.js

Interactive Flow

  1. Choose a platform: GitHub, LeetCode, Codeforces, or Compare Profiles
  2. Enter username(s): Prompts will remember your last used names
  3. View results: Beautiful, detailed stats and comparisons

Example: Fetch a GitHub Profile

devstat
# Select 'GitHub'
# Enter your GitHub username (e.g., 'octocat')

Example: Compare Two LeetCode Users

devstat
# Select 'Compare Profiles' > 'LeetCode'
# Enter first username (e.g., 'user1')
# Enter second username (e.g., 'user2')

⚙️ Configuration & Tokens

  • Usernames are saved in config.json in your current working directory for convenience.
  • GitHub API Token (Optional):
    • For higher rate limits or private repo data, set a GITHUB_TOKEN environment variable.
    • Generate a token here (public_repo scope is enough for public data).

Set the Token:

  • Linux/macOS:
    export GITHUB_TOKEN="YOUR_TOKEN"
  • Windows (CMD):
    set GITHUB_TOKEN=YOUR_TOKEN
  • Windows (PowerShell):
    $env:GITHUB_TOKEN="YOUR_TOKEN"

📚 Supported Platforms & Data

  • GitHub:
    • Followers, Following, Public Repos, Gists, Total Stars, Top Languages, Created/Updated, and more
  • LeetCode:
    • Total Solved, Easy/Medium/Hard, Acceptance Rate, Ranking, Contribution Points, Reputation
  • Codeforces:
    • Rating, Rank, Max Rating, Contribution, Friends, Organization, Country, City, Email, Name, Last Online, Registration Time

🛠️ Troubleshooting & FAQ

  • API Rate Limit Exceeded?
    • Use a GitHub token as described above.
  • Network Issues?
    • Check your internet connection and try again.
  • Config Not Saving?
    • Ensure you have write permissions in your working directory.
  • LeetCode/Codeforces Data Missing?
    • The tool relies on public APIs; if a service is down, try again later.

🧪 Running Tests

npm test

🤝 Contributing

  1. Fork the repo
  2. Create a new branch: git checkout -b feature/your-feature
  3. Make your changes
  4. Commit: git commit -m 'feat: Add new feature'
  5. Push: git push origin feature/your-feature
  6. Open a Pull Request

All contributions, bug reports, and feature requests are welcome!


📄 License

This project is licensed under the ISC License (see package.json).


🙏 Credits & Acknowledgements

  • Author: Hitanshu
  • Libraries: axios, chalk, inquirer, figlet, gradient-string, nanospinner, boxen, cli-progress, commander, terminal-kit, chalk-animation
  • APIs: GitHub REST API, LeetCode Stats API, Codeforces API

💬 Contact & Support

  • For issues, open a GitHub Issue
  • For questions or feedback, contact the author via GitHub

Happy Coding! 🚀