@johnlindquist/labx
v0.1.0
Published
Fresh directories for every vibe - TypeScript/Bun port of tobi/try using Ink
Maintainers
Readme
labx
Fresh directories for every vibe 🏠
A TypeScript/Bun port of tobi/try using Ink (React for CLIs).
Instantly navigate through experiment directories with fuzzy search, smart sorting, and auto-dating. Perfect for developers with ADHD who create test, test2, new-test, actually-working-test everywhere.
Features
- 🎯 Smart Fuzzy Search - Not just substring matching
- ⏰ Time-Aware - Recently accessed directories float to the top
- 🎨 Beautiful TUI - Built with Ink (React for terminals)
- 📁 Organized Chaos - Auto-prefixes with dates:
2025-10-06-your-idea - ⚡ Fast - Powered by Bun runtime
Tech Stack
- Bun - Fast JavaScript runtime
- Ink 5.x - React for interactive CLIs
- React 18.x - Component-based UI
- TypeScript - Type safety
- meow - Minimal CLI parser
Installation
# Install globally with npm
npm install -g labx
# Or use with bunx (no install needed!)
bunx labx
# Or install with bun
bun install -g labxDevelopment
# Clone the repo
git clone https://github.com/johnlindquist/labx.git
cd labx
# Install dependencies
bun install
# Run in dev mode
bun run dev
# Build executable
bun run buildUsage
Quick Start
# Interactive selector
labx
# Search for existing directories
labx redis
# Show help
labx --helpShell Integration
Add to your ~/.zshrc or ~/.bashrc:
# Generate the shell function
eval "$(labx init)"Then use it as a function:
lab redis # Jump to or create redis experiment
lab # Browse all experimentsOr use directly with bunx (no install):
bunx labx # Interactive selector
bunx labx redis # Search and createKeyboard Shortcuts
- ↑/↓ or Ctrl-P/N - Navigate
- Enter - Select or create directory
- Backspace - Delete character from search
- ESC or Ctrl-C - Cancel
Configuration
Set TRY_PATH to change where experiments are stored:
export TRY_PATH=~/code/experimentsDefault: ~/src/tries
How It Works
Fuzzy Scoring Algorithm
Directories are scored based on:
- Match quality - Character proximity and word boundaries
- Creation time - Newer directories score higher
- Access time - Recently used directories float to the top
- Name length - Shorter names preferred for equal matches
- Date prefix bonus -
YYYY-MM-DD-*format gets priority
Time Display
just now- Less than 10 seconds5m- Minutes ago3h- Hours ago2d- Days ago1mo- Months ago1y- Years ago
Comparison with Original
| Feature | tobi/try (Ruby) | labx (TypeScript/Bun) | |---------|-----------------|--------------------------| | Runtime | Ruby | Bun | | UI Framework | Raw ANSI | Ink (React) | | Dependencies | 0 (single file) | Bundled (Ink, React) | | CLI Parser | Built-in | meow | | Type Safety | ❌ | ✅ TypeScript | | Speed | Fast | Faster (Bun) |
Why Bun + Ink?
- Ink - Battle-tested TUI framework (used by GitHub Copilot CLI and others)
- React - Component-based UI architecture
- Bun - Blazing fast runtime with built-in TypeScript support
- TypeScript - Type safety and better tooling
Inspired By
- tobi/try - Original Ruby implementation
License
MIT
Built for developers with ADHD by developers with ADHD.
Your experiments deserve a home. 🏠
