/wttab

Programmatically open Windows Terminal tab or window

Primary LanguageJavaScriptMIT LicenseMIT

wttab - Programmatically open Windows Terminal tab or window

Install

npm install wttab

* Make sure you have Windows Terminal installed

Usage

The package is mostly in line with ttab so you can quickly use existing commands/scripts by putting a w in front of ttab.

$ wttab --help

Usage: wttab [options] [cmd...]

Opens a new terminal tab or window on Windows Terminal, from WSL or Windows.

Options:
  -w, --window [window-id]   Open new tab in new terminal window
                             (window-id only available with preview)
  -s, --settings <settings>  Assign a settings set (profile).
  -t, --title <title>        Specify title for new tab.
  -q                         Clear the new tab's screen.
  --preview                  Use the preview version of Windows Terminal (allows using a
                             existing terminal since v1.7.572.0)
  -p, --profile [terminal]   Choose a profile to launch
  --color <#hexcode>         set color of tab
  --debug                    Enable debugging, outputs the command executed
  -h, --help                 display help for command

Contributing

Always welcome, if you are planning on adding/changing code please open an issue first. See also https://github.com/microsoft/terminal many features are still being added, especially to wt.exe (Windows Terminal Cli).

Sources & Inspiration

Recent feature of executing commands in an existing Terminal Window microsoft/terminal/issues/4472

Commands taken from Official Windows Terminal docs

Inspiration taken from ttab (macOS/Linux)

Ttab has no plans to add support for other platforms