{
  "id": "trezor-agent",
  "name": "trezor-agent",
  "homepage": "https://github.com/romanz/trezor-agent",
  "description": "Hardware-based SSH/GPG/age agent.",
  "executables": [
    "trezor-agent"
  ],
  "dotfiles": {
    "paths": [
      "~/.ssh/agent.conf"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Run SSH agent",
    "description": "Start a hardware-backed SSH agent for one identity: connect, open a shell, run a command, or run in the foreground. The command to run goes after the identity. PIN/passphrase helpers, GPG and age modes are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "src",
        "kind": "manual",
        "url": "https://raw.githubusercontent.com/romanz/trezor-agent/HEAD/libagent/ssh/__init__.py",
        "revision": "2026-10-27",
        "evidence": "-v, --verbose\n-e, --ecdsa-curve-name CURVE   specify ECDSA curve name\n--timeout                      timeout for accepting SSH client connections\n--debug                        log SSH protocol messages for debugging.\n--log-file                     Path to the log file (to be written by the agent).\n--sock-path                    Path to the socket of the agent.\n-d, --daemonize                Daemonize the agent and print its path\n-f, --foreground               Run agent in foreground with specified path\n-s, --shell                    run ${SHELL} as subprocess under SSH agent, allowing regular SSH-based tools to be used in the shell\n-c, --connect                  connect to specified host via SSH\nidentity                       proto://[user@]host[:port][/path]\nARGUMENT                       command to run under the SSH agent\ntrezor-agent -e ed25519 bob@example.com -- rsync up/ bob@example.com:/home/bob\ntrezor-agent identity@myhost -- COMMAND --WITH --ARGUMENTS\n"
      }
    ],
    "field": [
      {
        "id": "identity",
        "label": "Identity",
        "description": "Host identity such as user@host, optionally with port and path.",
        "type": "string",
        "position": 0,
        "sources": [
          "src"
        ]
      },
      {
        "id": "command",
        "label": "Command to run",
        "description": "Program and arguments run under the agent (placed after --).",
        "type": "string",
        "position": 1,
        "multiple": true,
        "sources": [
          "src"
        ]
      },
      {
        "id": "curve",
        "label": "ECDSA curve",
        "type": "string",
        "option": [
          "--ecdsa-curve-name",
          "-e"
        ],
        "suggestions": [
          {
            "value": "ed25519",
            "label": "ed25519"
          },
          {
            "value": "nist256p1",
            "label": "nist256p1"
          }
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "connect",
        "label": "Connect via SSH",
        "type": "boolean",
        "option": [
          "--connect",
          "-c"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "shell",
        "label": "Open a shell under the agent",
        "type": "boolean",
        "option": [
          "--shell",
          "-s"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "foreground",
        "label": "Run in foreground",
        "type": "boolean",
        "option": [
          "--foreground",
          "-f"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "sock_path",
        "label": "Socket path",
        "type": "path",
        "option": [
          "--sock-path"
        ],
        "path": {
          "kind": "any",
          "role": "output"
        },
        "sources": [
          "src"
        ]
      },
      {
        "id": "timeout",
        "label": "Connection timeout (seconds)",
        "type": "number",
        "option": [
          "--timeout"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "log_file",
        "label": "Log file",
        "type": "path",
        "option": [
          "--log-file"
        ],
        "path": {
          "kind": "file",
          "role": "output"
        },
        "effect": "overwrite",
        "sources": [
          "src"
        ]
      },
      {
        "id": "debug",
        "label": "Log SSH protocol messages",
        "type": "boolean",
        "option": [
          "--debug"
        ],
        "sources": [
          "src"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "count",
        "option": [
          "--verbose",
          "-v"
        ],
        "sources": [
          "src"
        ]
      }
    ],
    "task": [
      {
        "id": "connect_host",
        "label": "Connect to a host",
        "fields": [
          "identity",
          "curve",
          "connect",
          "verbose"
        ],
        "required": [
          "identity"
        ],
        "set": {
          "connect": [
            true
          ]
        }
      },
      {
        "id": "shell_session",
        "label": "Shell with the agent",
        "fields": [
          "identity",
          "curve",
          "shell",
          "verbose"
        ],
        "required": [
          "identity"
        ],
        "set": {
          "shell": [
            true
          ]
        }
      },
      {
        "id": "run_command",
        "label": "Run a command under the agent",
        "fields": [
          "identity",
          "curve",
          "command",
          "verbose"
        ],
        "required": [
          "identity",
          "command"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "identity",
          "curve",
          "connect",
          "shell",
          "command"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "foreground",
          "sock_path",
          "timeout",
          "log_file",
          "debug",
          "verbose"
        ]
      }
    ]
  }
}
