{
  "schemaVersion": "1.0",
  "item": {
    "slug": "lnget",
    "name": "lnget: like wget but for L402 on the web",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Roasbeef/lnget",
    "canonicalUrl": "https://clawhub.ai/Roasbeef/lnget",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/lnget",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lnget",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/install.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/lnget"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/lnget",
    "agentPageUrl": "https://openagent3.xyz/skills/lnget/agent",
    "manifestUrl": "https://openagent3.xyz/skills/lnget/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/lnget/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "lnget - Lightning-Native HTTP Client",
        "body": "lnget is a wget/curl-like CLI that natively handles L402 (Lightning HTTP 402)\nauthentication. When a server responds with HTTP 402 and an L402 challenge,\nlnget automatically pays the Lightning invoice and retries with the paid token.\n\nSource: github.com/lightninglabs/lnget"
      },
      {
        "title": "Quick Start",
        "body": "# 1. Install lnget\nskills/lnget/scripts/install.sh\n\n# 2. Initialize config (auto-detects local lnd)\nlnget config init\n\n# 3. Fetch an L402-protected resource\nlnget --max-cost 1000 https://api.example.com/paid-data"
      },
      {
        "title": "Installation",
        "body": "skills/lnget/scripts/install.sh\n\nThis will:\n\nVerify Go is installed\nRun go install github.com/lightninglabs/lnget/cmd/lnget@latest\nVerify lnget is on $PATH\n\nTo install manually:\n\ngo install github.com/lightninglabs/lnget/cmd/lnget@latest\n\nOr build from source:\n\ngit clone https://github.com/lightninglabs/lnget.git\ncd lnget\nmake install"
      },
      {
        "title": "Downloads",
        "body": "# Fetch URL (output to stdout)\nlnget https://api.example.com/data.json\n\n# Save to file\nlnget -o data.json https://api.example.com/data.json\n\n# Quiet mode for piping\nlnget -q https://api.example.com/data.json | jq .\n\n# Resume partial download\nlnget -c -o largefile.zip https://api.example.com/largefile.zip\n\n# Custom HTTP method with data\nlnget -X POST -d '{\"query\":\"test\"}' https://api.example.com/search\n\n# Custom headers\nlnget -H \"Accept: text/plain\" https://api.example.com/data"
      },
      {
        "title": "Payment Control",
        "body": "# Set maximum auto-pay amount (satoshis)\nlnget --max-cost 5000 https://api.example.com/expensive.json\n\n# Set maximum routing fee\nlnget --max-fee 50 https://api.example.com/data.json\n\n# Preview without paying (shows 402 challenge details)\nlnget --no-pay https://api.example.com/data.json\n\n# Custom payment timeout\nlnget --payment-timeout 120s https://api.example.com/data.json"
      },
      {
        "title": "Output Modes",
        "body": "# JSON output (default, best for programmatic use)\nlnget --json https://api.example.com/data.json\n\n# Human-readable output\nlnget --human https://api.example.com/data.json\n\n# Verbose mode (shows L402 flow details)\nlnget -v https://api.example.com/data.json\n\n# Disable progress bar\nlnget --no-progress -o file.zip https://api.example.com/file.zip"
      },
      {
        "title": "Token Management (lnget tokens)",
        "body": "Tokens are cached per-domain at ~/.lnget/tokens/<domain>/token.json and\nreused automatically on subsequent requests.\n\n# List all cached tokens\nlnget tokens list\n\n# Show token for a specific domain\nlnget tokens show api.example.com\n\n# Remove token for a domain (forces re-authentication)\nlnget tokens remove api.example.com\n\n# Clear all tokens\nlnget tokens clear --force"
      },
      {
        "title": "Configuration (lnget config)",
        "body": "# Initialize config file at ~/.lnget/config.yaml\nlnget config init\n\n# Show current configuration\nlnget config show\n\n# Show config file path\nlnget config path"
      },
      {
        "title": "Lightning Backend (lnget ln)",
        "body": "# Check backend connection status\nlnget ln status\n\n# Show detailed node info\nlnget ln info\n\nLNC (Lightning Node Connect)\n\n# Pair with a node via LNC pairing phrase\nlnget ln lnc pair \"your-pairing-phrase\"\n\n# Ephemeral pairing (no session persistence)\nlnget ln lnc pair \"phrase\" --ephemeral\n\n# List saved LNC sessions\nlnget ln lnc sessions\n\n# Revoke a session\nlnget ln lnc revoke <session-id>\n\nNeutrino (Embedded Wallet)\n\n# Initialize embedded neutrino wallet\nlnget ln neutrino init\n\n# Get address to fund wallet\nlnget ln neutrino fund\n\n# Check wallet balance\nlnget ln neutrino balance\n\n# Show sync status\nlnget ln neutrino status"
      },
      {
        "title": "Configuration File",
        "body": "Config lives at ~/.lnget/config.yaml. Run lnget config init to create it.\n\nNote: lnget config init may generate incorrect YAML key names (e.g.,\ntlscertpath and macaroonpath instead of tls_cert and macaroon) due to\nmissing yaml struct tags in the lnget source. Use the example below as the\nreference config format. If your config was generated by lnget config init,\nverify the ln.lnd keys match the format shown here.\n\nl402:\n  max_cost_sats: 1000       # Max invoice to auto-pay\n  max_fee_sats: 10           # Max routing fee\n  payment_timeout: 60s       # Payment timeout\n  auto_pay: true             # Enable auto-payment\n\nhttp:\n  timeout: 30s\n  max_redirects: 10\n  user_agent: \"lnget/0.1.0\"\n  allow_insecure: false\n\nln:\n  mode: lnd                  # Options: lnd, lnc, neutrino\n  lnd:\n    host: localhost:10009\n    tls_cert: ~/.lnd/tls.cert\n    macaroon: ~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon\n    network: mainnet\n\noutput:\n  format: json\n  progress: true\n  verbose: false\n\ntokens:\n  dir: ~/.lnget/tokens\n\nEnvironment variables override config with LNGET_ prefix:\n\nexport LNGET_L402_MAX_COST_SATS=5000\nexport LNGET_LN_MODE=lnc\nexport LNGET_LN_LND_HOST=localhost:10009"
      },
      {
        "title": "Exit Codes",
        "body": "CodeMeaning0Success1General error2Payment exceeds max cost3Payment failed4Network/connection error"
      },
      {
        "title": "L402 Flow",
        "body": "When lnget encounters a 402 response:\n\nParses WWW-Authenticate: L402 macaroon=\"...\", invoice=\"...\" header\nDecodes the macaroon and BOLT11 invoice\nChecks invoice amount against --max-cost\nStores a pending token (crash recovery)\nPays the invoice via the configured Lightning backend\nStores the paid token with preimage at ~/.lnget/tokens/<domain>/\nRetries the request with Authorization: L402 <macaroon>:<preimage>\n\nSubsequent requests to the same domain reuse the cached token without payment."
      },
      {
        "title": "Budget-Aware Fetching",
        "body": "# Check cost before committing\nresult=$(lnget --no-pay --json https://api.example.com/data.json)\ncost=$(echo \"$result\" | jq -r '.invoice_amount_sat // 0')\n\nif [ \"$cost\" -le \"$BUDGET\" ]; then\n    lnget --max-cost \"$BUDGET\" -q https://api.example.com/data.json\nfi"
      },
      {
        "title": "Parsing JSON Output",
        "body": "# Extract just the response body\nlnget --json -q https://api.example.com/data.json | jq '.body'\n\n# Check if payment was required\nlnget --json https://api.example.com/data.json | jq '.l402_paid'"
      },
      {
        "title": "Testing with Insecure Connections",
        "body": "# For local development with aperture (no TLS)\nlnget -k https://localhost:8081/api/data"
      },
      {
        "title": "File Locations",
        "body": "PathPurpose~/.lnget/config.yamlConfiguration file~/.lnget/tokens/<domain>/Per-domain token storage~/.lnget/lnc/sessions/LNC session persistence~/.lnget/neutrino/Embedded wallet data"
      }
    ],
    "body": "lnget - Lightning-Native HTTP Client\n\nlnget is a wget/curl-like CLI that natively handles L402 (Lightning HTTP 402) authentication. When a server responds with HTTP 402 and an L402 challenge, lnget automatically pays the Lightning invoice and retries with the paid token.\n\nSource: github.com/lightninglabs/lnget\n\nQuick Start\n# 1. Install lnget\nskills/lnget/scripts/install.sh\n\n# 2. Initialize config (auto-detects local lnd)\nlnget config init\n\n# 3. Fetch an L402-protected resource\nlnget --max-cost 1000 https://api.example.com/paid-data\n\nInstallation\nskills/lnget/scripts/install.sh\n\n\nThis will:\n\nVerify Go is installed\nRun go install github.com/lightninglabs/lnget/cmd/lnget@latest\nVerify lnget is on $PATH\n\nTo install manually:\n\ngo install github.com/lightninglabs/lnget/cmd/lnget@latest\n\n\nOr build from source:\n\ngit clone https://github.com/lightninglabs/lnget.git\ncd lnget\nmake install\n\nBasic Usage\nDownloads\n# Fetch URL (output to stdout)\nlnget https://api.example.com/data.json\n\n# Save to file\nlnget -o data.json https://api.example.com/data.json\n\n# Quiet mode for piping\nlnget -q https://api.example.com/data.json | jq .\n\n# Resume partial download\nlnget -c -o largefile.zip https://api.example.com/largefile.zip\n\n# Custom HTTP method with data\nlnget -X POST -d '{\"query\":\"test\"}' https://api.example.com/search\n\n# Custom headers\nlnget -H \"Accept: text/plain\" https://api.example.com/data\n\nPayment Control\n# Set maximum auto-pay amount (satoshis)\nlnget --max-cost 5000 https://api.example.com/expensive.json\n\n# Set maximum routing fee\nlnget --max-fee 50 https://api.example.com/data.json\n\n# Preview without paying (shows 402 challenge details)\nlnget --no-pay https://api.example.com/data.json\n\n# Custom payment timeout\nlnget --payment-timeout 120s https://api.example.com/data.json\n\nOutput Modes\n# JSON output (default, best for programmatic use)\nlnget --json https://api.example.com/data.json\n\n# Human-readable output\nlnget --human https://api.example.com/data.json\n\n# Verbose mode (shows L402 flow details)\nlnget -v https://api.example.com/data.json\n\n# Disable progress bar\nlnget --no-progress -o file.zip https://api.example.com/file.zip\n\nSubcommands\nToken Management (lnget tokens)\n\nTokens are cached per-domain at ~/.lnget/tokens/<domain>/token.json and reused automatically on subsequent requests.\n\n# List all cached tokens\nlnget tokens list\n\n# Show token for a specific domain\nlnget tokens show api.example.com\n\n# Remove token for a domain (forces re-authentication)\nlnget tokens remove api.example.com\n\n# Clear all tokens\nlnget tokens clear --force\n\nConfiguration (lnget config)\n# Initialize config file at ~/.lnget/config.yaml\nlnget config init\n\n# Show current configuration\nlnget config show\n\n# Show config file path\nlnget config path\n\nLightning Backend (lnget ln)\n# Check backend connection status\nlnget ln status\n\n# Show detailed node info\nlnget ln info\n\nLNC (Lightning Node Connect)\n# Pair with a node via LNC pairing phrase\nlnget ln lnc pair \"your-pairing-phrase\"\n\n# Ephemeral pairing (no session persistence)\nlnget ln lnc pair \"phrase\" --ephemeral\n\n# List saved LNC sessions\nlnget ln lnc sessions\n\n# Revoke a session\nlnget ln lnc revoke <session-id>\n\nNeutrino (Embedded Wallet)\n# Initialize embedded neutrino wallet\nlnget ln neutrino init\n\n# Get address to fund wallet\nlnget ln neutrino fund\n\n# Check wallet balance\nlnget ln neutrino balance\n\n# Show sync status\nlnget ln neutrino status\n\nConfiguration File\n\nConfig lives at ~/.lnget/config.yaml. Run lnget config init to create it.\n\nNote: lnget config init may generate incorrect YAML key names (e.g., tlscertpath and macaroonpath instead of tls_cert and macaroon) due to missing yaml struct tags in the lnget source. Use the example below as the reference config format. If your config was generated by lnget config init, verify the ln.lnd keys match the format shown here.\n\nl402:\n  max_cost_sats: 1000       # Max invoice to auto-pay\n  max_fee_sats: 10           # Max routing fee\n  payment_timeout: 60s       # Payment timeout\n  auto_pay: true             # Enable auto-payment\n\nhttp:\n  timeout: 30s\n  max_redirects: 10\n  user_agent: \"lnget/0.1.0\"\n  allow_insecure: false\n\nln:\n  mode: lnd                  # Options: lnd, lnc, neutrino\n  lnd:\n    host: localhost:10009\n    tls_cert: ~/.lnd/tls.cert\n    macaroon: ~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon\n    network: mainnet\n\noutput:\n  format: json\n  progress: true\n  verbose: false\n\ntokens:\n  dir: ~/.lnget/tokens\n\n\nEnvironment variables override config with LNGET_ prefix:\n\nexport LNGET_L402_MAX_COST_SATS=5000\nexport LNGET_LN_MODE=lnc\nexport LNGET_LN_LND_HOST=localhost:10009\n\nExit Codes\nCode\tMeaning\n0\tSuccess\n1\tGeneral error\n2\tPayment exceeds max cost\n3\tPayment failed\n4\tNetwork/connection error\nL402 Flow\n\nWhen lnget encounters a 402 response:\n\nParses WWW-Authenticate: L402 macaroon=\"...\", invoice=\"...\" header\nDecodes the macaroon and BOLT11 invoice\nChecks invoice amount against --max-cost\nStores a pending token (crash recovery)\nPays the invoice via the configured Lightning backend\nStores the paid token with preimage at ~/.lnget/tokens/<domain>/\nRetries the request with Authorization: L402 <macaroon>:<preimage>\n\nSubsequent requests to the same domain reuse the cached token without payment.\n\nAgent Integration Patterns\nBudget-Aware Fetching\n# Check cost before committing\nresult=$(lnget --no-pay --json https://api.example.com/data.json)\ncost=$(echo \"$result\" | jq -r '.invoice_amount_sat // 0')\n\nif [ \"$cost\" -le \"$BUDGET\" ]; then\n    lnget --max-cost \"$BUDGET\" -q https://api.example.com/data.json\nfi\n\nParsing JSON Output\n# Extract just the response body\nlnget --json -q https://api.example.com/data.json | jq '.body'\n\n# Check if payment was required\nlnget --json https://api.example.com/data.json | jq '.l402_paid'\n\nTesting with Insecure Connections\n# For local development with aperture (no TLS)\nlnget -k https://localhost:8081/api/data\n\nFile Locations\nPath\tPurpose\n~/.lnget/config.yaml\tConfiguration file\n~/.lnget/tokens/<domain>/\tPer-domain token storage\n~/.lnget/lnc/sessions/\tLNC session persistence\n~/.lnget/neutrino/\tEmbedded wallet data"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Roasbeef/lnget",
    "publisherUrl": "https://clawhub.ai/Roasbeef/lnget",
    "owner": "Roasbeef",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/lnget",
    "downloadUrl": "https://openagent3.xyz/downloads/lnget",
    "agentUrl": "https://openagent3.xyz/skills/lnget/agent",
    "manifestUrl": "https://openagent3.xyz/skills/lnget/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/lnget/agent.md"
  }
}