TunaTuna
Docs
Docs Download βeta

Tuna CLI

Tuna includes a tuna command for using Tuna from your terminal.

Use it to pipe terminal output into Tuna, stage or run Tuna commands, or open Tuna already browsing a path. The CLI talks to the running Tuna app; if Tuna is not open, the helper launches it in the background and waits for it to become ready.

Install

Open Tuna Settings -> General -> Command Line, turn on Enable CLI, then click Install CLI if the helper is missing or stale.

Tuna links the bundled helper to:

~/.local/bin/tuna

Make sure ~/.local/bin is on your shell PATH. If Enable CLI is off, the tuna command will refuse to connect. When Enable CLI is on, Tuna repairs the helper link on launch if it is missing or stale.

export PATH="$HOME/.local/bin:$PATH"

Pick from stdin

Pipe newline-separated values into Tuna and pick one with the normal Tuna UI:

printf "Alpha\nBeta\nGamma\n" | tuna pick -

The selected value is printed to stdout. Cancelling exits non-zero and prints nothing.

Use browse mode when the input contains file or folder names relative to the current directory:

ls | tuna pick --browse -
ls | tuna pick -b -

Limit very large inputs:

ps aux | tuna pick --limit 2000 -

Use --limit 0 for no result cap.

Stage a command

stage fills Tuna's subject/action/target panes without running the command:

tuna stage "buy milk"
tuna stage ~/Downloads
tuna stage ~/Downloads Open
tuna stage subject.identifier action.identifier target.identifier

Rules:

  • subject is required
  • action is optional
  • target is only allowed when action is present
  • subject and target can be Tuna identifiers, existing paths, URLs, or plain text
  • action can be a common action name like Open, or a Tuna action identifier

Run a command

run executes a Tuna command immediately:

tuna run ~/Downloads Open
tuna run "buy milk" action.identifier
tuna run subject.identifier action.identifier target.identifier

Use --silent or -s to run without showing Tuna when possible:

tuna run --silent subject.identifier action.identifier

Rules:

  • subject and action are required
  • target is optional when the action accepts one
  • subject and target can be Tuna identifiers, existing paths, URLs, or plain text
  • action can be a common action name like Open, or a Tuna action identifier

Browse from the terminal

Open Tuna already browsing the current directory:

tuna browse

Or browse a specific path or browsable Tuna item:

tuna browse ~/Projects
tuna browse some.browsable.identifier

Notes

  • The CLI is local-only and communicates with the Tuna app through an app-owned socket.
  • The Tuna app owns the UI, command execution, and selection state.
  • If the helper cannot connect, it launches Tuna and waits up to 30 seconds.