devstat
v1.0.3
Published
CLI tool to fetch coding stats from GitHub, LeetCode, and Codeforces
Maintainers
Readme
📊 devstat: The Ultimate Coding Profile CLI
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

🚀 Installation
1. Install via npm (Global)
npm install -g devstat2. Run Instantly with npx (No Install)
npx devstat3. 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
- Choose a platform: GitHub, LeetCode, Codeforces, or Compare Profiles
- Enter username(s): Prompts will remember your last used names
- 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.jsonin your current working directory for convenience. - GitHub API Token (Optional):
- For higher rate limits or private repo data, set a
GITHUB_TOKENenvironment variable. - Generate a token here (public_repo scope is enough for public data).
- For higher rate limits or private repo data, set a
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
- Fork the repo
- Create a new branch:
git checkout -b feature/your-feature - Make your changes
- Commit:
git commit -m 'feat: Add new feature' - Push:
git push origin feature/your-feature - 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! 🚀
