Overview
ya is a command-line utility for interacting with running Yazi instances. It provides commands for sending actions, publishing messages, subscribing to events, and managing packages.
Synopsis
Options
boolean
default:"false"
Print version information and exit.
Commands
emit
Emit a command to be executed by the current instance.emit-to
Emit a command to be executed by a specific instance.pkg
Manage packages (plugins and flavors).add- Add packagesdelete- Delete packagesinstall- Install all packageslist- List all packagesupgrade- Upgrade packages
pub
Publish a message to the current instance.pub-to
Publish a message to a specific instance.sub
Subscribe to messages from all remote instances.Examples
Quick Command Execution
Instance Communication
Package Management
Environment Variables
ya uses the following environment variables:
YAZI_ID/YAZI_PID- Instance ID for the current Yazi instance (set automatically)YA_FORCE_ANSI- Set to1to force ANSI color output
Exit Codes
0- Success1- Error occurred (e.g., cannot connect to instance, invalid arguments)
Communication Protocol
ya communicates with Yazi instances using DDS (Data Distribution Service). The instance must be running with a valid client ID for communication to work.
Finding Instance IDs
When Yazi starts, it sets theYAZI_ID environment variable. You can use this in shell commands:
--client-id when starting Yazi).