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 🙏

© 2026 – Pkg Stats / Ryan Hefner

g-draft

v0.2.1

Published

AI-Powered Git Assistant (CLI + TUI)

Readme

g-draft ✦ AI-Powered Git Assistant

g-draft is a hybrid CLI + TUI developer tool that turbocharges your Git workflows using high-performance AI. It automates the "boring" parts of version control—like writing commit messages and PR descriptions—while providing expert-level security and performance audits before you even push your code.


🚀 Quick Usage

gdraft works as both a standalone CLI and an interactive TUI.

Interactive TUI (Recommended)

gdraft tui

CLI Mode

gdraft commit --copy   # Generate commit message & copy to clipboard
gdraft pr --copy       # Generate PR description & copy to clipboard
gdraft review          # Run AI code review on current changes

📚 Documentation


✨ Key Features

🤖 AI-Powered Workflow

  • Conventional Commits: Automatically generates structured, present-tense commit messages (≤ 72 chars) from your staged changes.
  • Context-Aware PRs: Generates detailed Pull Request descriptions. Automatically detects and fills your project's .github/pull_request_template.md.
  • Expert Code Review: Performs rigorous audits using internalized Skills for:
    • 🔒 Security: Scans for injection vectors, hardcoded secrets, and auth risks.
    • Performance: Identifies algorithmic inefficiencies and resource leaks.
    • 🧼 Clean Code: Enforces SRP, DRY, and naming consistency.
    • ♻️ Abstractions: Identifies code repetitions and suggests helper functions or components.

🖥️ High-Performance TUI

  • Interactive Dashboard: A centralized hub to manage your branch status and AI actions.
  • Browser-Standard Scrolling: Smooth scrollable areas with a visual scrollbar and full Vim Keybindings (j/k, g/G, ctrl+d/ctrl+u).
  • Live Feedback: Contextual loading messages that cycle through actual analysis phases so you're never left wondering.
  • Accept & Commit: Review AI suggestions, edit them manually in the TUI, and commit directly with one keystroke.
  • Copy to Clipboard: Fast [c] key shortcut to grab any AI output for use elsewhere.

💾 Smart Data & Persistence

  • Global Storage: All logs and cache are moved out of your workspace and stored in ~/.gdraft/ to keep your repositories clean.
  • Project-Aware Cache: Returning to a screen? Your last generation is instantly loaded from the cache.
  • Staleness Detection: Automatically detects if your code has changed since the last AI generation and prompts for a refresh.
  • Audit Logs: Full prompt/response history stored as structured JSON in ~/.gdraft/projects/[id]/logs.

🚀 Installation

From NPM (Recommended)

Install gdraft globally:

npm install -g gdraft

Local Development Setup

g-draft uses pnpm for package management.

  1. Clone & Install:

    git clone https://github.com/Bobbyjsx/g-draft.git
    cd g-draft
    pnpm install
  2. Development: Run the TypeScript source directly:

    pnpm dev -- tui    # Launch the TUI
    pnpm dev -- commit # CLI mode
  3. Build:

    pnpm build

🔌 AI Provider Setup

g-draft acts as an orchestrator for your local AI CLIs. Ensure at least one is installed and authenticated:

Verify detection:

gdraft providers

⚙️ Configuration

g-draft uses a hybrid configuration model:

  • Global Config: Managed via gdraft config set ... (stored in system config).
  • Project Config: Create a .gdraft.json in your repository for project-specific overrides.
{
  "baseBranch": "main",
  "provider": "claude"
}

⌨️ TUI Shortcuts

| Key | Action | | :--- | :--- | | ↑/↓ or j/k | Scroll content / Navigate menu | | Enter | Select / Save | | a | Accept & Commit (Commit Screen) | | e | Edit AI Output | | c | Copy to Clipboard | | r | Retry / Regenerate | | Esc | Back to Dashboard | | q | Quit |


📄 License

MIT © Bobbyjsx