Skip to content

amulcse/try

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

try

A Go port of tobi/try - fresh directories for every vibe 🏠

All credit for the original idea goes to Tobi Lütke and the original Ruby version.

Go Report Card License: MIT


Quick Start (2 Steps)

Step 1: Install the Binary

One-Line Install (Recommended):

curl -fsSL https://raw.githubusercontent.com/amulcse/try/main/scripts/install.sh | bash

Or Manual Download:

macOS (Apple Silicon):

curl -LO https://github.com/amulcse/try/releases/latest/download/try_darwin_arm64.tar.gz
tar -xzf try_darwin_arm64.tar.gz && chmod +x try && sudo mv try /usr/local/bin/

macOS (Intel):

curl -LO https://github.com/amulcse/try/releases/latest/download/try_darwin_amd64.tar.gz
tar -xzf try_darwin_amd64.tar.gz && chmod +x try && sudo mv try /usr/local/bin/

Linux (x64):

curl -LO https://github.com/amulcse/try/releases/latest/download/try_linux_amd64.tar.gz
tar -xzf try_linux_amd64.tar.gz && chmod +x try && sudo mv try /usr/local/bin/

Linux (arm64):

curl -LO https://github.com/amulcse/try/releases/latest/download/try_linux_arm64.tar.gz
tar -xzf try_linux_arm64.tar.gz && chmod +x try && sudo mv try /usr/local/bin/

Windows (PowerShell):

Invoke-WebRequest -Uri "https://github.com/amulcse/try/releases/latest/download/try_windows_amd64.zip" -OutFile "try.zip"
Expand-Archive -Path "try.zip" -DestinationPath "." -Force
Move-Item -Path "try.exe" -Destination "$env:USERPROFILE\bin\try.exe" -Force

Homebrew (macOS/Linux)

brew install amulcse/tap/try

Go Install

If you have Go installed:

go install github.com/amulcse/try/cmd/try@latest

Step 2: Add to Shell Config (Required!)

⚠️ Without this step, try will only print commands instead of executing them!

Bash / Zsh - Add to ~/.bashrc or ~/.zshrc:

eval "$(try init)"

Fish - Add to ~/.config/fish/config.fish:

eval (try init | string collect)

Then restart your terminal or run:

source ~/.zshrc  # or ~/.bashrc

What It Does

Demo

Instantly navigate through all your experiment directories with:

  • Fuzzy search that just works
  • Smart sorting - recently used stuff bubbles to the top
  • Auto-dating - creates directories like 2025-01-21-redis-experiment
  • Zero config - just one binary, no dependencies

Usage

try                        # Browse all experiments
try redis                  # Jump to redis experiment or create new
try new api                # Create "2025-01-21-api"
try .                      # Create dated worktree for current repo
try clone https://...      # Clone repo into dated directory
try https://github.com/... # Shorthand for clone
try delete                 # Delete a directory
try rename                 # Rename a directory
try --help                 # See all options

Keyboard Shortcuts

Key Action
/ Navigate
Ctrl-P / Ctrl-N Navigate (vim-style)
Ctrl-J / Ctrl-K Navigate (vim-style)
Enter Select or create
Backspace Delete character
Ctrl-U Clear input
Ctrl-D Delete directory
Ctrl-R Rename directory
ESC Cancel

Configuration

Set TRY_PATH to change where experiments are stored:

export TRY_PATH=~/code/sketches

Default: ~/src/tries


Why a Go Port?

  • Single binary - No Ruby runtime required
  • Cross-platform - Pre-built binaries for macOS, Linux, Windows
  • Same features - 100% compatible with the original
  • Fast - Native compiled performance

Features

🎯 Smart Fuzzy Search

  • rds matches redis-server
  • connpool matches connection-pool
  • Recent stuff scores higher

⏰ Time-Aware

  • Shows how long ago you touched each project
  • Recently accessed directories float to the top

🎨 Beautiful TUI

  • Clean, minimal interface
  • Highlights matches as you type
  • Respects NO_COLOR environment variable

📁 Organized Chaos

  • Everything in one place
  • Auto-prefixes with dates
  • Git worktree support

The Philosophy

Your brain doesn't work in neat folders. You have ideas, you try things, you context-switch like a caffeinated squirrel. This tool embraces that.

Every experiment gets a home. Every home is instantly findable.


Credits

All credit goes to Tobi Lütke and the original try project.

This is a Go port providing:

  • Single binary distribution
  • No Ruby dependency
  • Cross-platform binaries

Check out the original: github.com/tobi/try

License

MIT License - Same as the original project.


Your experiments deserve a home. 🏠

About

A go port of https://github.com/tobi/try

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors