Skip to content

Latest commit

 

History

96 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

natare

CI

Alt+Tab for tmux — fast session switching with live preview and frecency.

Natare is a small, keyboard-first tmux session switcher powered by fzf. It works with the tmux sessions you already have: no workspace files, project database, or large config.

Demo

Switch between tmux sessions from a popup and preview the real session as you move through the list.

natare demo

The original screen recording is docs/demo.webm.

Want the same playground? scripts/demo-sessions.sh creates the demo sessions on their own tmux socket and attaches you to one.

Why natare?

Natare focuses on one thing: making it very fast to move between existing tmux sessions.

  • Fuzzy search with fzf
  • Frecency sorting — sessions you use recently and often move toward the top
  • 1–9 shortcuts for quick access to the first nine sessions
  • Live preview with Ctrl+N / Ctrl+P
  • Kill sessions directly from the picker with DEL
  • Git worktree filtering
  • Single Go binary
  • Linux and macOS builds for amd64 and arm64

Live session preview

This is the main feature.

Press Ctrl+N or Ctrl+P while the picker is open and Natare switches the real tmux client to the highlighted session.

It is not a screenshot or static preview pane. You see the actual session.

Natare uses a short debounce delay so moving through several rows quickly does not trigger a burst of tmux switches. The default delay is 300 ms.

Install

Requirements

  • tmux with display-popup support
  • fzf 0.51.0+
  • git only for worktree switching

Download a release

Download the archive for your platform from the latest release.

Builds are published for Linux and macOS, amd64 and arm64.

Example for Linux amd64:

tar -xzf natare_<version>_linux_amd64.tar.gz
install -m755 natare ~/.local/bin/natare

Make sure ~/.local/bin is in your PATH.

Then, from inside tmux:

natare popup-switch

Add a tmux keybinding

You probably do not want to type natare popup-switch every time.

Add this to ~/.tmux.conf:

bind-key s run-shell 'natare popup-switch'

Reload tmux:

tmux source-file ~/.tmux.conf

Now press <prefix> s to open Natare.

If you want a direct key without the tmux prefix:

bind-key -n C-Space run-shell 'natare popup-switch'

Then Ctrl+Space opens Natare from anywhere inside tmux.

Controls

Inside the main session picker:

Key Action
type fuzzy search sessions
Enter switch to the selected session
19 jump to one of the first nine sessions
Ctrl+N move down and live-preview the session
Ctrl+P move up and live-preview the session
DEL kill the selected session
Esc close the picker

The current session stays visible at the top. Other sessions are ordered using frecency.

Frecency

Alphabetical order is rarely the order you actually want.

Natare remembers successful switches and scores sessions based on how recently and how often you used them. Sessions you keep returning to naturally move toward the top.

The history is stored locally in a small JSON file. There is no daemon or database server.

Commands

natare switch                  # Switch sessions
natare popup-switch            # Switch sessions in a tmux popup
natare new                     # Create a session
natare rename                  # Rename the current session
natare kill                    # Kill one or more sessions
natare detach                  # Detach clients from sessions
natare worktree-switch         # Show sessions for this repo's git worktrees
natare popup-worktree-switch   # Same, in a tmux popup
natare capital-switch          # Show CAPITAL sessions only
natare popup-capital-switch    # Same, in a tmux popup

Run Natare without an action to open an interactive action menu:

natare

Kill multiple sessions

natare kill

Use TAB to mark multiple sessions.

Git worktrees

From a pane inside a Git repository:

natare worktree-switch

Natare finds the repository worktrees and shows only tmux sessions whose panes are inside those worktrees.

Popup version:

natare popup-worktree-switch

CAPITAL sessions

If you use uppercase names for a special group of sessions:

natare capital-switch

or:

natare popup-capital-switch

Configuration

Natare respects your existing FZF_DEFAULT_OPTS.

You can also set Natare-specific fzf options:

export TMUX_FZF_OPTIONS="--height 80%"

Or change the fzf command:

export TMUX_FZF_BIN="fzf"

TMUX_FZF_BIN may include arguments, for example:

export TMUX_FZF_BIN="fzf-tmux -p 80%"

Natare parses these values without shell eval.

Live-preview delay

The default delay is 300 ms:

export SESSION_SWITCH_DEBOUNCE_MS=150

Use 0 to disable the delay:

export SESSION_SWITCH_DEBOUNCE_MS=0

natare vs larger tmux session managers

Tools such as sesh and tmux-sessionx do much more: project discovery, zoxide integration, session creation from directories, project configuration, and other workflows.

Natare has a narrower goal:

Make switching between existing tmux sessions extremely fast.

If you want a full project/session management system, another tool may be a better fit.

If you already use tmux heavily and mainly want a fast switcher, Natare is built for that.

Development

Go and Python run only inside Docker for this project.

docker compose run --rm build               # compile ./natare
docker compose run --rm build go test ./... # Go unit tests
docker compose run --rm test                # integration tests (tmux + fzf)
docker compose run --rm test-record         # integration tests + .cast recordings

Recordings land in test_output/casts/.

Convert one to WebP with:

docker compose run --rm media scripts/cast2webp.sh <cast-name>

For implementation details, see SPEC.md and ARCHITECTURE.md.

Releasing

Push a tag. The release workflow cross-compiles, creates checksums, and publishes the artifacts.

git tag v1.0.0
git push origin v1.0.0

License

MIT


If Natare makes tmux navigation faster for you, consider starring the repo. It helps other tmux users find it.

About

Alt+Tab for TMUX | fast session switching with fzf, frecency and live preview

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages