@johnlindquist/try
v0.1.1
Published
Fresh directories for every vibe - TypeScript/Bun port of tobi/try using Ink
Maintainers
Readme
@johnlindquist/try
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 @johnlindquist/try
# Or use with bunx (no install needed!)
bunx @johnlindquist/try
# Or install with bun
bun install -g @johnlindquist/tryDevelopment
# Clone the repo
git clone https://github.com/johnlindquist/try.git
cd try
# Install dependencies
bun install
# Run in dev mode
bun run dev
# Build executable
bun run buildUsage
Quick Start
# Interactive selector
try
# Search for existing directories
try redis
# Show help
try --helpShell Integration
Add to your ~/.zshrc or ~/.bashrc:
# Generate the shell function
eval "$(try init)"Then use it as a function:
try redis # Jump to or create redis experiment
try # Browse all experimentsOr use directly with bunx (no install):
bunx @johnlindquist/try # Interactive selector
bunx @johnlindquist/try 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) | @johnlindquist/try (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. 🏠
