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

codnex

v0.1.1

Published

A powerful CLI tool designed to streamline, organize, and document coding problem solutions from platforms like LeetCode. Codnex enables developers to efficiently manage their problem-solving workflow with intelligent automation and seamless version contr

Readme

📚 Codnex CLI

Codnex is a powerful, developer-friendly CLI tool for organizing and documenting coding problem solutions. Create structured problem folders with metadata, solution stubs, and professional documentation—all with simple commands and interactive prompts.

Perfect for competitive programmers, students, and developers maintaining their coding problem portfolio.


✨ Key Features

  • 📁 Organized Problem Structure - Auto-creates folders with metadata and templates
  • 💻 Multi-Language Support - C, C++, JavaScript, TypeScript, Python, Java, Rust, Go
  • 🎨 Interactive & Colorful CLI - Beautiful prompts with helpful emojis and formatting
  • 🏷️ Rich Metadata - Track title, difficulty, tags, platform, complexity, and problem source
  • 📄 Auto-Generated Templates - Professional README and JSON metadata for every problem
  • 🔗 Smart URL Parsing - Extracts problem titles directly from LeetCode, HackerRank, etc.
  • Dual Modes - Use interactive prompts OR CLI flags for automation
  • 📤 Export Functionality - Convert problem folders to formatted markdown

📦 Installation

Option 1: Global (recommended for CLI usage)

npm install -g codnex
codnex new

Option 2: Local Project

npm install --save-dev codnex
npx codnex new

Option 3: Direct with npx

npx codnex new

🚀 Quick Start

Interactive Mode (Default)

codnex new

Answer the colorful prompts—it's that simple!

CLI Flags Mode (For Scripting)

codnex new \
  --name "Two Sum" \
  --lang ts,py \
  --diff easy \
  --tags "array,hash-map" \
  --platform "LeetCode" \
  --problem-src "https://leetcode.com/problems/two-sum/" \
  --time "O(n)" \
  --space "O(n)"

Export a Problem

# Convert problem folder to formatted markdown
codnex export ./two-sum

📋 Command Reference

codnex new

Create a new problem entry.

Interactive mode (default when no flags provided):

codnex new

CLI flags mode (for automation):

codnex new [options]

Options:

| Option | Description | Example | |--------|-------------|---------| | --name, --title <name> | Problem title | --name "Two Sum" | | --lang <languages> | Comma-separated languages | --lang ts,py,cpp | | --diff <difficulty> | Difficulty level | --diff easy | | --tags <tags> | Comma-separated tags | --tags "array,hash-map" | | --platform <platform> | Problem platform | --platform LeetCode | | --problem-src <url> | Problem source URL | --problem-src "https://..." | | --time <complexity> | Time complexity | --time "O(n)" | | --space <complexity> | Space complexity | --space "O(n)" |

codnex export <folder>

Export a problem folder to a formatted markdown file.

codnex export ./problem-name

Creates/updates README.md with your problem metadata and structure.


📂 Generated File Structure

When you create a new problem, Codnex generates:

problem-name/
├── Solution.ts        # Solution file for each language
├── Solution.py
├── meta.json          # Problem metadata
└── README.md          # Problem documentation

meta.json Example

{
  "title": "Two Sum",
  "difficulty": "easy",
  "tags": ["array", "hash-map"],
  "platform": "LeetCode",
  "problemSrc": "https://leetcode.com/problems/two-sum/",
  "languages": ["ts", "py"],
  "timeComplexity": "O(n)",
  "spaceComplexity": "O(n)",
  "solvedOn": "2025-11-21"
}

README.md Template

Includes professional sections for:

  • Problem Statement
  • Input/Output Format
  • Constraints
  • Examples with Explanations
  • Test Cases
  • Approach & Complexity Analysis

💡 Usage Examples

Example 1: Interactive Mode

$ codnex new
┌─ Codnex Problem Creation ─┐

? 📌 Problem Title: Two Sum
? 🔗 Problem Source URL: https://leetcode.com/problems/two-sum/
? 💻 Select Programming Languages: (checkbox mode)
? ⭐ Difficulty Level: (list mode)
? 🏛️ Platform: LeetCode
? 🏷️ Tags: array, hash-map
? ⏱️ Time Complexity: O(n)
? 💾 Space Complexity: O(n)

✅ Success! Problem folder created: two-sum
📎 Problem Source: https://leetcode.com/problems/two-sum/
📁 Location: /current/dir/two-sum

Example 2: CLI Flags (Automation)

codnex new \
  --name "Merge Sort" \
  --lang ts,py,cpp \
  --diff medium \
  --tags "sorting,divide-and-conquer" \
  --platform "GeeksforGeeks" \
  --time "O(n log n)" \
  --space "O(n)"

Example 3: Auto-Extract from URL

# Title automatically extracted from URL
codnex new \
  --problem-src "https://hackerrank.com/challenges/solve-me-first/problem/" \
  --lang cpp \
  --diff easy

Example 4: Export Problem

codnex export ./two-sum
# Updates README.md with formatted markdown content

📋 Project Organization

Recommended folder structure for organizing problems:

coding-problems/
├── arrays/
│   ├── two-sum/
│   │   ├── Solution.ts
│   │   ├── meta.json
│   │   └── README.md
│   └── best-time-buy-sell/
├── sorting/
├── dynamic-programming/
└── graphs/

🔧 Requirements

  • Node.js >= 16.0.0
  • npm (comes with Node.js)

📖 Tips & Tricks

Batch Create Problems

Create multiple problems using a script:

codnex new --name "Problem 1" --lang ts --diff easy
codnex new --name "Problem 2" --lang ts --diff medium
codnex new --name "Problem 3" --lang ts --diff hard

Extract Title from URL

Supports popular platforms:

  • LeetCode: https://leetcode.com/problems/problem-slug/
  • HackerRank: https://hackerrank.com/challenges/challenge-slug/
  • CodeForces: https://codeforces.com/problemset/problem/A/B
  • Generic URLs with /problems/ or /challenges/ patterns

Get Help

codnex --help           # Show all commands
codnex new --help       # Show create options
codnex export --help    # Show export options

🚀 Getting Started

  1. Install globally:

    npm install -g codnex
  2. Create your first problem:

    mkdir my-problems && cd my-problems
    codnex new
  3. Start solving! Edit the Solution.* files in the created folder.

  4. Export when ready:

    codnex export ./problem-name

🤝 Contributing

Contributions are welcome! Please feel free to:

  • Report bugs and issues
  • Suggest new features
  • Submit pull requests

GitHub: arpanxneuro/codnex


📝 License

MIT © Arpan Ghosh

See LICENSE file for details.


📧 Support & Feedback


Made with ❤️ for developers who love clean, organized code

🤖 AI Assistance

This project was improved with assistance from AI tools to speed up development, generate documentation drafts, and help design templates. Codnex itself does not require an AI service to run — any AI-powered features are optional and will be clearly documented where available.