Lightweight, time‑sensitive directory navigation for experiments — a fast way to jump between temporary project folders.
Inspired by and adapted from Tobias Lütke's original Ruby tool: https://github.com/tobi/try
One-line install (Linux/macOS):
curl -sSf https://raw.githubusercontent.com/dariuszparys/try-rs/main/install.sh | shThen restart your shell and run try to get started!
When experimenting you often create throwaway directories (e.g.,
2025-08-21-test-feature-x, tmp-viz-poc). Finding and jumping back to them
slows you down. try gives you an interactive, fuzzy selector that favors what
you touched most recently, and creates a new directory when your query doesn’t
exist — all wired to actually cd your shell.
- Interactive fuzzy finder: fast, incremental filtering of your tries.
- Time‑sensitive scoring: boosts recently created or visited dirs.
- Instant creation: press Enter to create when no exact match.
- Git clone integration:
try clone <url>or pass a git URL totryto clone into a date‑prefixed dir. - One‑key deletion: Ctrl‑D, with an explicit “YES” confirmation.
- Shell integration: prints
cdcommands your shell evaluates. - Native speed: single‑binary CLI written in Rust.
curl -sSf https://raw.githubusercontent.com/dariuszparys/try-rs/main/install.sh | shThis script will:
- Detect your OS (Linux/macOS) and architecture (x86_64/aarch64/armv7)
- Download the latest pre-built binary from GitHub releases
- Extract and install it to
~/.local/bin - Check if
~/.local/binis in your PATH (warns if not) - Automatically add shell integration to your rc file (bash/zsh/fish)
After installation, restart your shell or source your rc file to start using try.
To skip automatic shell integration:
curl -sSf https://raw.githubusercontent.com/dariuszparys/try-rs/main/install.sh | sh -s -- --no-shell-integrationFor help:
curl -sSf https://raw.githubusercontent.com/dariuszparys/try-rs/main/install.sh | sh -s -- --helpDownload the latest release for your platform from the releases page, extract it, and place the binary in your PATH.
If you have Rust installed:
cargo install try-cliPrerequisites: a working Rust toolchain from https://rustup.rs
git clone https://github.com/dariuszparys/try-rs.git
cd try-rs
cargo install --path .Or build a release binary: cargo build --release → target/release/try
If you used the install script, shell integration is already configured! Just restart your shell.
If you installed via another method, add the following to your shell configuration:
bash/zsh:
# add to ~/.bashrc or ~/.zshrc
eval "$(try init)"fish:
# add to ~/.config/fish/config.fish
eval "$(try init | string collect)"Then reload your shell:
source ~/.bashrc # or: source ~/.zshrcCustomize the storage location (default: ~/src/tries) either by passing an
absolute path to init or by setting TRY_PATH. You can also override
per‑invocation with the global --path option:
eval "$(try init /absolute/path/to/tries)"
# or
export TRY_PATH=/absolute/path/to/tries
eval "$(try init)"
# or override at call time
try --path /absolute/path/to/triesBasic:
# Open the selector (with shell function installed)
try # Open the selector
try my-experiment # Seed the query (shell function calls `try cd ...`)
try cd my-experiment # Same as above without the shell function
# Clone a git repo into a date-prefixed directory and cd into it
try clone https://github.com/user/repo.git
try clone git@github.com:user/repo my-fork # custom name
# Shorthand: passing a git URL to `try` behaves like `try clone`
try https://github.com/user/repoInside the selector:
- Up/Down or Ctrl‑P/Ctrl‑N: move selection
- Type: filter entries
- Enter: select existing or create
YYYY-MM-DD-<query>and cd - Ctrl‑D: delete the selected directory (requires typing
YESto confirm) - Esc/Ctrl‑C: cancel and return to the shell
Notes:
- If there’s no matching directory, Enter creates one (prefixed by
YYYY-MM-DD-) and jumps into it. - Ranking combines fuzzy score with recency to surface likely targets.
- Query terms that start with a hyphen must be placed after
--so they aren’t parsed as flags, for example:try cd -- --foo --bar. With the shell function installed, use:try -- --foo.
- Ctrl‑D prompts for confirmation; type
YESto permanently delete the selected directory. - File count and size are displayed before confirmation.
- Operations are restricted to the configured tries root; entries outside are never touched.
try(with no args): open the selector.try --help: show top‑level help (lists subcommands and global options).try init [--path PATH] [PATH]: print the shell function; add it to your rc file.try cd [QUERY...] [--path PATH]: launch selector and print thecd/mkdir/touch commands (used by the shell function).try clone <git-uri> [name] [--path PATH]: print a clone pipeline (mkdir -p, git clone, touch, cd) into the tries directory.- Shorthand:
try <git-uri>behaves liketry clone <git-uri>. - Subcommand help:
try cd --help,try init --help,try clone --help.
- Default tries directory:
~/src/tries - Override via
TRY_PATHenv var or an absolute path argument totry init
command not found: try: ensure~/.local/bin(or~/.cargo/binif installed via cargo) is on yourPATHor reference the binary directly, e.g.eval "$(~/.local/bin/try init)".- Selector opens but no
cdhappens: confirm your rc file sources theinitfunction and that you restarted/reloaded the shell. If you have multiple shells configured, ensure the integration is in the correct shell's RC file (e.g.,~/.zshrcfor zsh,~/.bashrcor~/.bash_profilefor bash). - Wrong tries location: check
echo $TRY_PATHor the path passed toinit.
- Build:
cargo build(orcargo build --release) - Run:
cargo run -- [args](e.g.,cargo run -- cd foo) - Test:
cargo test --all --locked - Lint:
cargo clippy --all-targets -- -D warnings - Format:
cargo fmt --all
Architecture: single‑binary CLI using crossterm for TUI, dirs for home
paths, and unicode-width for display width.
- Help and error output from
clapuses its built‑in color logic (color: auto) and respects standard environment conventions. try’s own warnings and errors are styled on stderr when appropriate and degrade to plain text when not:- Colors enabled only if stderr is a TTY.
NO_COLORdisables colors.CLICOLOR=0disables;CLICOLOR_FORCE!=0forces enable.
- When output is piped or redirected, styling is disabled to avoid ANSI sequences in logs.
- Internally, the app uses a small, typed error (
thiserror) at high‑level boundaries and returns plainio::Errorfor low‑level file operations. - The selector and CLI keep a lenient UX: non‑critical issues print a warning and continue; critical issues surface clearly and set a non‑zero exit where appropriate.
trywrites only under the configured tries directory (default~/src/tries).- No network access or secrets required.
MIT — see LICENSE.
See CONTRIBUTING.md for workflow and PR expectations, and AGENTS.md for structure, commands, style, and testing guidelines.