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

@saiprasadrao/2nd-brain

v0.1.0

Published

🧠 Your personal AI second brain β€” self-hosted, end-to-end encrypted, zero data sharing

Readme

🧠 Second Brain

Your personal AI second brain that captures ideas, tasks, and memories. Self-hosted, end-to-end encrypted, zero data sharing.

✨ Features

  • πŸ“Έ Capture Everything: Ideas, links, notes, tasks in natural language
  • πŸ” Smart Recall: "What did I save about React?" β€” instantly find related captures
  • πŸš€ Intent Routing: Automatically categorizes captures, creates tasks, sets reminders
  • πŸ’¬ Conversational: Chat naturally, it understands context
  • πŸ“± Telegram/WhatsApp: Use your preferred messaging app
  • 🏠 Self-Hosted: Run on your own machine, nothing leaves your device
  • πŸ” Private: No cloud, no tracking, no data sharing
  • πŸ“Š Dashboard: Beautiful TUI to manage everything

πŸš€ Quick Start (5 minutes)

Prerequisites

  • Node.js 20+ (download)
  • Telegram Bot (get from @BotFather) or use WhatsApp
  • Groq API Key (free tier)
  • Google Account (for saving docs/tasks/calendar)

Installation

Option 1: One-liner (Recommended)

curl -fsSL https://raw.githubusercontent.com/thesaiprasadrao/second-brain/main/install.sh | bash

Option 2: Global npm

npm install -g @saiprasadrao/2nd-brain

Option 3: Manual

git clone https://github.com/thesaiprasadrao/second-brain.git
cd second-brain && npm install

Setup & Run

# 1. Configure (interactive wizard)
2nd-brain setup

# 2. Start the daemon (runs in background)
2nd-brain start

# 3. Check status anytime
2nd-brain status

Now use Telegram to send messages to your brain!


🎯 Commands

2nd-brain setup              # Interactive configuration
2nd-brain start              # Start server (daemon mode)
2nd-brain stop               # Stop the daemon
2nd-brain restart            # Restart server
2nd-brain status             # Show server status
2nd-brain logs [N]           # View logs (last N lines)
2nd-brain send <message>     # Send quick message
2nd-brain help               # Show help

Or use npm:

npm start              npm stop              npm restart
npm run setup          npm run status        npm run logs
npm run send "msg"

πŸ“– Usage Examples

πŸ’‘ CAPTURE:
"check this: https://nextjs.org"
"cool idea for building state machines"

βœ… TASKS:
"todo: finish report by friday"
"remind me to code at 5pm"

πŸ“ LISTS:
"add coffee to shopping list"

πŸ”Ž RECALL:
"what did I save about react?"
"show my web development notes"

πŸ’¬ CHAT:
"tell me a joke"
"how is the weather?"

πŸ”§ Configuration

After running 2nd-brain setup, edit .env to customize:

GROQ_API_KEY=gsk_...              # Groq LLM API
TELEGRAM_BOT_TOKEN=...            # Telegram bot token
TELEGRAM_CHAT_ID=...              # Your Telegram chat ID
STORAGE_BACKEND=docs              # docs or keep (Google storage)
BRIEFING_TIME=08:00               # Daily briefing time

Get API Keys:

  • Groq: https://console.groq.com
  • Telegram: Message @BotFather, create bot
  • Google: Auto-configured during setup

πŸ“Š Dashboard Features

  • Stats: Total captures, today's count, message history
  • Recent Captures: Last 5 notes at a glance
  • System Status: Configuration and database health
  • Export Data: Download as JSON, CSV, or Markdown
  • Settings: Reconfigure or reset database

πŸ›  Deployment Options

Local Machine

2nd-brain start          # Runs in background
# Server stays running until you stop it

Docker

docker-compose up --build

Cloud VPS ($5/month)

  • DigitalOcean, Linode, AWS, Hetzner, Vultr
  • SSH in, install Node.js, run 2nd-brain setup && 2nd-brain start
  • Server keeps running with PM2

Raspberry Pi

# SSH into Pi, then
2nd-brain setup && 2nd-brain start

πŸ” Privacy & Security

βœ… Zero Cloud β€” Everything runs on your machine
βœ… Encrypted β€” Telegram/WhatsApp are end-to-end encrypted by default
βœ… No Tracking β€” No analytics, telemetry, or ads
βœ… You Own Your Data β€” Export anytime as JSON, CSV, or Markdown


🧠 How It Works

  1. Message arrives via Telegram/WhatsApp or CLI
  2. LLM analyzes intent (capture, task, conversation, etc.)
  3. Smart routing handles each type differently
  4. Semantic search finds related past captures
  5. Actions execute (save doc, create task, set reminder)
  6. History saved for future recall

πŸ“š Storage Options

| | Google Docs | Google Keep | |--|---|---| | Recommended | βœ“ Yes | Optional | | Organization | One doc per category | Quick notes | | Format | Rich text, URLs | Simple notes |


πŸ”§ Storage Backends

Google Docs (Recommended)

  • One document per category
  • Entries appended chronologically
  • Easy to share/export later

Google Keep

  • Quick notes in Keep app
  • Better for personal use
  • Simpler setup

πŸ› Troubleshooting

| Problem | Solution | |---------|----------| | Setup crashes | 2nd-brain stop && rm .env && 2nd-brain setup | | No Telegram messages | Verify TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID in .env | | Groq API errors | Check rate limits (free tier: 30 req/min) or verify API key | | Google Docs not created | Re-run 2nd-brain setup to refresh permissions | | Database corrupted | 2nd-brain stop && rm memory.db* && 2nd-brain start |


❓ FAQ

Q: Is my data really private?
A: Yes! Everything stays on your machine. Open source β€” check the code yourself.

Q: Can I run this on my phone?
A: Not directly, but run on Raspberry Pi or cloud server and access via Telegram.

Q: What if I lose my laptop?
A: Captures are in Google Docs/Keep. Export regularly as backup.

Q: Can I share captures with others?
A: Yes! Export to Google Docs and share the link.

Q: Does it work offline?
A: LLM processing needs internet. Messages queue when offline.


πŸ“¦ Requirements

  • Node.js 20+
  • Internet connection (for LLM and APIs)
  • Optional: Docker, Telegram account, Google account

🌐 API References

  • Groq LLM: https://console.groq.com (free API)
  • Telegram Bot: https://t.me/botfather
  • Google APIs: Drive, Docs, Tasks, Calendar (auto-setup)

🀝 Contributing

Found a bug? Have an idea?

  • Issues: https://github.com/thesaiprasadrao/second-brain/issues
  • PRs: https://github.com/thesaiprasadrao/second-brain/pulls

πŸ“œ License

MIT β€” Use however you want!


πŸ™ Support

Love Second Brain? Consider:

  • ⭐ Star on GitHub
  • πŸ“’ Share with friends
  • πŸ› Report bugs
  • πŸ’‘ Suggest features

Made with ❀️ for people who think a lot