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

thelapyae

v0.5.0

Published

Personal CLI of La Pyae – mental models, stoicism, clear thinking

Readme

thelapyae

The personal CLI of La Pyae (@thelapyae) – a collection of mental models for clear thinking, decision making, and problem solving, powered by AI.

thelapyae CLI Tests License

  _   _          _                              
 | |_| |__   ___| | __ _ _ __  _   _  __ _  ___ 
 | __| '_ \ / _ \ |/ _` | '_ \| | | |/ _` |/ _ \
 | |_| | | |  __/ | (_| | |_) | |_| | (_| |  __/
  \__|_| |_|\___|_|\__,_| .__/ \__, |\__,_|\___|
                        |_|    |___/            

🚀 Introduction

thelapyae is a command-line tool designed to help you think better. It provides instant access to a curated library of 98 mental models (like Inversion, First Principles, Circle of Competence).

It features a Think-with-AI mode where it acts as a consultant, analyzing your specific life or work problems using these mental models to provide actionable advice. Even without AI, it provides powerful offline synthesis combining multiple perspectives.

✨ What's New in v0.5.0

  • 🎨 Unified TUI Experience: Entirely redesigned terminal interface with consistent branding (#f3c12b).
  • ⌨️ Slash Command Power: New /new and /exit commands for better session management.
  • 🔍 Integrated CLI-to-TUI: Run thelapyae "question" to jump directly into a TUI consultation.
  • 📑 Inline Views: Help, Configuration, and Sessions now display inline for a smoother workflow.
  • ⌨️ Esc to Back: Standardized Esc key navigation to return to the welcome screen from anywhere.
  • 🎯 Fixed Input: Resolved double-character and Vim mode issues for a fluid typing experience.

Previous Updates (v0.2.0-v0.3.0)

  • 🔐 Secure Storage: API keys now stored in OS keychain (not plain text)
  • 🔍 Better Search: Fuzzy matching with typo tolerance
  • 🧠 Offline Mode: Multi-model synthesis without requiring API key
  • 🎨 Beautiful Output: Colors, spinners, and better formatting
  • 🛡️ Error Handling: Helpful error messages with suggestions
  • Tested: 34 unit tests ensuring quality
  • 📝 More Commands: Comprehensive CLI with flags and options

📦 Installation

You don't need to install anything if you just want to run it once:

npx thelapyae "I feel overwhelmed"

To install it globally for faster access:

npm install -g thelapyae

💡 Usage

TUI Mode (Recommended) 🎨

The new rich terminal interface provides a beautiful, interactive experience:

$ thelapyae

# You'll see a stunning centralized interface:
# - Header: Brand logo and version
# - Content: Consultations, Help, or History
# - Bottom: Responsive input box

# Commands:
# /help     - Show interactive help
# /new      - Start a new session
# /exit     - Cleanly quit
# /random   - Get a random model
# /list     - List all models
# /sessions - View past sessions
# /config   - Setup API key

# Navigation:
# Enter     - Submit question/command
# Esc       - Back to Welcome / Clear input
# Ctrl+C    - Force Quit

Features:

  • 🎨 Beautiful interface with brand colors
  • ⌨️ Intuitive slash commands
  • 🔍 Live autocomplete as you type /
  • 💬 Interactive AI consultations
  • 📚 Browse session history inline
  • 🎯 Zero mouse required

Interactive Mode (Classic)

Just run thelapyae to enter an immersive interactive session:

$ thelapyae

╭ thelapyae v0.3.0 ──────────────────────────────╮
│                                                 │
│   Welcome! Ask me anything about thinking,     │
│   decisions, or life.                           │
│                                                 │
│   💡 Tips                                       │
│   Just type your question and press Enter      │
│   Commands: /random /list /sessions /help      │
│                                                 │
╰─────────────────────────────────────────────────╯

> Should I quit my job?

[Interactive consultation with reflection questions...]

> /random

[Shows random mental model...]

> /exit

In interactive mode:

  • Just type your question and press Enter
  • Use /help to see available commands
  • Use /random, /list, /sessions, /config
  • Use /exit to quit

Quick Commands

You can also use thelapyae directly from the command line:

# Get AI-powered advice
thelapyae "I feel overwhelmed"

# Get offline advice (no API key needed)
thelapyae consult "I feel anxious" --no-ai

# Get a random mental model
thelapyae random

# Search for models
thelapyae search "decision making"

# List all models
thelapyae list

# List by category
thelapyae list --category "Economics"

# View history
thelapyae sessions

# Setup AI (one-time)
thelapyae config

Commands

thelapyae consult <query>

Get AI-powered or offline advice using mental models.

# AI mode (requires API key)
thelapyae "I'm feeling overwhelmed with too many projects"

# Offline mode (no API key needed)
thelapyae consult "Should I take this job?" --no-ai

# Use more models
thelapyae consult "How do I prioritize?" --model-count 5

thelapyae search <query>

Search for mental models with fuzzy matching.

# Find models about thinking
thelapyae search "thinking"

# Limit results
thelapyae search "decision" --limit 3

# Search handles typos
thelapyae search "invertion"  # Finds "inversion"

thelapyae list

List all mental models or filter by category.

# List all
thelapyae list

# Filter by category
thelapyae list --category "General Thinking"

# Table format
thelapyae list --format table

# JSON format
thelapyae list --format json

thelapyae random

Get a random mental model for daily inspiration.

thelapyae random

thelapyae config

Manage your API key and preferences.

# Interactive setup
thelapyae config

# Show current config
thelapyae config --show

# Test API key
thelapyae config --test

# Reset (delete API key)
thelapyae config --reset

Global Options

--help, -h          Show help
--version, -v       Show version
--no-color          Disable colored output
--verbose           Show detailed output

🔑 Configuration (AI Setup)

To enable the AI consulting feature, you need a Google Gemini API Key.

  1. Get your free key from Google AI Studio.
  2. Run the config command:
thelapyae config
  1. Paste your API key when prompted. It will be saved securely in your OS keychain.

Note: Your API key is stored securely in:

  • macOS: Keychain
  • Windows: Credential Manager
  • Linux: Secret Service

Old plain-text keys are automatically migrated on first run.

🧠 Mental Models

This CLI includes 98 models from various disciplines:

  • General Thinking Tools (Inversion, Second-Order Thinking, First Principles)
  • Stoicism (Circle of Control, Premeditatio Malorum)
  • Decision Making (Opportunity Cost, Regret Minimization)
  • Economics (Sunk Cost, Compound Interest, Supply and Demand)
  • Human Nature (Confirmation Bias, Social Proof, Incentives)
  • Systems Thinking (Feedback Loops, Leverage Points)
  • And many more...

🧪 Development

# Install dependencies
npm install

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Run tests in watch mode
npm run test:watch

📝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

📄 License

MIT © La Pyae

🙏 Acknowledgments

  • Mental models curated from various sources
  • Powered by Google Gemini AI
  • Built with Node.js, Commander.js, Chalk, Ora, Fuse.js, and more