Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jorgeurtubiam-ship-it/Gulin_ia/llms.txt

Use this file to discover all available pages before exploring further.

wsh is GuLiN’s command-line companion — a lightweight binary that connects to the running GuLiN application to control blocks, manage files, send AI messages, and configure settings. Every terminal block inside GuLiN has wsh available on its PATH, so you can script and automate the terminal from the command line without any extra setup.

Installation

wsh is bundled with GuLiN and is automatically installed and placed on the PATH of every terminal block at startup — no manual steps are required on your local machine.
When you open an SSH connection in GuLiN, the application automatically installs wsh on the remote host as well, provided the conn:wshenabled setting is true (the default). This means all wsh commands work identically on remote machines without any manual copying or installation.
You can verify that wsh is available and check the version by running:
wsh --version
To reinstall wsh on a remote host at any time, use:
wsh conn reinstall user@hostname

How It Works

wsh communicates with the gulinsrv backend process over a Unix domain socket (or stdio in some modes). The connection details are injected into each terminal block’s environment via the GULIN_JWT environment variable. When wsh starts, it:
  1. Reads the GULIN_JWT token from the environment.
  2. Extracts the RPC context (socket path, block ID, tab ID) from the token.
  3. Opens a domain socket connection to gulinsrv.
  4. Authenticates using the token.
  5. Dispatches the requested WshRpcInterface command and streams the result.
Because GULIN_JWT is automatically set in every GuLiN-managed terminal block, wsh commands work out of the box. Running wsh outside of a GuLiN terminal session will fail with:
wsh must be run inside a Gulin-managed SSH session (GULIN_JWT not found)

Global Flags

The following persistent flag is available on every wsh command:
FlagShortTypeDefaultDescription
--block-bstring"" (current block)Target block ID, block number, or the literal this for commands that operate on a specific block

Output

wsh follows standard Unix conventions:
  • Normal output is written to stdout.
  • Error messages are written to stderr.
  • A non-zero exit code is returned whenever a command fails.
When running inside a GuLiN terminal block in raw/pty mode, wsh automatically converts bare \n newlines to \r\n so output renders correctly.

Usage Pattern

wsh <command> [flags] [args]
Most commands also accept the global -b flag to target a specific block:
wsh <command> -b <blockid|blocknum|this> [flags] [args]

Command Quick Reference

CommandDescription
wsh aiAppend files or a message to the GuLiN AI sidebar prompt
wsh sshConnect the current (or a new) terminal block to a remote SSH host
wsh setmetaSet metadata key-value pairs on a block or other entity
wsh getmetaGet metadata from a block or other entity
wsh setconfigUpdate GuLiN global settings key-value pairs
wsh editconfigOpen a GuLiN configuration file in the editor
wsh setvarSet one or more persistent variables for a block
wsh getvarGet a persistent variable (or all variables) from a block
wsh createblockCreate a new block with a specified view and metadata
wsh deleteblockDelete a block
wsh focusblockMove keyboard focus to a specific block
wsh editorOpen a file in GuLiN’s built-in editor (blocks until closed)
wsh runRun a command in a new terminal block
wsh notifySend a desktop notification
wsh setbgSet the background image or color for the current tab
wsh secretManage application secrets (get, set, list, delete, UI)
wsh fileManage files across local and remote systems
wsh termOpen a new terminal block in a specified directory
wsh connManage SSH and WSL connections
wsh launchLaunch a configured widget by its ID
wsh gulinTalk directly to the GuLiN Agent from the terminal
wsh gulinpathPrint paths to GuLiN config, data, or log directories
wsh blocksList and inspect blocks across workspaces
For the full documentation of every command, flag, and example, see the wsh Commands Reference.

Build docs developers (and LLMs) love