Install and use lnget, a Lightning-native HTTP client with automatic L402 payment support. Use when downloading files behind Lightning paywalls, managing L402 tokens, checking Lightning backend status, or making HTTP requests that may require micropayments.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install lnget或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install lnget⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/lnget/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: lnget description: Install and use lnget, a Lightning-native HTTP client with automatic L402 payment support. Use when downloading files behind Lightning paywalls, managing L402 tokens, checking Lightning backend status, or making HTTP requests that may require micropayments. ---
lnget 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.
Source: github.com/lightninglabs/lnget
# 1. Install lnget
skills/lnget/scripts/install.sh
# 2. Initialize config (auto-detects local lnd)
lnget config init
# 3. Fetch an L402-protected resource
lnget --max-cost 1000 https://api.example.com/paid-data
skills/lnget/scripts/install.sh
This will:
go install github.com/lightninglabs/lnget/cmd/lnget@latestlnget is on $PATHTo install manually:
go install github.com/lightninglabs/lnget/cmd/lnget@latest
Or build from source:
git clone https://github.com/lightninglabs/lnget.git
cd lnget
make install
# Fetch URL (output to stdout)
lnget https://api.example.com/data.json
# Save to file
lnget -o data.json https://api.example.com/data.json
# Quiet mode for piping
lnget -q https://api.example.com/data.json | jq .
# Resume partial download
lnget -c -o largefile.zip https://api.example.com/largefile.zip
# Custom HTTP method with data
lnget -X POST -d '{"query":"test"}' https://api.example.com/search
# Custom headers
lnget -H "Accept: text/plain" https://api.example.com/data
# Set maximum auto-pay amount (satoshis)
lnget --max-cost 5000 https://api.example.com/expensive.json
# Set maximum routing fee
lnget --max-fee 50 https://api.example.com/data.json
# Preview without paying (shows 402 challenge details)
lnget --no-pay https://api.example.com/data.json
# Custom payment timeout
lnget --payment-timeout 120s https://api.example.com/data.json
# JSON output (default, best for programmatic use)
lnget --json https://api.example.com/data.json
# Human-readable output
lnget --human https://api.example.com/data.json
# Verbose mode (shows L402 flow details)
lnget -v https://api.example.com/data.json
# Disable progress bar
lnget --no-progress -o file.zip https://api.example.com/file.zip
lnget tokens)Tokens are cached per-domain at ~/.lnget/tokens/ and reused automatically on subsequent requests.
# List all cached tokens
lnget tokens list
# Show token for a specific domain
lnget tokens show api.example.com
# Remove token for a domain (forces re-authentication)
lnget tokens remove api.example.com
# Clear all tokens
lnget tokens clear --force
lnget config)# Initialize config file at ~/.lnget/config.yaml
lnget config init
# Show current configuration
lnget config show
# Show config file path
lnget config path
lnget ln)# Check backend connection status
lnget ln status
# Show detailed node info
lnget ln info
# Pair with a node via LNC pairing phrase
lnget ln lnc pair "your-pairing-phrase"
# Ephemeral pairing (no session persistence)
lnget ln lnc pair "phrase" --ephemeral
# List saved LNC sessions
lnget ln lnc sessions
# Revoke a session
lnget ln lnc revoke <session-id>
# Initialize embedded neutrino wallet
lnget ln neutrino init
# Get address to fund wallet
lnget ln neutrino fund
# Check wallet balance
lnget ln neutrino balance
# Show sync status
lnget ln neutrino status
Config lives at ~/.lnget/config.yaml. Run lnget config init to create it.
Note: 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.
l402:
max_cost_sats: 1000 # Max invoice to auto-pay
max_fee_sats: 10 # Max routing fee
payment_timeout: 60s # Payment timeout
auto_pay: true # Enable auto-payment
http:
timeout: 30s
max_redirects: 10
user_agent: "lnget/0.1.0"
allow_insecure: false
ln:
mode: lnd # Options: lnd, lnc, neutrino
lnd:
host: localhost:10009
tls_cert: ~/.lnd/tls.cert
macaroon: ~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon
network: mainnet
output:
format: json
progress: true
verbose: false
tokens:
dir: ~/.lnget/tokens
Environment variables override config with LNGET_ prefix:
export LNGET_L402_MAX_COST_SATS=5000
export LNGET_LN_MODE=lnc
export LNGET_LN_LND_HOST=localhost:10009
| Code | Meaning | |------|---------| | 0 | Success | | 1 | General error | | 2 | Payment exceeds max cost | | 3 | Payment failed | | 4 | Network/connection error |
When lnget encounters a 402 response:
WWW-Authenticate: L402 macaroon="...", invoice="..." header--max-cost~/.lnget/tokens// Authorization: L402 : Subsequent requests to the same domain reuse the cached token without payment.
# Check cost before committing
result=$(lnget --no-pay --json https://api.example.com/data.json)
cost=$(echo "$result" | jq -r '.invoice_amount_sat // 0')
if [ "$cost" -le "$BUDGET" ]; then
lnget --max-cost "$BUDGET" -q https://api.example.com/data.json
fi
# Extract just the response body
lnget --json -q https://api.example.com/data.json | jq '.body'
# Check if payment was required
lnget --json https://api.example.com/data.json | jq '.l402_paid'
# For local development with aperture (no TLS)
lnget -k https://localhost:8081/api/data
| Path | Purpose | |------|---------| | ~/.lnget/config.yaml | Configuration file | | ~/.lnget/tokens/ | Per-domain token storage | | ~/.lnget/lnc/sessions/ | LNC session persistence | | ~/.lnget/neutrino/ | Embedded wallet data |
安装 lnget: like wget but for L402 on the web 后,可以对 AI 说这些话来触发它
Help me get started with lnget: like wget but for L402 on the web
Explains what lnget: like wget but for L402 on the web does, walks through the setup, and runs a quick demo based on your current project
Use lnget: like wget but for L402 on the web to install and use lnget, a Lightning-native HTTP client with automati...
Invokes lnget: like wget but for L402 on the web with the right parameters and returns the result directly in the conversation
What can I do with lnget: like wget but for L402 on the web in my marketing & growth workflow?
将技能文件夹放到 ~/.claude/skills/lnget/ 目录(个人级,所有项目可用),或 .claude/skills/lnget/(项目级)。重启 AI 客户端后,用 /lnget 主动调用,或让 AI 根据上下文自动发现并使用。
lnget: like wget but for L402 on the web 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
lnget: like wget but for L402 on the web 可免费安装使用。请查阅仓库了解许可证信息。
Install and use lnget, a Lightning-native HTTP client with automatic L402 payment support. Use when downloading files behind Lightning paywalls, managing L402 tokens, checking Lightning backend status, or making HTTP requests that may require micropayments.
Lists the top use cases for lnget: like wget but for L402 on the web, with example commands for each scenario
Automate my marketing & growth tasks using lnget: like wget but for L402 on the web
Identifies repetitive steps in your workflow and sets up lnget: like wget but for L402 on the web to handle them automatically
lnget: like wget but for L402 on the web 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。