try

(★ 3,937)

fresh directories for every vibe

File Explorer

  • .gitignore
  • AGENTS.md
  • flake.lock
  • flake.nix
  • Gemfile
  • Gemfile.lock
  • LICENSE
  • Makefile
  • Rakefile
  • README.md
  • try-cli.gemspec
  • try.rb
  • VERSION

# Installation Guide

ruby
Prerequisites

Setup Steps

gem install try-cli

Install try-cli via RubyGems.

eval "$(try init)"

Apply the try initialization script to your shell environment.

Key Commands

try redis

Browse experiment directories or create and jump to a new one.

try new api

Create a new experiment directory prefixed with today's date.

try clone https://github.com/tobi/try.git

Clone a Git repository into a date-prefixed experiment directory.

eval "$(try init ~/src/tries)"

Output initialization commands and paths for shell integration.

You can set the TRY_PATH environment variable to change the default storage path.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

brew install

View Details ▼

Install a Homebrew formula or cask.

brew install {{formula|cask}}

Install a formula/cask:

brew install {{[-s|--build-from-source]}} {{formula}}

Build and install a formula from source (dependencies will still be installed from bottles):

brew install {{[-n|--dry-run]}} {{formula|cask}}

Download the manifest, print what would be installed but don't actually install anything:

🔍

brew tap

View Details ▼

Tap a Homebrew formula repository. If no arguments are provided, list all installed Homebrew taps.

brew tap

List installed Homebrew taps:

brew tap {{github_username}}/{{github_repository_name}}

Tap a Git repository hosted on GitHub:

brew tap {{username}}/{{repository_name}} {{git_clone_url}}

Tap a Git repository hosted outside of GitHub:

🔍

fzf

View Details ▼

Fuzzy finder.
Similar to `sk`.

find {{path/to/directory}} -type f | fzf

Start `fzf` on all files in the specified directory:

ps aux | fzf

Start `fzf` for running processes:

find {{path/to/directory}} -type f | fzf {{[-m|--multi]}} > {{path/to/file}}

Select multiple files with `<Shift Tab>` and write to a file:

🔍

gem

View Details ▼

A package manager for the Ruby programming language.

gem search {{regex}} {{[-a|--all]}}

Search for remote gem(s) and show all available versions:

gem install {{gem_name}}

Install the latest version of a gem:

gem install {{gem_name}} {{[-v|--version]}} {{1.0.0}}

Install a specific version of a gem:

🔍

nix run

View Details ▼

Run an application from a Nix flake.
See also: `nix flake`.

nix run

Run the default application in the flake in the current directory:

nix run nixpkgs#{{pkg}}

Run a command whose name matches the package name from nixpkgs (if you want a different command from that package, see `tldr nix shell`):

nix run nixpkgs#{{vim}} -- {{path/to/file}}

Run a command with provided arguments:

🔍

redis-server

View Details ▼

Persistent key-value database.

redis-server

Start Redis server, using the default port (6379), and write logs to `stdout`:

redis-server --daemonize yes

Start Redis server, using the default port, as a background process:

redis-server --port {{port}} --daemonize yes

Start Redis server, using the specified port, as a background process:

🔍

ruby

View Details ▼

Ruby programming language interpreter.
See also: `gem`, `bundler`, `rake`, `irb`, `ri`.

ruby {{path/to/script.rb}}

Execute a Ruby script:

ruby -e "{{command}}"

Execute a single Ruby command in the command-line:

ruby -c {{path/to/script.rb}}

Check for syntax errors on a given Ruby script:

// repository documentation