{
  "id": "core-lightning",
  "name": "Core Lightning",
  "homepage": "https://github.com/ElementsProject/lightning",
  "description": "Lightning Network implementation focusing on spec compliance and performance",
  "executables": [
    "lightningd",
    "lightning-cli",
    "lightning-hsmtool"
  ],
  "dotfiles": {
    "paths": [
      "~/.lightning/config",
      "~/.lightning/*/config"
    ],
    "secret": [
      "~/.lightning/hsm_secret",
      "~/.lightning/*/hsm_secret"
    ],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Call lightning-cli",
    "description": "Send one RPC command to a running lightningd, such as getinfo or listpeers. Only lightning-cli is covered; lightningd and lightning-hsmtool are not.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://github.com/ElementsProject/lightning/blob/master/doc/lightning-cli.1.md",
        "revision": "2026-10-27",
        "evidence": "lightning-cli [OPTIONS] command\n* --lightning-dir=DIR\n  Set the directory for the lightning daemon we're talking to; defaults to $HOME/.lightning.\n* --network=network\n* --mainnet\n* --testnet\n* --signet\n* --regtest\n  Sets network explicitly.\n* --rpc-file=FILE\n* --keywords/-k\n  Use format key=value for parameters in any order\n* --json/-J\n* --raw/-R\n* --human-readable/-H\n  Return result in human-readable output.\n"
      }
    ],
    "field": [
      {
        "id": "command",
        "label": "RPC command",
        "description": "For example getinfo, listpeers, listfunds or help.",
        "type": "string",
        "position": 0,
        "min": 1,
        "suggestions": [
          {
            "value": "getinfo",
            "label": "getinfo"
          },
          {
            "value": "listpeers",
            "label": "listpeers"
          },
          {
            "value": "listfunds",
            "label": "listfunds"
          },
          {
            "value": "help",
            "label": "help"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "args",
        "label": "Command arguments",
        "description": "Positional values, or key=value pairs when Keyword parameters is on.",
        "type": "string",
        "position": 1,
        "multiple": true,
        "min": 0,
        "sources": [
          "man"
        ]
      },
      {
        "id": "lightning_dir",
        "label": "Lightning directory",
        "type": "path",
        "option": [
          "--lightning-dir"
        ],
        "path": {
          "kind": "directory",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "network",
        "label": "Network",
        "type": "string",
        "option": [
          "--network"
        ],
        "suggestions": [
          {
            "value": "bitcoin",
            "label": "Mainnet"
          },
          {
            "value": "testnet",
            "label": "Testnet"
          },
          {
            "value": "signet",
            "label": "Signet"
          },
          {
            "value": "regtest",
            "label": "Regtest"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "rpc_file",
        "label": "RPC socket file",
        "type": "path",
        "option": [
          "--rpc-file"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "keywords",
        "label": "Keyword parameters",
        "description": "Pass arguments as key=value in any order.",
        "type": "boolean",
        "option": [
          "--keywords",
          "-k"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "human_readable",
        "label": "Human-readable output",
        "type": "boolean",
        "option": [
          "--human-readable",
          "-H"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "raw",
        "label": "Raw JSON output",
        "type": "boolean",
        "option": [
          "--raw",
          "-R"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "getinfo",
        "label": "Node info",
        "fields": [
          "command",
          "lightning_dir",
          "network",
          "human_readable"
        ],
        "required": [],
        "set": {
          "command": [
            "getinfo"
          ]
        },
        "lock": [
          "command"
        ]
      },
      {
        "id": "call",
        "label": "Call any command",
        "fields": [
          "command",
          "args",
          "keywords",
          "lightning_dir",
          "network"
        ],
        "required": [
          "command"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "command",
          "args",
          "keywords",
          "network"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "lightning_dir",
          "rpc_file",
          "human_readable",
          "raw"
        ]
      }
    ]
  }
}
