Welcome to our Slash Command Reference Guide, a comprehensive resource designed to streamline your workflow in Wave using intuitive commands. Here, you’ll find detailed explanations on how to manage various settings and configurations in Wave related to sessions and windows, client settings, editing and viewing files inline, and much more.

Basic Usage

Slash commands are special commands that begin with a forward slash (/), used to perform specific actions or access certain features within Wave. These commands can be executed with or without the leading slash.

The basic structure of a slash command is as follows:

[meta-command] /command [options]

Meta-Commands

Meta-commands are optional, special instructions that modify the behavior or appearance of the command they precede. You can think of meta-commands as flags or parameters that fine-tune the functionality of a command.

Available SlashCommands


/bookmarks

Commands related to managing bookmarks.

/bookmarks:show

Display all bookmarks.

/chat

Ask the AI-assistant an [ad-hoc] question from the terminal.

Usage:
/chat How do I resolve a merge conflict?

For interactive sessions, use the “Wave AI” button in the command box, or use the shortcut `ctrl + space

/clear

Clear all commands from the current window.

Usage:
/clear

/client

Commands that allow you to change and show client settings and information.

/client:set

This command is used to update client settings.

Usage:
/client:set [aiapitoken=token] [aibaseurl=url] [aimaxchoices=choices] [aimaxtokens=tokens] [aimodel=modelname] [termfontfamily=fontfamily] [termfontsize=fontsize]

Options:

  • aiapitoken - Set your OpenAI API token to use the OpenAI API directly instead of the Wave cloud servers.
  • aibaseurl - Set the base URL for the OpenAI API if you want to use a different endpoint or a third-party API compatible with the OpenAI API.
  • aimaxchoices - Specify the maximum number of choices to generate when using the OpenAI API. Note that this option only applies when using your own API token. If you’re using Wave’s proxy, this value is predetermined.
  • aimaxtokens - Set the maximum number of tokens to use when generating a response from the OpenAI API. Note that this option is only effective when using your own API token. If you’re using Wave’s proxy, the maxtokens value is preconfigured.
  • aimodel - Choose the OpenAI language model to use for generating responses. Default is gpt-3.5-turbo.
  • aitimeout - Specify the maximum time to wait (in seconds) for a response from the AI service before timing out. Default value is 10.
  • termfontfamily - Update the font family used in the terminal. Wave supports JetBrains Mono, Hack, and Fira Code out of the box. You can also use any fixed-width font installed on your local machine by specifying its exact name. Be cautious when setting a custom font, as mistyping the font name or using a non-fixed-width font may result in visual inconsistencies.
  • termfontsize - Update the font size used in the terminal. You can set the font size from 8 to 15 pixels (px).

Note: The aimaxtokens and aimaxchoices options are only applicable when using your own OpenAI API token. If you’re using Wave’s built-in proxy for API requests, these values are predetermined to ensure optimal performance and compatibility.

/client:show

This command displays various client settings and version information.

Properties:

  • arch - The architecture of your host system.
  • client-version - The version number of your Wave client.
  • clientid - The identifier for your specific Wave client instance.
  • db-version - The version of the client’s database.
  • aiapitoken - Your OpenAI API token.
  • aibaseurl - The URL used for sending OpenAI queries.
  • aimaxchoices - The maximum number of choices returned when querying OpenAI.
  • aimaxtokens - The maximum number of tokens currently set for OpenAI queries.
  • aimodel - OpenAI model name.
  • releasecheck - Shows if automatic release checks are active (on/off).
  • server-version - The version of the Wave server you’re connected to.
  • telemetry - Indicates whether telemetry is enabled (on/off).
  • termfontfamily - The font family currently used for your terminal text.
  • termfontsize - The current size of the terminal font.
  • userid - Your unique user identifier.

See client:set for more information on how to set the user-modifiable settings.

/codeedit

View and edit files inline using rich native UI. Includes syntax highlighting, code folding, and completion.

Usage:
/codeedit [filename]

[lang=language] /codeedit [filename]
[minimap=0] /codeedit [filename]

[lang=language minimap=0] /codeedit [filename]

Options:

  • filename - Name of the file you’d like to edit. Filename resolves against the current remote and current working directory.

Meta-commands:

  • lang - Sets the syntax highlighting language.
  • minimap - Controls the visibility of the minimap in the scrollbar. Set to 0 to disable.

Shortcuts:

  • Cmd-S - Saves current file
  • Cmd-D - Closes the editor. Note, this will prevent future saves (and shrink the editor to fit the current size of the content).
  • Cmd-F - Search the current file for a string using whole word, regex and match case options. Cmd-F also supports find and replace by simply clicking the green dropdown arrow in the find box.

Note: Codeedit also includes a live preview feature for Markdown files. To activate, open a Markdown file in Codeedit and click the show preview button located in the top right corner. This feature enables simultaneous editing and rendering, offering a side-by-side view of your Markdown source and its live output for efficient and immediate feedback.

See codeview to view files in a view only mode using the same native UI.

/codeview

View a text file inline using rich native UI. Includes syntax highlighting and code folding.

Usage:
/codeview [filename]

[lang=language] /codeview [filename]
[minimap=0] /codeview [filename]

[lang=language minimap=0] /codeview [filename]

Options:

  • filename - Name of the file you’d like to edit. Filename resolves against the current remote and current working directory.

Meta-commands:

  • lang - Sets the syntax highlighting language.
  • minimap - Controls the visibility of the minimap in the scrollbar. Set to 0 to disable.

See codeedit to edit files using the same native UI.

/comment

Add a text comment into the current window.

Usage:
/comment [text]

The text after /comment is not processed and will be posted as-is.

/connect

Change the connection for the current window.

Usage:
/connect [connection-name]

Note: Issuing /connect with no arguments will provide a list of available connections.

/cr

Change the connection for the current window (alias for /connect).

Usage:
/cr [connection-name]

Note: Issuing /cr with no arguments will provide a list of activate connections.

/csvview

Utility for viewing CSV files (with sortable columns) in the terminal.

Usage:
/csvview [filename]

/history

Opens up the history viewer for the current tab.

/history:viewall

Opens up the history viewer for all workspaces and tabs. Gives the user the ability to search by string, filter by workspaces, session type (local or remote), start date, and the ability to “Filter Cmds”, which filters common commands like ls and cd from the results.

/imageview

Utility for viewing image files in the terminal. Currently supported formats include png, jpg, svg, bmp and gif.

Usage:
/imageview [filename]

/line

Updates lines (also called, “command blocks”) in the current window.

/line:archive

Archives (hides) a specified line number. Remains in history (can be unarchived by passing 0 as the 2nd argument).

Usage:
/line:archive [line-arg]
/line:archive [line-arg] [1|0]

/line:bookmark

Adds a specified line number to bookmarks.

Usage:
/line:bookmark [line-arg]

/line:delete

Deletes a specified line from the current tab.

Usage:
/line:delete [line-arg]

Note: When a line is deleted using /line:delete it will still show up in history.

/line:set

Updates line settings.

Usage:
/line:set [line-arg] [renderer=renderer]

The option [line-arg]can be a line number or line id. One argument, sets the renderer for the given line. If renderer is empty, it will default to terminal.

/line:setheight

Stores the height of the specified line. For terminals this is the number of “rows”. For renderers it is the pixel height.

Usage:
/line:setheight [line-arg] [height]

/line:restart

Restarts the command in a given line.

Usage:
/line:restart [line-arg]

/line:show

Shows metadata for the given line.

Usage:
/line:show [line-arg]

The option [line-arg] can be a line number or line id.

/line:view

Switches to the given session, screen, and line. Scrolls UI to the given line.

Usage:
/line:view [session] [screen] [line]

/mdview

Utility for viewing Markdown files in the terminal.

Usage:
/mdview [filename]

A live preview of Markdown files can also be found in codeedit by clicking the “show preview” button in the top right of the editor. This allows you to edit and render Markdown content in real-time, displaying the output adjacent to the code editor for convenient and immediate visual feedback.

/mediaview

Mediaview is a command that allows you to view and play audio and video files directly within the terminal.

Usage:
/mediaview [filename]

Mediaview supports a wide range of media formats, including MP4, WebM, Ogg, MP3, WAV, Ogg Vorbis, AAC, and FLAC.

/pdfview

Utility for viewing PDF files in the terminal.

Usage:
/pdfview [filename]

/releasecheck

Queries the GitHub release feed to determine if a new release is available for download.

/releasecheck:autooff

Turns off automatic checking for new releases.

/releasecheck:autoon

Turns on automatic checking for new releases. This will happen every 8 hours and on launch.

/remote

Commands that create, manage, or update remotes (connections).

Note: All /remote commands can also be accessed using /connection.

/remote:archive

Archives the current remote.

Usage:
/remote:archive

/remote:connect

Connects the current remote.

/remote:disconnect

Disconnects the current remote.

Usage:
/remote:disconnect [force=1]

If the option force=1 is passed it will force the remote to be disconnected even if there are running commands. The commands will be passed SIGHUP.

/remote:install

Installs the latest version of mshell to the remote.

/remote:installcancel

Cancels an install if it is hanging.

/remote:new

Will create a new remote. Arguments can be passed to create the remote completely from the command-line, or if visual=1 is passed it will open the create remote info window.

Usage:
/remote:new [user@host] [visual=1] [sudo=1] [port=portnum] [alias=alias] [connectmode=connectmode] [autoinstall=1] [key=ssh-key-file] [password=ssh-password]

Options:

  • host - Specifies the remote username and hostname or IP address to connect to.
  • visual - Determines whether or not a remote info window is displayed (bool)
  • sudo - Allows the command to be executed with superuser privileges on the remote system. (bool)
  • port - Specifies the port number to use for the SSH connection.
  • alias - Sets a short name or alias for the remote connection, for easier reference.
  • connectmode - Determines whether Waveterm will autoconnect for a new connection. Supported options are startup, auto, and manual.
  • autoinstall - Determines whether of not the WaveShell helper is installed on the remote host (bool)
  • key - Specifies the path to the SSH key file to use for authentication.
  • password - Provides the SSH password for authentication (use with caution, as this may be insecure).

/remote:parse

Imports a users ssh config. By default, it imports both local (~/.ssh/config) and system (/etc/ssh/config) ssh configs.

Usage:
/remote:parse

/remote:reset

Resets the current shell state. Can be used with, or without, the shell argument which supports common shells like bash, zsh, etc. Useful for troubleshooting transient issues with current shell states.

Usage:
/reset
/reset shell=[shell type]

/remote:set

Updates remote parameters. Set visual=1 to edit in the UI.

Usage:
/remote:set [alias] [key] [password] [autoinstall=1]

Options:

  • alias - Sets a short name or alias for the remote connection, for easier reference.
  • key - Specifies the path to the SSH key file to use for authentication.
  • password - Provides the SSH password for authentication (use with caution, as this may be insecure).
  • autoinstall - Determines whether of not the WaveShell helper is installed on the remote host (bool)

/remote:show

Will open the remote info window for the current remote session.

Usage:
/remote:show

/remote:showall

Will open an info window showing information about all of the registered remote sessions.

Usage:
/remote:showall

/reset

Resets the current remote state back to defaults.

Usage:
/reset

The remote will re-run a login (e.g. bashrc or bash_profile) and reset the remote state (CWD, environment, functions, etc.) to match the initial login state. This can be useful to run if you make changes to your bash initialization files and want those changes to be picked up.

/run

Runs a command.

Usage:
/run cat test.sh

/screen

Commands that change or modify the Prompt screen (tab). The bare command will switch the screen (tab).

Usage:
/screen [screen-arg]

The option [screen-arg] can be a screen number, name, id, or relative number.

/screen:archive

Hides a screen (tab). Retains output and history.

Usage:
/screen:archive [screenid] [0|1]

With no arguments will archive the current screen (tab). Otherwise a screen id can be specified to archive. The second argument, if 0 means the screen should be unarchived.

/screen:delete

Deletes the current screen, or specified screen when using [screen-id].

Usage:
/screen:delete
/screen:delete [screen-id]

Note: This will not remove the screens commands from history.

/screen:open

Creates a new screen.

Usage:
/screen:open

/screen:reset

Resets the screen by re-initializing all remotes.

/screen:resize

Tells the backend the new size of the screen. This size is used to change the terminal size for running commands (SIGWINCH).

/screen:set

Updates screen parameters.

Usage:
/screen:set [name=name] [tabcolor=color] [tabicon=icon] [anchor=anchor] [focus=focus] [line=line]

Options:

  • name - set the name of the screen in the tab bar
  • tabcolor - set the color of the tab
  • tabicon - set the icon of the tab. See fontawesome for a full list of supported icons. Note that we use the “Sharp” and “Solid” set of icons.
  • anchor - sets the current scroll anchor position (used by client)
  • focus - sets the focus type for the screen (used by client) (options: input or cmd)
  • line - sets the currently selected line

/screen:showall

Show all screens in the current session (including archived screens).

/session

Commands that change or modify the Prompt session. The bare command will switch the session.

Usage:
/session [session-arg]

The option [session-arg] can be a session number, name, id, or relative number.

/session:archive

Archives a session.

Usage:
/session:archive [sessionid] [0|1]

With no arguments will archive the current session. Otherwise a session id can be specified to archive. The second argument, if 0 means the session should be unarchived.

/session:delete

Deletes the current session, or specified session when using [session-id].

Usage:
/session:delete
/session:delete [session-id]

Note: This will not remove the sessions commands from history.

/session:open

Creates a new session.

Usage:
/session:open [name=name]

A name can be passed to set the session’s name.

/session:set

Sets the name of a session.

Usage:
/session:set [name=name]

One option is supported: name.

/session:show

Show metadata about current session.

/session:showall

Show all sessions (including archived ones).

Commands related to managing the right sidebar.

Adds a line to the sidebar. Width can also be specified with this call (functions the same as for /sidebar:open). The option line is required (can be a line number or a line id).

Usage:
/sidebar:add line=22
/sidebar:add line=a78de32c
/sidebar:add line=5 width=600px

Closes the sidebar.

Usage:
/sidebar:close

Opens the sidebar. Takes an optional width param that specifies the preferred width of sidebar (can be either in percentage or px units).

Usage:
/sidebar:open
/sidebar:open width=40%
/sidebar:open width=600px

Note: The sidebar will not shrink past 200px, also note that percentage must be between 10-90%.

Removes the current line from the sidebar.

Usage:
/sidebar:remove

/signal

Send a signal to a running command.

Usage:
/signal [line-arg] [signame]

The option [line-arg]can be a line number or line id.

The option [signame] is the name of a signal. e.g. KILL, INT, HUP, TERM, etc. Can also prefix with SIG (e.g. SIGKILL). You can also specify a signal by number like this:


/signal [line-arg] 9

/sleep

Pauses the execution of the next command for a specified duration in milliseconds.

Usage:
/sleep 500

This command is largely used for debugging, but should be used in lieu of your systems sleep when creating custom keybindings that contain multiple commands in Wave. This is due to the fact that in it’s current implementation, the keybinding frontend code doesn’t have a built-in mechanism to determine when a command has finished executing. As a result, if commands are executed in rapid succession without any delay, it may lead to unexpected behavior or commands being executed out of order.

/telemetry

Commands that deal with client telemetry.

/telemetry:on

Turn telemetry on.

/telemetry:off

Turn telemetry off.

/telemetry:send

Force a send of current telemetry to server.

/telemetry:show

Show current telemetry (on/off) setting.

Other

Miscellaneous commands for debugging, behind-the-scenes tasks, typically beyond regular workflow usage.

/_killserver

Kills the local prompt server (and restarts it). Used for debugging.

/_compgen

Handles command completion.