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

@hjanuschka/pi-nanny

v1.1.0

Published

Parental control extension for Pi - helps you go to bed instead of having 47 creative ideas at 3 AM

Readme

🛏️ Pi-Nanny Extension

"My ADHD ass having 47 creative new ideas at 3 am instead of sleeping"

Pi-Nanny is a parental control extension for Pi that helps you maintain a healthy sleep schedule by nagging you to go to bed when you're coding at ungodly hours.

Born from this Twitter thread where @badlogicgames said "do it" after @hjanuschka suggested we need "some 'its over go to bed' extension!"

Features

Progressive Enforcement

  • 🌙 Gentle warnings (midnight - 1 AM)
  • 🚨 Strict mode after 5 ignored warnings
  • 🔴 Hard exit at 1:00 AM - automatic shutdown with funny messages

😴 Snooze System

  • Temporary override with /nanny snooze <minutes>
  • Quick snooze with Ctrl+Shift+S
  • Can't snooze past hard exit time

📊 Status Tracking

  • Persistent footer showing bedtime status
  • Warning counter for repeat offenders
  • Countdown to hard exit

🎲 Random Exit Messages

  • "Good night sucker! 😴"
  • "Git commit yourself to bed. NOW. 🛏️"
  • "404: Wakefulness not found. Redirecting to sleep. 🌙"
  • ...and 17 more!

Installation

Quick Install (Recommended)

# Install from npm (easiest)
pi install npm:@hjanuschka/pi-nanny

# Or install from git
pi install git:github.com/hjanuschka/[email protected]

# Try without installing
pi -e npm:@hjanuschka/pi-nanny

Manual Installation

Global (All Projects)

# Copy to extensions directory
mkdir -p ~/.pi/agent/extensions
cp pi-nanny.ts ~/.pi/agent/extensions/

# Or symlink for development
ln -s $(pwd)/pi-nanny.ts ~/.pi/agent/extensions/

The extension will auto-load in all Pi sessions. Use /reload to reload after edits.

Project-Local

# Copy to project extensions
mkdir -p .pi/extensions
cp pi-nanny.ts .pi/extensions/

Usage

Commands

/nanny test [bedtime|hardexit|normal] - Test Mode

Simulate different times for testing without waiting until midnight:

  • bedtime - Simulate midnight (gentle warnings)
  • hardexit - Simulate 1 AM (forced shutdown)
  • normal - Switch back to real time
/nanny test bedtime   # See bedtime warnings
/nanny test hardexit  # Trigger shutdown (careful!)
/nanny test normal    # Back to real time

Can also use CLI flag:

pi -e ./pi-nanny.ts --nanny-test-time=0   # Midnight
pi -e ./pi-nanny.ts --nanny-test-time=1   # 1 AM

/nanny - Check Status

Shows current configuration and bedtime status:

  • Enabled/disabled state
  • Bedtime hours
  • Hard exit time
  • Current violations
  • Snooze status

/nanny snooze [minutes] - Snooze Warnings

Temporarily disable bedtime enforcement (default: 15 minutes).

  • Cannot snooze past hard exit hour
  • Resets some of your warning counter
  • Use wisely!
/nanny snooze 30  # Snooze for 30 minutes
/nanny snooze     # Snooze for 15 minutes (default)

/nanny config - Configure Hours

Update bedtime schedule:

  • Bedtime start (default: 0 = midnight)
  • Bedtime end (default: 6 = 6 AM)
  • Hard exit hour (default: 1 = 1 AM)

/nanny disable - Turn Off

Disable Pi-Nanny for the current session.

/nanny enable - Turn On

Re-enable Pi-Nanny after disabling.

/nanny reset - Reset Warnings

Reset the warning counter and strict mode.

Keyboard Shortcuts

  • Ctrl+Shift+S - Quick 15-minute snooze (only during bedtime, before hard exit)

Status Line

Pi-Nanny adds a status indicator to the footer:

  • 🌙 Bedtime! (ends in 5 hours) - Warning mode
  • 🚨 Bedtime! Hard exit in 45m - Approaching hard exit
  • 😴 Snooze: 12m remaining - Currently snoozed
  • 🚨 HARD EXIT - Shutting down soon! - Past 1 AM

Configuration

Default configuration:

{
  bedtimeStart: 0,    // Midnight
  bedtimeEnd: 6,      // 6 AM
  hardExitHour: 1,    // 1 AM - force quit
  strictMode: false,  // Starts gentle
  enabled: true
}

How It Works

  1. Midnight - 1 AM (Warning Mode)

    • Gentle reminders on each prompt
    • Escalates to "firm" after 3 warnings
    • Activates strict mode after 5 warnings
  2. Strict Mode

    • Blocks each prompt with confirmation dialog
    • Auto-timeout after 10 seconds
    • Adds guilt to every bypass
  3. 1 AM - Hard Exit

    • 30-second countdown dialog
    • No snooze allowed
    • Automatic ctx.shutdown()
    • Random funny exit message

Exit Messages

Sample messages shown during hard exit:

  • "Good night sucker! 😴"
  • "That's it. I'm pulling the plug. Sweet dreams! 🔌"
  • "Your 3 AM ideas can wait. Trust me. 🌙"
  • "Git commit yourself to bed. NOW. 🛏️"
  • "Stackoverflow will still be there in the morning. Bye! 👋"
  • "404: Wakefulness not found. Redirecting to sleep. 🌙"
  • "Ctrl+Alt+Delete your bad sleep habits. Good night! ⌨️"

Examples

Starting Pi at 2 AM

$ pi
🚨 MANDATORY BEDTIME
It's past 1:00 AM. Pi is shutting down in 30 seconds.

Ctrl+Alt+Delete your bad sleep habits. Good night! ⌨️

No snooze available. Get some sleep!
[Yes] [No (default)]

Warning During Bedtime

😴 Even GPUs need to sleep sometimes.

Snoozing Past Hard Exit

/nanny snooze 60
⚠️ Can't snooze past 1:00 AM (hard exit). Max snooze: 45 minutes

Development

Built with Pi's extension API. Key features used:

  • Event interception - input, agent_start, session_start
  • UI components - ctx.ui.confirm(), ctx.ui.notify(), ctx.ui.setStatus()
  • Custom commands - /nanny with subcommands
  • Keyboard shortcuts - Ctrl+Shift+S
  • Graceful shutdown - ctx.shutdown()

Credits

License

MIT - Use at your own risk of actually getting good sleep.

Contributing

Got better exit messages? More creative nag lines? PRs welcome!


Remember: The bugs will still be there tomorrow. Your sleep schedule won't.