Personal CLI of La Pyae โ mental models, stoicism, clear thinking
npm install 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 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.
- ๐จ Unified TUI Experience: Entirely redesigned terminal interface with consistent branding (#f3c12b).
- โจ๏ธ Slash Command Power: New /new and /exit commands for better session management.thelapyae "question"
- ๐ Integrated CLI-to-TUI: Run 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.
- ๐ 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
You don't need to install anything if you just want to run it once:
`bash`
npx thelapyae "I feel overwhelmed"
To install it globally for faster access:
`bash`
npm install -g thelapyae
The new rich terminal interface provides a beautiful, interactive experience:
`bash
$ thelapyae
Features:
- ๐จ Beautiful interface with brand colors
- โจ๏ธ Intuitive slash commands
- ๐ Live autocomplete as you type
/
- ๐ฌ Interactive AI consultations
- ๐ Browse session history inline
- ๐ฏ Zero mouse required---
$3
Just run
thelapyae to enter an immersive interactive session:`bash
$ 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---
$3
You can also use thelapyae directly from the command line:
`bash
Get AI-powered advice
thelapyae "I feel overwhelmed"Get offline advice (no API key needed)
thelapyae consult "I feel anxious" --no-aiGet a random mental model
thelapyae randomSearch for models
thelapyae search "decision making"List all models
thelapyae listList by category
thelapyae list --category "Economics"View history
thelapyae sessionsSetup AI (one-time)
thelapyae config
`$3
####
thelapyae consult
Get AI-powered or offline advice using mental models.`bash
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-aiUse more models
thelapyae consult "How do I prioritize?" --model-count 5
`####
thelapyae search
Search for mental models with fuzzy matching.`bash
Find models about thinking
thelapyae search "thinking"Limit results
thelapyae search "decision" --limit 3Search handles typos
thelapyae search "invertion" # Finds "inversion"
`####
thelapyae list
List all mental models or filter by category.`bash
List all
thelapyae listFilter by category
thelapyae list --category "General Thinking"Table format
thelapyae list --format tableJSON format
thelapyae list --format json
`####
thelapyae random
Get a random mental model for daily inspiration.`bash
thelapyae random
`####
thelapyae config
Manage your API key and preferences.`bash
Interactive setup
thelapyae configShow current config
thelapyae config --showTest API key
thelapyae config --testReset (delete API key)
thelapyae config --reset
`$3
`bash
--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:
`bash
thelapyae config
`3. 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
`bash
Install dependencies
npm installRun tests
npm testRun tests with coverage
npm run test:coverageRun tests in watch mode
npm run test:watch
``Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
MIT ยฉ La Pyae
- Mental models curated from various sources
- Powered by Google Gemini AI
- Built with Node.js, Commander.js, Chalk, Ora, Fuse.js, and more