Skip to content

Repository files navigation

SSH Profiles icon

SSH Profiles

A Flow Launcher plugin to quickly find and open SSH profiles from ~/.ssh/config with Windows Terminal.

Flow Launcher TypeScript Node.js

Overview

SSH Profiles reads profiles from ~/.ssh/config, shows them directly in Flow Launcher, copies the selected SSH command by default, and can still open an SSH session in Windows Terminal on demand.

The plugin currently supports:

  • Reading Host blocks that define HostName.
  • Skipping Host * and profiles pointing to github.com or gitlab.com.
  • Searching by alias, HostName, or User.
  • Copying ssh <host-alias> to the clipboard when you select a profile.
  • Showing follow-up actions after profile selection: Copy to clipboard and Open in terminal.
  • Opening profiles with wt -p "<terminal profile>" -- ssh <host-alias> when you choose Open in terminal.
  • Opening the SSH config file in VS Code.

Requirements

Note

ssh edit uses the code CLI, so VS Code must be available in PATH if you want to open the config directly from Flow Launcher.

Install From Source

Clone or place the plugin folder inside Flow Launcher's plugins directory, for example:

cd "$env:APPDATA\FlowLauncher\Plugins"
git clone https://github.com/user/flow.launcher.plugin.ssh-profiles.git
cd flow.launcher.plugin.ssh-profiles
npm install
npm run build

Then reload or restart Flow Launcher. The plugin manifest is plugin.json, and the default action keyword is ssh.

SSH Config

The plugin reads data from ~/.ssh/config. Each profile should define Host and HostName:

Host production
  HostName 203.0.113.10
  User deploy
  Port 22
  IdentityFile ~/.ssh/id_ed25519

Tip

If a profile does not appear in Flow Launcher, check whether that block defines HostName.

Usage

Open Flow Launcher and type:

Command Description
ssh Show all valid SSH profiles
ssh <keyword> Search profiles by alias, host, or user
ssh profiles <keyword> Search profiles with the profiles prefix
ssh edit Open ~/.ssh/config in VS Code

Select a profile result to copy this command to the clipboard:

ssh <host-alias>

Flow Launcher then changes the query to ssh action <host-alias> and shows two choices:

Choice Description
Copy to clipboard Copy ssh <host-alias> again. This is the top/default follow-up choice.
Open in terminal Open Windows Terminal and run wt -p "<terminal profile>" -- ssh <host-alias>.

The plugin automatically chooses a terminal profile in this order: PowerShell 7, Command Prompt, the first Windows Terminal profile, then Windows PowerShell as the fallback.

Development

Common commands:

npm install
npm run build
npm test
npm run test:watch

Smoke-test the JSON-RPC entry after building:

node .\dist\main.js '{"method":"query","parameters":[""],"settings":{}}'

Smoke-test the follow-up action query after building:

node .\dist\main.js '{"method":"query","parameters":["action prod"],"settings":{}}'

Expected: stdout is valid JSON and the result array contains Copy to clipboard first and Open in terminal second.

Smoke-test profile selection only when replacing the current clipboard is acceptable:

node .\dist\main.js '{"method":"select_profile","parameters":["prod"],"settings":{}}'

Expected: stdout returns Flow.Launcher.ChangeQuery with ssh action prod, and the clipboard contains ssh prod.

Project Structure

plugin.json          # Flow Launcher manifest
src/main.ts          # JSON-RPC dispatcher and query handler
src/ssh-config.ts    # Reads, parses, and filters ~/.ssh/config
src/terminal.ts      # Opens Windows Terminal and VS Code
tests/               # Vitest test suite
Images/app.png       # Icon plugin

About

Flow Launcher plugin to quickly discover SSH hosts from ~/.ssh/config and open them in Windows Terminal.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages