Skip to content

CLI quick start ​

List, search and select a synthetic saved session without reading installed settings or connecting to a server.

Install ​

sh
npm install --global @jalsoedesign/putty-cli

For project-local use, install without --global and prefix commands with npm exec --. See runtime requirements.

Save the fixture ​

Use the synthetic settings files: sessions.reg · kitty.reg · Sessions/Demo. Run from their parent working directory. The selected file is ./sessions.reg. Key paths are illustrative metadata and require no key file.

Get one property ​

sh
putty-js get Demo host --file ./sessions.reg --json

Exit code: 0.

Standard output:

json
"127.0.0.1"

List profiles ​

sh
putty-js list --file ./sessions.reg --json

Exit code: 0.

Standard output:

json
[
  {
    "path": "Demo",
    "host": "127.0.0.1",
    "protocol": "ssh",
    "keyFile": "C:\\keys\\example.ppk",
    "remoteDirectory": ""
  }
]

Continue by task ​

Use query commands for coloured search output and JSON, or writing commands for separate preview/apply operations. Contributor fixture runners live in local demos.