npm.io
3.0.2 • Published 1h agoCLI

transmit-2-ssh-config

Licence
MIT
Version
3.0.2
Deps
6
Size
20 kB
Vulns
0
Weekly
0
Stars
6

Transmit favorites to SSH config

Synchronize Transmit 5 SFTP favorites with your SSH config file.

asciicast

Install

npm install -g transmit-2-ssh-config

Usage

CLI
t2sc
Programmatic API
import getTransmitFavorites from 'transmit-2-ssh-config';

const favorites = await getTransmitFavorites();
// Returns array of SFTP favorites with: Id, Host, HostName, User, Port, Protocol, RemotePath

Notes

  • Asks for permission to control Transmit on first run
  • Host aliases include the favorite folder, e.g. client/production
  • Only SFTP favorites are synchronized
  • Creates ~/.ssh/config and ~/.ssh/config.d/ if they don't exist
  • Existing SSH config entries are preserved

Caveats

Folders are read from Transmit's internal favorites store (~/Library/Application Support/Transmit/Connections.transmitstore), which is not a public format. If it can't be read, favorites are synchronized without their folder name.

Tips

Enable SSH hostname completion by adding to .bash_profile:

[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh

Quick access to SSH hosts: Shuttle

License

MIT Nicolas Lemoine

Keywords