{
  "id": "stellar-cli",
  "name": "Stellar CLI",
  "homepage": "https://developers.stellar.org/docs/tools/cli/stellar-cli",
  "description": "Command-line interface for interacting with the Stellar network",
  "executables": [
    "stellar"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/stellar/",
      "[configHome]/soroban/"
    ],
    "secret": [
      "[configHome]/stellar/identity/*.toml",
      "[configHome]/soroban/identity/*.toml"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Stellar smart contracts",
    "description": "Build and deploy Soroban smart contracts with the Stellar CLI. Other subcommands (keys, tx, invoke, network) are not covered; signing options other than the source account are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "contract",
          "build"
        ],
        "label": "Build a contract",
        "description": "Build every cdylib crate in the Cargo manifest for the wasm32 target.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://github.com/stellar/stellar-cli/blob/main/FULL_HELP_DOCS.md",
            "revision": "2026-10-27",
            "evidence": "**Usage:** `stellar contract build [OPTIONS]        build <COMMAND>`\n- `--features <FEATURES>` — Build with the list of features activated, space or comma separated\n- `--all-features` — Build with the all features activated\n- `--manifest-path <MANIFEST_PATH>` — Path to Cargo.toml\n- `--package <PACKAGE>` — Package to build\n- `--profile <PROFILE>` — Build with the specified profile\n- `--out-dir <OUT_DIR>` — Directory to copy wasm files to\n- `--locked` — Assert that `Cargo.lock` will remain unchanged\n- `--print-commands-only` — Print commands to build without executing them\n"
          }
        ],
        "field": [
          {
            "id": "manifest_path",
            "label": "Cargo.toml path",
            "type": "path",
            "option": [
              "--manifest-path"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "package",
            "label": "Package",
            "type": "string",
            "option": [
              "--package"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "profile",
            "label": "Cargo profile",
            "type": "string",
            "option": [
              "--profile"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "out_dir",
            "label": "Copy wasm files to",
            "type": "path",
            "option": [
              "--out-dir"
            ],
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "features",
            "label": "Features",
            "type": "string",
            "option": [
              "--features"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "all_features",
            "label": "All features",
            "type": "boolean",
            "option": [
              "--all-features"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "locked",
            "label": "Locked Cargo.lock",
            "type": "boolean",
            "option": [
              "--locked"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "print_only",
            "label": "Print commands only",
            "type": "boolean",
            "option": [
              "--print-commands-only"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "build",
            "label": "Build contracts",
            "fields": [
              "package",
              "out_dir"
            ]
          },
          {
            "id": "preview",
            "label": "Show build commands",
            "fields": [
              "package",
              "print_only"
            ],
            "required": [
              "print_only"
            ],
            "set": {
              "print_only": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "package",
              "out_dir",
              "manifest_path",
              "print_only"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "profile",
              "features",
              "all_features",
              "locked"
            ]
          }
        ]
      },
      {
        "path": [
          "contract",
          "deploy"
        ],
        "label": "Deploy a contract",
        "description": "Deploy a wasm contract to a network. Sends a signed transaction using the source account.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://github.com/stellar/stellar-cli/blob/main/FULL_HELP_DOCS.md",
            "revision": "2026-10-27",
            "evidence": "**Usage:** `stellar contract deploy [OPTIONS] --source-account <SOURCE_ACCOUNT> [-- <CONTRACT_CONSTRUCTOR_ARGS>...]`\n- `--wasm <WASM>` — WASM file to deploy.\n- `--wasm-hash <WASM_HASH>` — Hash of the already installed/deployed WASM file\n- `--alias <ALIAS>` — The alias that will be used to save the contract's id.\n- `-i`, `--ignore-checks` — Whether to ignore safety checks when deploying contracts\n- `--rpc-url <RPC_URL>` — RPC server endpoint\n- `--network-passphrase <NETWORK_PASSPHRASE>` — Network passphrase to sign the transaction sent to the rpc server\n- `-n`, `--network <NETWORK>` — Name of network to use from config\n- `-s`, `--source-account <SOURCE_ACCOUNT>` [alias: `source`] — Account that where transaction originates from.\n- `--build-only` — Build the transaction and only write the base64 xdr to stdout\n"
          }
        ],
        "field": [
          {
            "id": "wasm",
            "label": "WASM file",
            "type": "path",
            "option": [
              "--wasm"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "wasm_hash",
            "label": "Installed WASM hash",
            "type": "string",
            "option": [
              "--wasm-hash"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "source_account",
            "label": "Source account",
            "description": "An identity name or public key. Do not paste a secret key here; it would land in shell history.",
            "type": "string",
            "option": [
              "--source-account",
              "-s"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "network",
            "label": "Network",
            "type": "string",
            "option": [
              "--network",
              "-n"
            ],
            "suggestions": [
              {
                "value": "testnet",
                "label": "Testnet"
              },
              {
                "value": "mainnet",
                "label": "Mainnet"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "alias",
            "label": "Contract alias",
            "description": "Overwrites an existing alias without asking.",
            "type": "string",
            "option": [
              "--alias"
            ],
            "effect": "overwrite",
            "sources": [
              "docs"
            ]
          },
          {
            "id": "rpc_url",
            "label": "RPC URL",
            "type": "url",
            "option": [
              "--rpc-url"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "network_passphrase",
            "label": "Network passphrase",
            "type": "string",
            "option": [
              "--network-passphrase"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "build_only",
            "label": "Build transaction only",
            "type": "boolean",
            "option": [
              "--build-only"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "ignore_checks",
            "label": "Ignore safety checks",
            "type": "boolean",
            "option": [
              "--ignore-checks",
              "-i"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "deploy-wasm",
            "label": "Deploy a wasm file",
            "fields": [
              "wasm",
              "source_account",
              "network",
              "alias"
            ],
            "required": [
              "wasm",
              "source_account",
              "network"
            ]
          },
          {
            "id": "dry-build",
            "label": "Build transaction only",
            "fields": [
              "wasm",
              "source_account",
              "network",
              "build_only"
            ],
            "required": [
              "wasm",
              "source_account",
              "network",
              "build_only"
            ],
            "set": {
              "build_only": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "wasm",
              "wasm_hash",
              "source_account",
              "network",
              "alias"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "rpc_url",
              "network_passphrase",
              "build_only",
              "ignore_checks"
            ]
          }
        ]
      }
    ]
  }
}
