1"use strict";(self.webpackChunkwaveterm_docs=self.webpackChunkwaveterm_docs||[]).push([[42],{1122:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>h,default:()=>x,frontMatter:()=>o,metadata:()=>l,toc:()=>m});const l=JSON.parse('{"id":"wsh-reference","title":"wsh reference","description":"The wsh command is always available from Wave blocks. It is a powerful tool for interacting with Wave blocks and can bridge data between your CLI and the widget GUIs.","source":"@site/docs/wsh-reference.mdx","sourceDirName":".","slug":"/wsh-reference","permalink":"/wsh-reference","draft":false,"unlisted":false,"editUrl":"https://github.com/wavetermdev/waveterm/edit/main/docs/docs/wsh-reference.mdx","tags":[],"version":"current","sidebarPosition":4.1,"frontMatter":{"sidebar_position":4.1,"id":"wsh-reference","title":"wsh reference"},"sidebar":"defaultSidebar","previous":{"title":"wsh overview","permalink":"/wsh"},"next":{"title":"Custom Widgets","permalink":"/customwidgets"}}');var i=n(4848),a=n(3023),c=n(7982),t=n(1341),r=n(2726);const o={sidebar_position:4.1,id:"wsh-reference",title:"wsh reference"},h="wsh command",d={},m=[{value:"view",id:"view",level:2},{value:"edit",id:"edit",level:2},{value:"editor",id:"editor",level:2},{value:"getmeta",id:"getmeta",level:2},{value:"setmeta",id:"setmeta",level:2},{value:"ai",id:"ai",level:2},{value:"editconfig",id:"editconfig",level:2},{value:"setbg",id:"setbg",level:2},{value:"badge",id:"badge",level:2},{value:"run",id:"run",level:2},{value:"deleteblock",id:"deleteblock",level:2},{value:"ssh",id:"ssh",level:2},{value:"wsl",id:"wsl",level:2},{value:"web",id:"web",level:2},{value:"notify",id:"notify",level:2},{value:"conn",id:"conn",level:2},{value:"status",id:"status",level:3},{value:"reinstall",id:"reinstall",level:3},{value:"disconnect",id:"disconnect",level:3},{value:"connect",id:"connect",level:3},{value:"ensure",id:"ensure",level:3},{value:"setconfig",id:"setconfig",level:2},{value:"file",id:"file",level:2},{value:"cat",id:"cat",level:3},{value:"write",id:"write",level:3},{value:"append",id:"append",level:3},{value:"rm",id:"rm",level:3},{value:"info",id:"info",level:3},{value:"cp",id:"cp",level:3},{value:"mv",id:"mv",level:3},{value:"ls",id:"ls",level:3},{value:"launch",id:"launch",level:2},{value:"getvar/setvar",id:"getvarsetvar",level:2},{value:"setvar",id:"setvar",level:3},{value:"getvar",id:"getvar",level:3},{value:"termscrollback",id:"termscrollback",level:2},{value:"wavepath",id:"wavepath",level:2},{value:"blocks",id:"blocks",level:2},{value:"list",id:"list",level:3},{value:"secret",id:"secret",level:2},{value:"get",id:"get",level:3},{value:"set",id:"set",level:3},{value:"list",id:"list-1",level:3},{value:"delete",id:"delete",level:3},{value:"ui",id:"ui",level:3}];function j(e){const s={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",p:"p",pre:"pre",span:"span",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(t.V9,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"wsh-command",children:"wsh command"})}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"wsh"})," command is always available from Wave blocks. It is a powerful tool for interacting with Wave blocks and can bridge data between your CLI and the widget GUIs."]}),(0,i.jsxs)(s.p,{children:["This is the detailed wsh reference documention. For an overview of ",(0,i.jsx)(s.code,{children:"wsh"})," functionality, please see our ",(0,i.jsx)(s.a,{href:"/wsh",children:"wsh command docs"}),"."]}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"view",children:"view"}),(0,i.jsx)(s.p,{children:"You can open a preview block with the contents of any file or directory by running:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh view [path]\nwsh view -m [path] ",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# opens in magnified block"}),"\n"]})}),(0,i.jsx)(s.p,{children:"You can use this command to easily preview images, markdown files, and directories. For code/text files this will open\na codeedit block which you can use to quickly edit the file using Wave's embedded graphical editor."}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"edit",children:"edit"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh edit [path]\nwsh edit -m [path] ",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# opens in magnified block"}),"\n"]})}),(0,i.jsx)(s.p,{children:"This will open up a codeedit block for the specified file. This is useful for quickly editing files on a local or remote machine in Wave's graphical editor. This command returns immediately after opening the block."}),(0,i.jsxs)(s.p,{children:["For ",(0,i.jsx)(s.code,{children:"$EDITOR"})," integration (e.g. with ",(0,i.jsx)(s.code,{children:"git commit"}),"), see ",(0,i.jsx)(s.a,{href:"#editor",children:(0,i.jsx)(s.code,{children:"wsh editor"})})," which blocks until the editor is closed."]}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"editor",children:"editor"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh editor [path]\nwsh editor -m [path] ",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# opens in magnified block"}),"\n"]})}),(0,i.jsxs)(s.p,{children:["This opens a codeedit block for the specified file and ",(0,i.jsx)(s.strong,{children:"blocks until the editor is closed"}),". This is useful for setting your ",(0,i.jsx)(s.code,{children:"$EDITOR"})," environment variable so that CLI tools (e.g. ",(0,i.jsx)(s.code,{children:"git commit"}),", ",(0,i.jsx)(s.code,{children:"crontab -e"}),") open files in Wave's graphical editor:"]}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-built_in",children:"export"})," EDITOR=",(0,i.jsx)(s.span,{className:"hljs-string",children:'"wsh editor"'}),"\n"]})}),(0,i.jsxs)(s.p,{children:["The file must already exist. Use ",(0,i.jsx)(s.code,{children:"-m"})," to open the editor in magnified mode."]}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"getmeta",children:"getmeta"}),(0,i.jsx)(s.p,{children:"You can view the metadata of any block or tab by running:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# get the metadata for the current terminal block"}),"\nwsh getmeta\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# get the metadata for block num 2 (see block numbers by holidng down Ctrl+Shift)"}),"\nwsh getmeta -b 2\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:'# get the metadata for a blockid (get block ids by right clicking any block header "Copy Block Id")'}),"\nwsh getmeta -b [blockid]\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# get the metadata for a tab"}),"\nwsh getmeta -b tab\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# dump a single metadata key"}),"\nwsh getmeta [-b [blockid]] [key]\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# dump a set of keys with a certain prefix"}),"\nwsh getmeta -b tab ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"bg:*"'}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# dump a set of keys with prefix (and include the 'clear' key)"}),"\nwsh getmeta -b tab --clear-prefix ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"bg:*"'}),"\n"]})}),(0,i.jsx)(s.p,{children:"This is especially useful for preview and web blocks as you can see the file or url that they are pointing to and use that in your CLI scripts."}),(0,i.jsx)(s.p,{children:"blockid format:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"this"})," -- the current block (this is also the default)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"tab"})," -- the id of the current tab"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"d6ff4966-231a-4074-b78a-20acc7226b41"})," -- a full blockid is a UUID"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"a67f55a3"})," -- blockids may be truncated to the first 8 characters"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"5"})," -- if a number less than 100 is given, it is a block number. blocks are numbered sequentially in the current tab from the top-left to bottom-right. holding ",(0,i.jsx)(c.u,{k:"Ctrl:Shift"})," will show a block number overlay."]}),"\n"]}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"setmeta",children:"setmeta"}),(0,i.jsxs)(s.p,{children:["You can update any metadata key value pair for blocks (and tabs) by using the setmeta command. The setmeta command takes the same ",(0,i.jsx)(s.code,{children:"-b"})," arguments as getmeta."]}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh setmeta -b [blockid] [key]=[value]\nwsh setmeta -b [blockid] file=~/myfile.txt\nwsh setmeta -b [blockid] url=https://waveterm.dev/\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# set the metadata for the current tab using the given json file"}),"\nwsh setmeta -b tab --json [jsonfile]\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# set the metadata for the current tab using a json file read from stdin"}),"\nwsh setmeta -b tab --json\n"]})}),(0,i.jsxs)(s.p,{children:['You can get block and tab ids by right clicking on the appropriate block and selecting "Copy BlockId" (or use the block number via Ctrl',":Shift","). When you\nupdate the metadata for a preview or web block you'll see the changes reflected instantly in the block."]}),(0,i.jsx)(s.p,{children:"Other useful metadata values to override block titles, icons, colors, themes, etc."}),(0,i.jsx)(s.p,{children:"Here's a complex command that will copy the background (bg:* keys) from one tab to the current tab:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh getmeta -b [other-tab-id] ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"bg:*"'})," --clear-prefix | wsh setmeta -b tab --json -\n"]})}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"ai",children:"ai"}),(0,i.jsx)(s.p,{children:"Append content to the Wave AI sidebar. Files are attached as proper file attachments (supporting images, PDFs, and text), not encoded as text. By default, content is added to the sidebar without auto-submitting, allowing you to review and add more context before sending to the AI."}),(0,i.jsxs)(s.p,{children:["You can attach multiple files at once (up to 15 files). Use ",(0,i.jsx)(s.code,{children:"-m"})," to add a message along with files, ",(0,i.jsx)(s.code,{children:"-s"})," to auto-submit immediately, and ",(0,i.jsx)(s.code,{children:"-n"}),' to start a new chat conversation. Use "-" to read from stdin.']}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Pipe command output to AI (ask question in UI)"}),"\ngit diff | wsh ai -\ndocker logs mycontainer | wsh ai -\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Attach files without auto-submit (review in UI first)"}),"\nwsh ai main.go utils.go\nwsh ai screenshot.png logs.txt\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Attach files with message"}),"\nwsh ai app.py -m ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"find potential bugs"'}),"\nwsh ai *.",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"log"})," -m ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"analyze these error logs"'}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Auto-submit immediately"}),"\nwsh ai config.json -s -m ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"explain this configuration"'}),"\n",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"tail"})," -n 50 app.log | wsh ai -s - -m ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"what\'s causing these errors?"'}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Start new chat and attach files"}),"\nwsh ai -n report.pdf data.csv -m ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"summarize these reports"'}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Attach different file types (images, PDFs, code)"}
1),"\nwsh ai architecture.png api-spec.pdf server.go -m ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"review the system design"'}),"\n"]})}),(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"File Size Limits:"})}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Text files: 200KB maximum"}),"\n",(0,i.jsx)(s.li,{children:"PDF files: 5MB maximum"}),"\n",(0,i.jsx)(s.li,{children:"Image files: 7MB maximum (accounts for base64 encoding overhead)"}),"\n",(0,i.jsx)(s.li,{children:"Maximum 15 files per command"}),"\n"]}),(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Flags:"})}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-m, --message <text>"})," - Add message text along with files"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-s, --submit"})," - Auto-submit immediately (default waits for user)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-n, --new"})," - Clear current chat and start fresh conversation"]}),"\n"]}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"editconfig",children:"editconfig"}),(0,i.jsx)(s.p,{children:"You can easily open up any of Wave's config files using this command."}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh editconfig [config-file-name]\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# opens the default settings.json file"}),"\nwsh editconfig\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# opens presets.json"}),"\nwsh editconfig presets.json\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# opens widgets.json"}),"\nwsh editconfig widgets.json\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# opens ai presets"}),"\nwsh editconfig presets/ai.json\n"]})}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"setbg",children:"setbg"}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"setbg"})," command allows you to set a background image or color for the current tab with various customization options."]}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh setbg [--opacity value] [--tile|--center] [--size value] [--border-color color] [--active-border-color color] (image-path|",(0,i.jsx)(s.span,{className:"hljs-string",children:'"#color"'}),"|color-name)\n"]})}),(0,i.jsx)(s.p,{children:"You can set a background using:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"An image file (displayed as cover, tiled, or centered)"}),"\n",(0,i.jsx)(s.li,{children:'A hex color (must be quoted like "#ff0000")'}),"\n",(0,i.jsx)(s.li,{children:'A CSS color name (like "blue" or "forestgreen")'}),"\n"]}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--opacity value"})," - set the background opacity (0.0-1.0, default 0.5)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--tile"})," - tile the background image instead of using cover mode"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--center"})," - center the image without scaling (good for logos)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--size"})," - size for centered images (px, %, or auto)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--clear"})," - remove the background"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--border-color color"})," - set the block frame border color (hex or CSS color name)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--active-border-color color"})," - set the block frame focused border color (hex or CSS color name)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--print"})," - show the metadata without applying it"]}),"\n"]}),(0,i.jsx)(s.p,{children:"Supported image formats: JPEG, PNG, GIF, WebP, and SVG."}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set an image background with default settings"}),"\nwsh setbg ~/pictures/background.jpg\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set a background with custom opacity"}),"\nwsh setbg --opacity 0.3 ~/pictures/light-pattern.png\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set a tiled background"}),"\nwsh setbg --tile --opacity 0.2 ~/pictures/texture.png\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Center an image (good for logos)"}),"\nwsh setbg --center ~/pictures/logo.png\nwsh setbg --center --size 200px ~/pictures/logo.png\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set color backgrounds"}),"\nwsh setbg ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"#ff0000"'})," ",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# hex color (requires quotes)"}),"\nwsh setbg forestgreen ",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# CSS color name"}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Change just the opacity of current background"}),"\nwsh setbg --opacity 0.7\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set border colors alongside a background"}),"\nwsh setbg --border-color ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"#ff0000"'})," --active-border-color ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"#00ff00"'})," ~/pictures/background.jpg\nwsh setbg --border-color steelblue forestgreen\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Remove background"}),"\nwsh setbg --clear\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Preview the metadata"}),"\nwsh setbg --",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"print"})," ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"#ff0000"'}),"\n"]})}),(0,i.jsx)(s.p,{children:"The command validates that:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Color values are valid hex codes or CSS color names"}),"\n",(0,i.jsx)(s.li,{children:"Image paths point to accessible, supported image files"}),"\n",(0,i.jsx)(s.li,{children:"The opacity value is between 0.0 and 1.0"}),"\n",(0,i.jsx)(s.li,{children:"The center and tile options are not used together"}),"\n"]}),(0,i.jsx)(s.admonition,{type:"tip",children:(0,i.jsxs)(s.p,{children:["Use ",(0,i.jsx)(s.code,{children:"--print"})," to preview the metadata for any background configuration without applying it. You can then copy this JSON representation to use as a ",(0,i.jsx)(s.a,{href:"/tab-backgrounds",children:"Backgroun
1d entry"})]})}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"badge",children:"badge"}),(0,i.jsx)(r.k,{version:"v0.14.2"}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"badge"})," command sets or clears a visual badge indicator on a block or tab header."]}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh badge [icon]\nwsh badge --clear\n"})}),(0,i.jsxs)(s.p,{children:["Badges are used to draw attention to a block or tab, such as indicating a process has completed or needs attention. If no icon is provided, it defaults to ",(0,i.jsx)(s.code,{children:"circle-small"}),". Icon names are ",(0,i.jsx)(s.a,{href:"https://fontawesome.com/icons",children:"Font Awesome"})," icon names (without the ",(0,i.jsx)(s.code,{children:"fa-"})," prefix)."]}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--color string"})," - set the badge color (CSS color name or hex)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--priority float"})," - set the badge priority (default 10; higher priority badges take precedence)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--clear"})," - remove the badge from the block or tab"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--beep"})," - play the system bell sound when setting the badge"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--pid int"})," - watch a PID and automatically clear the badge when it exits (sets default priority to 5)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-b, --block"})," - target a specific block or tab (same format as ",(0,i.jsx)(s.code,{children:"getmeta"}),")"]}),"\n"]}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set a default badge on the current block"}),"\nwsh badge\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set a badge with a custom icon and color"}),"\nwsh badge circle-check --color green\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set a high-priority badge on a specific block"}),"\nwsh badge triangle-exclamation --color red --priority 20 -b 2\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set a badge that clears when a process exits"}),"\nwsh badge --pid 12345\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Play the bell and set a badge when done"}),"\nwsh badge circle-check --beep\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Clear the badge on the current block"}),"\nwsh badge --clear\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Clear the badge on a specific tab"}),"\nwsh badge --clear -b tab\n"]})}),(0,i.jsx)(s.admonition,{type:"note",children:(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"--pid"})," flag is not supported on Windows."]})}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"run",children:"run"}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"run"})," command creates a new terminal command block and executes a specified command within it. The command can be provided either as arguments after ",(0,i.jsx)(s.code,{children:"--"})," or using the ",(0,i.jsx)(s.code,{children:"-c"})," flag. Unless the ",(0,i.jsx)(s.code,{children:"-x"})," or ",(0,i.jsx)(s.code,{children:"-X"})," flags are passed, commands can be re-executed by pressing ",(0,i.jsx)(s.code,{children:"Enter"})," once the command has finished running."]}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Run a command specified after --"}),"\nwsh run -- ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"ls"})," -la\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Run a command using -c flag"}),"\nwsh run -c ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"ls -la"'}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Run with working directory specified"}),"\nwsh run --cwd /path/to/dir -- ./script.sh\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Run in magnified mode"}),"\nwsh run -m -- make build\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Run and auto-close on successful completion"}),"\nwsh run -x -- npm ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"test"}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Run and auto-close regardless of exit status"}),"\nwsh run -X -- ./long-running-task.sh\n"]})}),(0,i.jsx)(s.p,{children:"The command inherits the current environment variables and working directory by default."}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-m, --magnified"})," - open the block in magnified mode"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-c, --command string"})," - run a command string in ",(0,i.jsx)(s.em,{children:"shell"})]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-x, --exit"})," - close block if command exits successfully (stays open if there was an error)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-X, --forceexit"})," - close block when command exits, regardless of exit status"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--delay int"})," - if using -x/-X, delay in milliseconds before closing block (default 2000)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-p, --paused"})," - create block in paused state"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-a, --append"})," - append output on command restart instead of clearing"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--cwd string"})," - set working directory for command"]}),"\n"]}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Run a build command in magnified mode"}),"\nwsh run -m -- npm run build\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Execute a script and auto-close after success"}),"\nwsh run -x -- ./backup-script.sh\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Run a command in a specific directory"}),"\nwsh run --cwd ./project -- make ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"test"}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Run a shell command and force close after completion"}),"\nwsh run -X -c ",(0,i.jsx)(s.span,{className:"hljs-string",children:"\"find . -name '*.log' -delete\""}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Start a command in paused state"}),"\nwsh run -p -- ./server --dev\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Run with custom close delay"}),"\nwsh run -x --delay 5000 -- ./deployment.sh\n"]})}),(0,i.jsxs)(s.p,{children:["When using the ",(0,i.jsx)(s.code,{children:"-x"})," or ",(0,i.jsx)(s.code,{children:"-X"})," flags, the block will automatically close after the command completes. The ",(0,i.jsx)(s.code,{children:"-x"})," flag only closes on successful completion (exit code 0), while ",(0,i.jsx)(s.code,{children:"-X"})," closes regardless of exit status. The ",(0,i.jsx)(s.code,{children:"--delay"})," flag controls how long to wait before closing (default 2000ms)."]}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"-p"})," flag creates the block in a paused state, allowing you to review the command before execution."]}),(0,i.jsx)(s.admonition,{type:"tip",children:(0,i.jsxs)(s.p,{children:["You can use either ",(0,i.jsx)(s.code,{children:"--"})," followed by your command and arguments, or the ",(0,i.jsx)(s.code,{children:"-c"})," flag with a quoted command string. The ",(0,i.jsx)(s.code,{children:"--"})," method is preferred when you want to preserve argument handling, while ",(0,i.jsx)(s.code,{children:"-c"})," is useful for shell commands with pipes or redirections."]})}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"deleteblock",children:"deleteblock"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh deleteblock -b [blockid]\n"})}),(0,i.jsx)(s.p,{children:"This will delete the block with the specified id."}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"ssh",children:"ssh"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh ssh [user@host]\n"})}),(0,i.jsxs)(s.p,{children:["This will use Wave's internal ssh implementation to connect to the specified remote machine. The ",(0,i.jsx)(s.code,{children:"-i"})," flag can be used to specify a path to an identity file."]}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"wsl",children:"wsl"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh wsl [-d <distribution-name>]\n"})}),(0,i.jsx)(s.p,{children:"This will connect to a WSL distribution on the local machine. It will use the default if no distribution is provided."}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"web",children:"web"}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"web"})," command opens URLs in a web block within Wave Terminal."]}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh web open [url] [-m] [-r blockid]\n"})}),(0,i.jsx)(s.p,{children:"You can open a specific URL or perform a search using the configured search engine."}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-m, --magnified"})," - open the web block in magnified mode"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-r, --replace <blockid>"})," - replace an existing block instead of creating a new one"]}),"\n"]}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Open a URL"}),"\nwsh web open https://waveterm.dev\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Search with the configured search engine"}),"\nwsh web open ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"wave terminal documentation"'}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Open in magnified mode"}),"\nwsh web open -m https://github.com\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Replace an existing block"}),"\nwsh web open -r 2 https://example.com\n"]})}),(0,i.jsxs)(s.p,{children:["The command will open a new web block with the desired page, or replace an existing block if the ",(0,i.jsx)(s.code,{children:"-r"})," flag is used. Note that ",(0,i.jsx)(s.code,{children:"--replace"})," and ",(0,i.jsx)(s.code,{children:"--magnified"})," cannot be used together."]}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"notify",children:"notify"}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"notify"})," command creates a desktop notification from Wave Terminal."]}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh notify [message] [-t title] [-s]\n"})}),(0,i.jsx)(s.p,{children:"This allows you to trigger desktop notifications from scripts or commands. The notification will appear using your system's native notification system. It works on remote machines as well as your local machine."}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-t, --title string"}),' - set the notification title (default "Wsh Notify")']}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-s, --silent"})," - disable the notification sound"]}),"\n"]}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Basic notification"}),"\nwsh notify ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"Build completed successfully"'}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Notification with custom title"}),"\nwsh notify -t ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"Deployment Status"'})," ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"Production deployment finished"'}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Silent notification"}),"\nwsh notify -s ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"Backgroun
1d task completed"'}),"\n"]})}),(0,i.jsx)(s.p,{children:"This is particularly useful for long-running commands where you want to be notified of completion or status changes."}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"conn",children:"conn"}),(0,i.jsx)(s.p,{children:"This has several subcommands which all perform various features related to connections."}),(0,i.jsx)(s.h3,{id:"status",children:"status"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh conn status\n"})}),(0,i.jsx)(s.p,{children:"This command gives the status of all connections made since waveterm started."}),(0,i.jsx)(s.h3,{id:"reinstall",children:"reinstall"}),(0,i.jsx)(s.p,{children:"For ssh connections,"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh conn reinstall [user@host]\n"})}),(0,i.jsx)(s.p,{children:"For wsl connections,"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh conn reinstall [wsl://<distribution-name>]\n"})}),(0,i.jsx)(s.p,{children:"This command reinstalls the Wave Shell Extensions on the specified connection."}),(0,i.jsx)(s.h3,{id:"disconnect",children:"disconnect"}),(0,i.jsx)(s.p,{children:"For ssh connections,"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh conn disconnect [user@host]\n"})}),(0,i.jsx)(s.p,{children:"For wsl connections,"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh conn disconnect [wsl://<distribution name>]\n"})}),(0,i.jsx)(s.p,{children:"This command completely disconnects the specified connection. This will apply to all blocks where the connection is being used"}),(0,i.jsx)(s.h3,{id:"connect",children:"connect"}),(0,i.jsx)(s.p,{children:"For ssh connections,"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh conn connect [user@host]\n"})}),(0,i.jsx)(s.p,{children:"For wsl connections,"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh conn connect [wsl://<distribution-name>]\n"})}),(0,i.jsx)(s.p,{children:"This command connects to the specified connection but does not create a block for it."}),(0,i.jsx)(s.h3,{id:"ensure",children:"ensure"}),(0,i.jsx)(s.p,{children:"For ssh connections,"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh conn ensure [user@host]\n"})}),(0,i.jsx)(s.p,{children:"For wsl connections,"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh conn ensure [wsl://<distribution-name>]\n"})}),(0,i.jsx)(s.p,{children:"This command connects to the specified connection if it isn't already connected."}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"setconfig",children:"setconfig"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh setconfig [<config-name>=<config-value>]\n"})}),(0,i.jsxs)(s.p,{children:["This allows setting various options in the ",(0,i.jsx)(s.code,{children:"config/settings.json"})," file. It will check to be sure a valid config option was provided."]}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"file",children:"file"}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"file"})," command provides a set of subcommands for managing files across different storage systems, such as ",(0,i.jsx)(s.code,{children:"wsh"})," remote servers."]}),(0,i.jsxs)(s.admonition,{type:"note",children:[(0,i.jsx)(s.p,{children:"Wave Terminal is capable of managing files from remote SSH hosts. Files are addressed via URIs, which\nvary depending on the storage system. If no scheme is specified, the file will be treated as a local connection."}),(0,i.jsxs)(s.p,{children:["URI format: ",(0,i.jsx)(s.code,{children:"[profile]:[uri-scheme]://[connection]/[path]"})]}),(0,i.jsx)(s.p,{children:"Supported URI schemes:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"wsh"})," - Used to access files on remote hosts over SSH via the WSH helper. Allows for file streaming to Wave and other remotes."]}),"\n",(0,i.jsx)(s.p,{children:'Profiles are optional for WSH URIs, provided that you have configured the remote host in your "connections.json" or "~/.ssh/config" file.'}),"\n",(0,i.jsx)(s.p,{children:'If a profile is provided, it must be defined in "profiles.json" in the Wave configuration directory.'}),"\n",(0,i.jsxs)(s.p,{children:["Format: ",(0,i.jsx)(s.code,{children:"wsh://[remote]/[path]"})]}),"\n",(0,i.jsxs)(s.p,{children:["Shorthands can be used for the current remote and your local computer:\n",(0,i.jsx)(s.code,{children:"[path]"})," a relative or absolute path on the current remote\n",(0,i.jsx)(s.code,{children:"//[remote]/[path]"})," a path on a remote\n",(0,i.jsx)(s.code,{children:"/~/[path]"})," a path relative to the home directory on your local computer"]}),"\n"]}),"\n"]})]}),(0,i.jsx)(s.h3,{id:"cat",children:"cat"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"cat"}
1)," [file-uri]\n"]})}),(0,i.jsx)(s.p,{children:"Display the contents of a file (maximum file size 10MB). For example:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"cat"})," wsh://user@ec2/home/user/config.txt\nwsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"cat"})," ./local-config.txt\n"]})}),(0,i.jsx)(s.h3,{id:"write",children:"write"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh file write [file-uri]\n"})}),(0,i.jsx)(s.p,{children:"Write data from stdin to a file. The maximum file size is 10MB. For example:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-built_in",children:"echo"})," ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"hello"'})," | wsh file write ./greeting.txt\n",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"cat"})," config.json | wsh file write //ec2-user@remote01/~/config.json\n"]})}),(0,i.jsx)(s.h3,{id:"append",children:"append"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh file append [file-uri]\n"})}),(0,i.jsx)(s.p,{children:"Append data from stdin to a file. Input is buffered locally (up to 10MB total file size limit) before being written. For example:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-built_in",children:"cat"})," additional-content.txt | wsh file append ./notes.txt\n",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"echo"})," ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"new line"'})," | wsh file append //user@remote/~/notes.txt\n"]}
1)}),(0,i.jsx)(s.h3,{id:"rm",children:"rm"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"rm"})," [flag] [file-uri]\n"]})}),(0,i.jsx)(s.p,{children:"Remove a file. For example:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"rm"})," wsh://user@ec2/home/user/config.txt\nwsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"rm"})," ./local-config.txt\n"]})}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-r, --recursive"})," - recursively deletes directory entries"]}),"\n"]}),(0,i.jsx)(s.h3,{id:"info",children:"info"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh file info [file-uri]\n"})}),(0,i.jsx)(s.p,{children:"Display information about a file including size, creation time, modification time, and metadata. For example:"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh file info wsh://user@ec2/home/user/config.txt\nwsh file info ./local-config.txt\n"})}),(0,i.jsx)(s.h3,{id:"cp",children:"cp"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"cp"})," [flags] [source-uri] [destination-uri]\n"]})}),(0,i.jsx)(s.p,{children:"Copy files between different storage systems (maximum file size 10MB). For example:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Copy a remote file to your local filesystem"}),"\nwsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"cp"})," wsh://user@ec2/home/user/config.txt ./local-config.txt\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Copy a local file to a remote system"}),"\nwsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"cp"})," ./local-config.txt wsh://user@ec2/home/user/config.txt\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Copy between remote systems"}),"\nwsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"cp"})," wsh://user@ec2/home/user/config.txt wsh://user@server2/home/user/backup.txt\n"]})}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-f, --force"})," - overwrites any conflicts when copying"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-m, --merge"})," - does not clear existing directory entries when copying a directory, instead merging its contents with the destination's"]}),"\n"]}),(0,i.jsx)(s.h3,{id:"mv",children:"mv"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"mv"})," [flags] [source-uri] [destination-uri]\n"]})}),(0,i.jsx)(s.p,{children:"Move files between different storage systems (maximum file size 10MB). The source file will be deleted once the operation completes successfully. For example:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Move a remote file to your local filesystem"}),"\nwsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"mv"})," wsh://user@ec2/home/user/config.txt ./local-config.txt\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Move a local file to a remote system"}),"\nwsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"mv"})," ./local-config.txt wsh://user@ec2/home/user/config.txt\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Move between remote systems"}),"\nwsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"mv"})," wsh://user@ec2/home/user/config.txt wsh://user@server2/home/user/backup.txt\n"]})}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-f, --force"})," - overwrites any conflicts when moving"]}),"\n"]}),(0,i.jsx)(s.h3,{id:"ls",children:"ls"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"ls"})," [flags] [file-uri]\n"]})}),(0,i.jsx)(s.p,{children:"List files in a directory. By default, lists files in the current directory for the current terminal session."}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"ls"})," wsh://user@ec2/home/user/\nwsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"ls"})," ./local-dir/\n"]})}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-l, --long"})," - use long listing format showing size, timestamps, and metadata"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-1, --one"})," - list one file per line"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-f, --files"})," - list only files (no directories)"]}),"\n"]}),(0,i.jsx)(s.p,{children:"When output is piped to another command, automatically switches to one-file-per-line format:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Easy to process with grep, awk, etc."}),"\nwsh file ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"ls"})," ./ | grep ",(0,i.jsx)(s.span,{className:"hljs-string",children:'".json$"'}),"\n"]})}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"launch",children:"launch"}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"wsh launch"})," command allows you to open pre-configured widgets directly from your terminal."]}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh launch [flags] widget-id\n"})}),(0,i.jsx)(s.p,{children:"The command will search for the specified widget ID in both user-defined widgets and default widgets, then create a new block using the widget's configuration."}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-m, --magnify"})," - open the widget in magnified mode, overriding the widget's default magnification setting"]}),"\n"]}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Launch a widget with its default settings"}),"\nwsh launch my-custom-widget\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Launch a widget in magnified mode"}),"\nwsh launch -m system-monitor\n"]})}),(0,i.jsxs)(s.p,{children:["The widget's configuration determines the initial block settings, including the view type, metadata, and default magnification state. The ",(0,i.jsx)(s.code,{children:"-m"})," flag can be used to override the widget's default magnification setting."]}),(0,i.jsx)(s.admonition,{type:"tip",children:(0,i.jsxs)(s.p,{children:["Widget configurations can be customized in your ",(0,i.jsx)(s.code,{children:"widgets.json"})," configuration file, which you can edit using ",(0,i.jsx)(s.code,{children:"wsh editconfig widgets.json"})]})}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"getvarsetvar",children:"getvar/setvar"}),(0,i.jsx)(s.p,{children:"Wave Terminal provides commands for managing persistent variables at different scopes (block, tab, workspace, or client-wide)."}),(0,i.jsx)(s.h3,{id:"setvar",children:"setvar"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh setvar [flags] KEY=VALUE...\n"})}),(0,i.jsxs)(s.p,{children:["Set one or more variables. By default, variables are set at the client (global) level. Use ",(0,i.jsx)(s.code,{children:"-l"})," for block-local variables."]}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set a single variable"}),"\nwsh setvar API_KEY=abc123\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set multiple variables at once"}),"\nwsh setvar HOST=localhost PORT=8080 DEBUG=",(0,i.jsx)(s.span,{className:"hljs-literal",children:"true"}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set a block-local variable"}),"\nwsh setvar -l BLOCK_SPECIFIC=value\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Remove variables"}),"\nwsh setvar -r API_KEY PORT\n"]})}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-l, --local"})," - set variables local to the current block"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-r, --remove"})," - remove the specified variables instead of setting them"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--varfile string"}),' - use a different variable file (default "var")']}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-b [blockid]"})," - used to set a specific zone (block, tab, workspace, client, or UUID)"]}),"\n"]}),(0,i.jsx)(s.h3,{id:"getvar",children:"getvar"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh getvar [flags] [key]\n"})}),(0,i.jsx)(s.p,{children:"Get the value of a variable. Returns exit code 0 if the variable exists, 1 if it doesn't. This allows for shell scripting like:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Check if a variable exists"}),"\n",(0,i.jsx)(s.span,{className:"hljs-keyword",children:"if"})," wsh getvar API_KEY >/dev/null; ",(0,i.jsx)(s.span,{className:"hljs-keyword",children:"then"}),"\n ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"echo"})," ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"API key is set"'}),"\n",(0,i.jsx)(s.span,{className:"hljs-keyword",children:"fi"}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Use a variable in a command"}),"\ncurl -H ",(0,i.jsxs)(s.span,{className:"hljs-string",children:['"Authorization: ',(0,i.jsx)(s.span,{className:"hljs-subst",children:"$(wsh getvar API_KEY)"}),'"']})," https://api.example.com\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get a block-local variable"}),"\nwsh getvar -l BLOCK_SPECIFIC\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# List all variables"}),"\nwsh getvar --all\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# List all variables with null terminators (for scripting)"}),"\nwsh getvar --all -0\n"]})}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-l, --local"})," - get variables local to the current block"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--all"})," - list all variables"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-0, --null"})," - use null terminators in output instead of newlines"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--varfile string"}),' - use a different variable file (default "var")']}),"\n"]}),(0,i.jsxs)(s.p,{children:["Variables can be accessed at different scopes using the ",(0,i.jsx)(s.code,{children:"-b"})," flag:"]}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get/set at block level"}),"\nwsh getvar -b block MYVAR\nwsh setvar -b block MYVAR=value\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get/set at tab level"}),"\nwsh getvar -b tab MYVAR\nwsh setvar -b tab MYVAR=value\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get/set at workspace level"}),"\nwsh getvar -b workspace MYVAR\nwsh setvar -b workspace MYVAR=value\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get/set at client (global) level"}),"\nwsh getvar -b client MYVAR\nwsh setvar -b client MYVAR=value\n"]}
1)}),(0,i.jsx)(s.p,{children:"Variables set with these commands persist across sessions and can be used to store configuration values, secrets, or any other string data that needs to be accessible across blocks or tabs."}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"termscrollback",children:"termscrollback"}),(0,i.jsx)(s.p,{children:"Get the terminal scrollback from a terminal block. This is useful for capturing terminal output for processing or archiving."}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh termscrollback [-b blockid] [flags]\n"})}),(0,i.jsx)(s.p,{children:"By default, retrieves all lines from the current terminal block. You can specify line ranges or get only the output of the last command."}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-b, --block <blockid>"})," - specify target terminal block (default: current block)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--start <line>"})," - starting line number (0 = beginning, default: 0)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--end <line>"})," - ending line number (0 = all lines, default: 0)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--lastcommand"})," - get output of last command (requires shell integration)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-o, --output <file>"})," - write output to file instead of stdout"]}),"\n"]}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get all scrollback from current terminal"}),"\nwsh termscrollback\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get scrollback from a specific terminal block"}),"\nwsh termscrollback -b 2\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get only the last command's output"}),"\nwsh termscrollback --lastcommand\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get a specific line range (lines 100-200)"}),"\nwsh termscrollback --start 100 --end 200\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Save scrollback to a file"}),"\nwsh termscrollback -o terminal-log.txt\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Save last command output to a file"}),"\nwsh termscrollback --lastcommand -o last-output.txt\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Process last command output with grep"}),"\nwsh termscrollback --lastcommand | grep ",(0,i.jsx)(s.span,{className:"hljs-string",children:'"ERROR"'}),"\n"]})}),(0,i.jsx)(s.admonition,{type:"note",children:(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"--lastcommand"})," flag requires shell integration to be enabled. This feature allows you to capture just the output from the most recent command, which is particularly useful for scripting and automation."]})}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"wavepath",children:"wavepath"}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"wavepath"})," command lets you get the paths to various Wave Terminal directories and files, including configuration, data storage, and logs."]}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh wavepath {config|data|",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"log"}),"}\n"]})}),(0,i.jsx)(s.p,{children:"This command returns the full path to the requested Wave Terminal system directory or file. It's useful for accessing Wave's configuration files, data storage, or checking logs."}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-o, --open"})," - open the path in a new block"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-O, --open-external"})," - open the path in the default external application"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-t, --tail"})," - show the last ~100 lines of the log file (only valid for log path)"]}),"\n"]}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get path to config directory"}),"\nwsh wavepath config\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get path to data directory"}),"\nwsh wavepath data\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get path to log file"}),"\nwsh wavepath ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"log"}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Open log file in a new block"}),"\nwsh wavepath -o ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"log"}),"\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Open config directory in system file explorer"}),"\nwsh wavepath -O config\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# View recent log entries"}),"\nwsh wavepath -t ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"log"}),"\n"]})}),(0,i.jsx)(s.p,{children:"The command will show you the full path to:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"config"})," - Where Wave Terminal stores its configuration files"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"data"})," - Where Wave Terminal stores its persistent data"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"log"})," - The main Wave Terminal log file"]}),"\n"]}),(0,i.jsx)(s.admonition,{type:"tip",children:(0,i.jsxs)(s.p,{children:["Use the ",(0,i.jsx)(s.code,{children:"-t"})," flag with the log path to quickly view recent log entries without having to open the full file. This is particularly useful for troubleshooting."]})}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"blocks",children:"blocks"}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"blocks"})," command provides operations for listing and querying blocks across workspaces, windows, and tabs. Primarily useful for debugging and scripting."]}),(0,i.jsx)(s.h3,{id:"list",children:"list"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh blocks list [flags]\n"})}),(0,i.jsx)(s.p,{children:"List all blocks with optional filtering by workspace, window, tab, or view type. Output can be formatted as a table (default) or JSON for scripting."}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--workspace <id>"})," - restrict to specific workspace id"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--window <id>"})," - restrict to specific window id"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--tab <id>"})," - restrict to specific tab id"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--view <type>"})," - filter by view type (term, web, preview, edit, sysinfo, waveai)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--json"})," - output results as JSON"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--timeout <ms>"})," - RPC timeout in milliseconds (default: 5000)"]}),"\n"]}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# List all blocks"}),"\nwsh blocks list\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# List only terminal blocks"}),"\nwsh blocks list --view=term\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Filter by workspace"}),"\nwsh blocks list --workspace=12d0c067-378e-454c-872e-77a314248114\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Output as JSON for scripting"}),"\nwsh blocks list --json\n"]})}),(0,i.jsx)(s.hr,{}),(0,i.jsx)(s.h2,{id:"secret",children:"secret"}),(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"secret"})," command provides secure storage and management of sensitive information like API keys, passwords, and tokens. Secrets are stored using your system's native secure storage backend (Keychain on macOS, Secret Service on Linux, Credential Manager on Windows)."]}),(0,i.jsx)(s.p,{children:"Secret names must start with a letter and contain only letters, numbers, and underscores."}),(0,i.jsx)(s.h3,{id:"get",children:"get"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh secret get [name]\n"})}),(0,i.jsx)(s.p,{children:"Retrieve and display the value of a stored secret."}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Get an API key"}),"\nwsh secret get github_token\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Use in scripts"}),"\n",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"export"})," API_KEY=$(wsh secret get my_api_key)\n"]})}),(0,i.jsx)(s.h3,{id:"set",children:"set"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:["wsh secret ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"set"})," [name]=[value]\n"]})}),(0,i.jsx)(s.p,{children:"Store a secret value securely. This command requires an appropriate system secret manager to be available and will fail if only basic text storage is available."}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set an API token"}),"\nwsh secret ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"set"})," github_token=ghp_abc123xyz\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Set a database password"}),"\nwsh secret ",(0,i.jsx)(s.span,{className:"hljs-built_in",children:"set"})," db_password=mySecurePassword123\n"]})}),(0,i.jsx)(s.admonition,{type:"warning",children:(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"set"})," command requires a proper system secret manager (Keychain, Secret Service, or Credential Manager). It will not work with basic text storage for security reasons."]})}),(0,i.jsx)(s.h3,{id:"list-1",children:"list"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh secret list\n"})}),(0,i.jsx)(s.p,{children:"Display all stored secret names (values are not shown)."}),(0,i.jsx)(s.p,{children:"Example:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# List all secrets"}),"\nwsh secret list\n"]})}),(0,i.jsx)(s.h3,{id:"delete",children:"delete"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh secret delete [name]\n"})}),(0,i.jsx)(s.p,{children:"Remove a secret from secure storage."}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Delete an API key"}),"\nwsh secret delete github_token\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Delete multiple secrets"}),"\nwsh secret delete old_api_key\nwsh secret delete temp_token\n"]})}),(0,i.jsx)(s.h3,{id:"ui",children:"ui"}),(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"hljs language-sh",children:"wsh secret ui [-m]\n"})}),(0,i.jsx)(s.p,{children:"Open the secrets management interface in a new block. This provides a graphical interface for viewing and managing all your secrets."}),(0,i.jsx)(s.p,{children:"Flags:"}),(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"-m, --magnified"})," - open the secrets UI in magnified mode"]}),"\n"]}),(0,i.jsx)(s.p,{children:"Examples:"}),(0,i.jsx)(s.pre,{children:(0,i.jsxs)(s.code,{className:"hljs language-sh",children:[(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Open the secrets UI"}),"\nwsh secret ui\n\n",(0,i.jsx)(s.span,{className:"hljs-comment",children:"# Open the secrets UI in magnified mode"}),"\nwsh secret ui -m\n"]})}),(0,i.jsx)(s.p,{children:"The secrets UI provides a convenient visual way to browse, add, edit, and delete secrets without needing to use the command-line interface."}),(0,i.jsx)(s.admonition,{type:"tip",children:(0,i.jsxs)(s.p,{children:["Use secrets in your scripts to avoid hardcoding sensitive values. Secrets w
1ork across remote machines - store an API key locally with ",(0,i.jsx)(s.code,{children:"wsh secret set"}),", then access it from any SSH or WSL connection with ",(0,i.jsx)(s.code,{children:"wsh secret get"}),". The secret is securely retrieved from your local machine without needing to duplicate it on remote systems."]})})]})}function x(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(j,{...e})}):j(e)}},1341:(e,s,n)=>{n.d(s,{FX:()=>m,V9:()=>o,ZC:()=>x,rP:()=>t});var l=n(7773),i=n(6540),a=n(1750),c=n(4848);const t=(0,i.createContext)(void 0);const r=({children:e})=>{const[s,n]=(0,i.useState)(function(){const e=window.navigator.platform;return["Macintosh","MacIntel","MacPPC","Mac68K"].includes(e)||["iPhone","iPad","iPod"].includes(e)?"mac":["Win32","Win64","Windows","WinCE"].includes(e)?"windows":"linux"}()),l=(0,i.useCallback)(e=>{n(e),localStorage.setItem("platform",e)},[]);return(0,c.jsx)(t.Provider,{value:{platform:s,setPlatform:l},children:e})};function o({children:e}){return(0,c.jsx)(l.A,{fallback:(0,c.jsx)("div",{}),children:()=>(0,c.jsx)(r,{children:e})})}const h=()=>{const e=(0,i.useContext)(t);if(!e)throw new Error("usePlatform must be used within a PlatformProvider");return e};function d(){const{platform:e,setPlatform:s}=h();return(0,c.jsxs)("div",{className:"pill-toggle",children:[(0,c.jsx)("button",{className:(0,a.A)("pill-option",{active:"mac"===e}),onClick:()=>s("mac"),children:"macOS"}),(0,c.jsx)("button",{className:(0,a.A)("pill-option",{active:"linux"===e}),onClick:()=>s("linux"),children:"Linux"}),(0,c.jsx)("button",{className:(0,a.A)("pill-option",{active:"windows"===e}),onClick:()=>s("windows"),children:"Windows"})]})}function m(){return(0,c.jsx)(l.A,{fallback:(0,c.jsx)("div",{}),children:()=>(0,c.jsx)(d,{})})}const j=({children:e,platforms:s})=>{const n=h();return s.includes(n.platform)&&e},x=e=>(0,c.jsx)(l.A,{fallback:(0,c.jsx)("div",{}),children:()=>(0,c.jsx)(j,{...e})})},2726:(e,s,n)=>{n.d(s,{$:()=>a,k:()=>i});var l=n(4848);function i({version:e,noLeftMargin:s}){return(0,l.jsx)("span",{className:"version-badge"+(s?" no-left-margin":""),children:e})}function a(){return(0,l.jsx)("span",{className:"deprecated-badge",children:"deprecated"})}},3023:(e,s,n)=>{n.d(s,{R:()=>c,x:()=>t});
1var l=n(6540);const i={},a=l.createContext(i);function c(e){const s=l.useContext(a);return l.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),l.createElement(a.Provider,{value:s},e.children)}},7773:(e,s,n)=>{n.d(s,{A:()=>a});n(6540);var l=n(462),i=n(4848);function a({children:e,fallback:s}){return(0,l.A)()?(0,i.jsx)(i.Fragment,{children:e?.()}):s??null}},7982:(e,s,n)=>{n.d(s,{Y:()=>o,u:()=>r});var l=n(7773),i=n(6540),a=n(1341),c=n(4848);const t=({k:e,windows:s,mac:n,linux:l})=>{const{platform:t}=(0,i.useContext)(a.rP);let r=e;if("windows"===t&&s?r=s:"mac"===t&&n?r=n:"linux"===t&&l&&(r=l),"N/A"==r)return"N/A";const o=r.split(":").map((e,s)=>{const[n,l,i]=function(e,s){return"Arrows"==s?[(0,c.jsx)("span",{className:"spaced",children:"\u2191\u2192\u2193\u2190"}),"Arrow Keys",!0]:"ArrowUp"==s?["\u2191","Arrow Up",!0]:"ArrowRight"==s?["\u2192","Arrow Right",!0]:"ArrowDown"==s?["\u2193","Arrow Down",!0]:"ArrowLeft"==s?["\u2190","Arrow Left",!0]:"Cmd"==s?"mac"===e?["\u2318","Command",!0]:["Alt","Alt",!1]:"Ctrl"==s?"mac"===e?["\u2303","Control",!0]:["Ctrl","Control",!1]:"Shift"==s?["\u21e7","Shift",!0]:"Escape"==s?["Esc","Escape",!1]:[s.length>1?s:s.toUpperCase(),s,!1]}(t,e);return(0,c.jsx)("kbd",{title:l,"aria-label":l,className:i?"symbol":null,children:n},s)});return(0,c.jsx)("div",{className:"kbd-group",children:o})},r=({k:e,windows:s,mac:n,linux:i})=>(0,c.jsx)(l.A,{fallback:(0,c.jsx)("kbd",{children:e}),children:()=>(0,c.jsx)(t,{k:e,windows:s,mac:n,linux:i})}),o=({karr:e})=>{const s=[];for(let l=0;l<e.length;l++)l>0&&s.push((0,c.jsx)("span",{style:{padding:"0 2px"},children:"+"})),s.push((0,c.jsx)(r,{k:e[l]},l));const n=(0,c.jsx)("span",{style:{whiteSpace:"nowrap"},children:s});return(0,c.jsx)(l.A,{fallback:null,children:()=>n})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.