CLI output reference
These examples were captured from the actual built CLI using synthetic native settings. No remote connection was made. Paths are normalized for portability. Terminal examples preserve the executable's ANSI color choices; JSON examples are color-free. The complete input reference lists command help.
list (terminal)
openssh-js list --file <fixture-directory>\config --colorExit code: 0.
stdout
• Demo (Private key: <home-directory>\.ssh\id_ed25519)list (JSON)
openssh-js list --file <fixture-directory>\config --jsonExit code: 0.
stdout
[
{
"path": "Demo",
"host": "shell.example.invalid",
"protocol": "ssh",
"keyFile": "<home-directory>\\.ssh\\id_ed25519",
"remoteDirectory": ""
}
]list (table)
openssh-js list --file <fixture-directory>\config --table --colorExit code: 0.
stdout
┌──────┬───────────────────────┬──────────┬─────────────────────────────┬────────┐
│ Path │ Host │ Protocol │ Private key │ Remote │
├──────┼───────────────────────┼──────────┼─────────────────────────────┼────────┤
│ Demo │ shell.example.invalid │ ssh │ <home-directory>\.ssh\id_ed25519 │ │
└──────┴───────────────────────┴──────────┴─────────────────────────────┴────────┘search
openssh-js search example --file <fixture-directory>\config --colorExit code: 0.
stdout
Found 1 profile
┌──────────────────┬─────────────────────────────┐
│ Label │ Value │
├──────────────────┼─────────────────────────────┤
│ Name │ Demo │
│ Path │ Demo │
│ Protocol │ ssh │
│ Host │ shell.example.invalid │
│ Port │ 22 │
│ Username │ deploy │
│ Password │ │
│ Passphrase │ │
│ Credential state │ not-stored │
│ Authentication │ │
│ Private key │ <home-directory>\.ssh\id_ed25519 │
│ Remote │ │
└──────────────────┴─────────────────────────────┘get (JSON)
openssh-js get Demo --file <fixture-directory>\config --jsonExit code: 0.
stdout
{
"name": "Demo",
"path": "Demo",
"protocol": "ssh",
"host": "shell.example.invalid",
"port": 22,
"user": "deploy",
"password": "(hidden)",
"passphrase": "(hidden)",
"credentialState": "not-stored",
"credentials": [],
"authentication": "",
"keyFile": "<home-directory>\\.ssh\\id_ed25519",
"remoteDirectory": "",
"connections": [
{
"id": "connection",
"kind": "ssh",
"protocol": "ssh",
"endpoint": {
"host": "shell.example.invalid",
"port": 22,
"username": "deploy"
},
"authentication": [
{
"type": "private-key",
"path": {
"value": "<home-directory>\\.ssh\\id_ed25519",
"format": "native"
},
"format": "openssh"
},
{
"type": "agent",
"agent": "SSH_AUTH_SOCK"
},
{
"type": "interactive"
}
]
}
],
"diagnostics": [],
"source": {
"id": "openssh:<fixture-directory>\\config",
"application": "openssh",
"location": "<fixture-directory>\\config",
"storage": [
{
"kind": "file",
"path": "<fixture-directory>\\config"
}
]
}
}get a property
openssh-js get Demo host --file <fixture-directory>\config --jsonExit code: 0.
stdout
"shell.example.invalid"source
openssh-js source --file <fixture-directory>\config --jsonExit code: 0.
stdout
{
"id": "openssh:<fixture-directory>\\config",
"application": "openssh",
"location": "<fixture-directory>\\config",
"storage": [
{
"kind": "file",
"path": "<fixture-directory>\\config"
}
]
}full record
openssh-js get Demo --file <fixture-directory>\config --full --jsonExit code: 0.
stdout
{
"name": "Demo",
"path": "Demo",
"protocol": "ssh",
"host": "shell.example.invalid",
"port": 22,
"user": "deploy",
"password": "(hidden)",
"passphrase": "(hidden)",
"credentialState": "not-stored",
"credentials": [],
"authentication": "",
"keyFile": "<home-directory>\\.ssh\\id_ed25519",
"remoteDirectory": "",
"connections": [
{
"id": "connection",
"kind": "ssh",
"protocol": "ssh",
"endpoint": {
"host": "shell.example.invalid",
"port": 22,
"username": "deploy"
},
"authentication": [
{
"type": "private-key",
"path": {
"value": "<home-directory>\\.ssh\\id_ed25519",
"format": "native"
},
"format": "openssh"
},
{
"type": "agent",
"agent": "SSH_AUTH_SOCK"
},
{
"type": "interactive"
}
]
}
],
"diagnostics": [],
"source": {
"id": "openssh:<fixture-directory>\\config",
"application": "openssh",
"location": "<fixture-directory>\\config",
"storage": [
{
"kind": "file",
"path": "<fixture-directory>\\config"
}
]
}
}recursive list
openssh-js list --file <fixture-directory>\config --recurse --jsonExit code: 0.
stdout
{
"name": "Root",
"folders": [],
"profiles": [
{
"name": "Demo",
"path": "Demo",
"protocol": "ssh",
"host": "shell.example.invalid",
"port": 22,
"user": "deploy",
"password": "(hidden)",
"passphrase": "(hidden)",
"credentialState": "not-stored",
"credentials": [],
"authentication": "",
"keyFile": "<home-directory>\\.ssh\\id_ed25519",
"remoteDirectory": "",
"connections": [
{
"id": "connection",
"kind": "ssh",
"protocol": "ssh",
"endpoint": {
"host": "shell.example.invalid",
"port": 22,
"username": "deploy"
},
"authentication": [
{
"type": "private-key",
"path": {
"value": "<home-directory>\\.ssh\\id_ed25519",
"format": "native"
},
"format": "openssh"
},
{
"type": "agent",
"agent": "SSH_AUTH_SOCK"
},
{
"type": "interactive"
}
]
}
],
"diagnostics": [],
"source": {
"id": "openssh:<fixture-directory>\\config",
"application": "openssh",
"location": "<fixture-directory>\\config",
"storage": [
{
"kind": "file",
"path": "<fixture-directory>\\config"
}
]
}
}
]
}missing profile
openssh-js get does-not-exist --file <fixture-directory>\config --jsonExit code: 1.
stderr
{"error":"Could not find profile by path \"does-not-exist\""}write status
openssh-js write-status --file <fixture-directory>\config --jsonExit code: 0.
stdout
{
"source": {
"id": "openssh:<fixture-directory>\\config",
"application": "openssh",
"location": "<fixture-directory>\\config",
"storage": [
{
"kind": "file",
"path": "<fixture-directory>\\config"
}
]
},
"revision": "48a6b770807b326c9517fdd023cb53eb38cbd6462ace5282be0f314a94c41662",
"diagnostics": [],
"lock": "unlocked",
"application": "closed"
}sources
openssh-js sources --file <fixture-directory>\config --jsonExit code: 0.
stdout
{
"candidates": [
{
"id": "openssh:<fixture-directory>\\config",
"application": "openssh",
"location": "<fixture-directory>\\config",
"storage": [
{
"kind": "file",
"path": "<fixture-directory>\\config"
}
]
}
],
"selectedSourceId": "openssh:<fixture-directory>\\config",
"selectedBy": "only-candidate",
"diagnostics": []
}write preview
openssh-js write --file <fixture-directory>\config --input <fixture-directory>\openssh-js-profiles.json --jsonExit code: 0.
stdout
{
"schemaVersion": 1,
"sourceId": "openssh:<fixture-directory>\\config",
"application": "openssh",
"mode": "create",
"allowLossy": false,
"registryMode": "transactional",
"expectedRevision": "48a6b770807b326c9517fdd023cb53eb38cbd6462ace5282be0f314a94c41662",
"inspection": {
"source": {
"id": "openssh:<fixture-directory>\\config",
"application": "openssh",
"location": "<fixture-directory>\\config",
"storage": [
{
"kind": "file",
"path": "<fixture-directory>\\config"
}
]
},
"revision": "48a6b770807b326c9517fdd023cb53eb38cbd6462ace5282be0f314a94c41662",
"diagnostics": [],
"lock": "unlocked",
"application": "closed"
},
"changes": [
{
"profileId": "Imported",
"operation": "create",
"fields": [
"HostName",
"Port",
"User",
"IdentityFile"
]
}
],
"diagnostics": [
{
"code": "metadata-only-sync",
"severity": "warning",
"message": "Stored secrets, private key contents, trust policies and application-specific settings are not copied"
}
],
"mutations": [
{
"operation": "create",
"path": "Imported",
"profile": {
"id": "Demo",
"path": "Imported",
"name": "Imported",
"source": {
"id": "openssh:<fixture-directory>\\config",
"application": "openssh"
},
"connections": [
{
"id": "connection",
"endpoint": {
"host": "shell.example.invalid",
"port": 22,
"username": "deploy"
},
"authentication": [
{
"type": "private-key",
"path": {
"value": "<home-directory>\\.ssh\\id_ed25519"
},
"format": "openssh"
},
{
"type": "agent"
},
{
"type": "interactive"
}
],
"kind": "ssh",
"protocol": "ssh"
}
],
"diagnostics": []
}
}
],
"digest": "aa93dc5d378e2743a5f6475374f738bfdc19962d8e1016176c18ff1bad3b5bf2"
}invalid apply
openssh-js apply --file <fixture-directory>\config --plan <fixture-directory>\missing-plan.json --jsonExit code: 1.
stderr
{"error":"ENOENT: no such file or directory, stat '<fixture-directory>\\missing-plan.json'"}Write and sync result contracts
write and sync both emit NativeWritePreview: schemaVersion, application, sourceId, expectedRevision, mode, allowLossy, optional registryMode/scope, inspection, diagnostics, changes, sanitized mutations and a digest. They never apply settings. A digest detects an edited plan; it is not a signature. Sync requires an installed source adapter and explicit connection selection for multi-connection profiles.
Successful apply emits {applied: true, sourceId, changes, backups}. It performs guard checks and commits separately; this documentation does not execute apply against a real application store. write-status emits source, revision, application, lock and diagnostics. These write commands emit JSON even without --json; --json also requests JSON errors.
Read/query success uses stdout; shared query/write failures use stderr and exit 1. Help and successful/empty reads exit 0. With --json, ordinary errors have an error string. Registry refusals can additionally include code, nativeCode, operation, recoveryRequired and backups. Do not treat a failed lookup as an empty successful list.
Stored credentials remain hidden by default. --show-password explicitly changes credential visibility and may report unavailable/locked/unsupported states. Keys and remote directories appear only when present. Captured examples contain no real credential values.