This document describes the stable JSON output shapes currently emitted by
nsec-tree-cli when --json is used.
These are practical schemas intended for scripting with tools like jq.
{
"rootType": "mnemonic-backed",
"recoverable": true,
"masterNpub": "npub1...",
"mnemonic": "abandon ... about",
"profile": "optional-profile-name"
}{
"rootType": "mnemonic-backed | nsec-backed",
"recoverable": true,
"masterNpub": "npub1...",
"profile": "optional-profile-name",
"source": "optional-source-description"
}{
"rootType": "mnemonic-backed | nsec-backed",
"recoverable": true,
"path": "personal@0/forum-burner@0",
"segments": [
{
"name": "personal",
"requestedIndex": 0,
"actualIndex": 0,
"npub": "npub1..."
}
],
"npub": "npub1...",
"publicKey": "hex",
"purpose": "forum-burner",
"index": 0,
"secretRequested": false,
"profile": "optional-profile-name"
}{
"path": "personal@0",
"npub": "npub1..."
}{
"path": "personal@0",
"nsec": "nsec1..."
}{
"path": "personal@0/forum-burner@0",
"segments": [],
"npub": "npub1...",
"nsec": "nsec1...",
"publicKey": "hex",
"purpose": "forum-burner",
"index": 0
}The CLI emits the proof object from nsec-tree directly:
{
"masterPubkey": "hex",
"childPubkey": "hex",
"purpose": "optional-purpose",
"index": 0,
"attestation": "string",
"signature": "hex"
}{
"valid": true,
"proofType": "private | full",
"proof": {
"masterPubkey": "hex",
"childPubkey": "hex",
"purpose": "optional-purpose",
"index": 0,
"attestation": "string",
"signature": "hex"
}
}{
"rootType": "mnemonic-backed",
"recoverable": true,
"shares": [
{
"index": 1,
"threshold": 2,
"words": ["abandon", "ability"],
"phrase": "abandon ability ..."
}
]
}{
"rootType": "mnemonic-backed",
"recoverable": true,
"mnemonic": "abandon ... about"
}[
{
"name": "personal",
"savedAt": "2026-03-19T00:00:00.000Z",
"rootType": "mnemonic-backed",
"recoverable": true,
"masterNpub": "npub1...",
"active": true
}
]The CLI emits the stored profile record:
{
"name": "personal",
"savedAt": "2026-03-19T00:00:00.000Z",
"rootType": "mnemonic-backed",
"recoverable": true,
"masterNpub": "npub1...",
"root": {
"type": "mnemonic-backed",
"mnemonic": "abandon ... about",
"passphrase": "optional"
}
}{
"path": "personal@0/forum-burner@0",
"segments": [
{
"name": "personal",
"requestedIndex": 0
}
],
"deterministic": true
}