Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@getalby/cli",
"description": "CLI for Nostr Wallet Connect (NIP-47) with a few additional useful lightning tools",
"repository": "https://github.com/getAlby/cli.git",
"version": "0.4.0",
"version": "0.4.1",
"type": "module",
"main": "build/index.js",
"bin": {
Expand Down
22 changes: 11 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,23 @@ const program = new Command();
program
.name("@getalby/cli")
.description(
"CLI for Nostr Wallet Connect (NIP-47) with lightning tools\n\n" +
"CLI for Nostr Wallet Connect (NIP-47) with lightning tools\n" +
" Run 'auth' or 'connect' first to set up a wallet connection.\n\n" +
" Examples:\n" +
" $ npx @getalby/cli auth https://my.albyhub.com --app-name OpenClaw\n" +
' $ npx @getalby/cli connect "nostr+walletconnect://..."\n' +
" $ npx @getalby/cli get-balance\n" +
" $ npx @getalby/cli pay-invoice --invoice lnbc...",
)
.version("0.4.0")
.option(
"-c, --connection-secret <string>",
"NWC connection secret (nostr+walletconnect://...) or path to file containing it (preferred)",
)
.option(
"-w, --wallet-name <name>",
"Use a named wallet's connection secret (~/.alby-cli/connection-secret-<name>.key)",
)
.option(
"-c, --connection-secret <string>",
"NWC connection secret (nostr+walletconnect://...) or path to file containing it (preferred)",
)
.option("-v, --verbose", "Print status messages to stderr")
.addHelpText(
"after",
Expand All @@ -63,7 +65,7 @@ Security:
);

// Register common wallet commands
program.commandsGroup("Wallet Commands (require --connection-secret):");
program.commandsGroup("Wallet Commands (requires wallet connection):");
registerGetBalanceCommand(program);
registerGetBudgetCommand(program);
registerGetInfoCommand(program);
Expand All @@ -73,9 +75,7 @@ registerLookupInvoiceCommand(program);
registerListTransactionsCommand(program);

// Register advanced wallet commands
program.commandsGroup(
"Advanced Wallet Commands (require --connection-secret):",
);
program.commandsGroup("Advanced Wallet Commands (requires wallet connection):");
registerPayKeysendCommand(program);
registerGetWalletServiceInfoCommand(program);
registerWaitForPaymentCommand(program);
Expand All @@ -85,15 +85,15 @@ registerSettleHoldInvoiceCommand(program);
registerCancelHoldInvoiceCommand(program);

// Register lightning tool commands
program.commandsGroup("Lightning Tools (no --connection-secret required):");
program.commandsGroup("Lightning Tools (no wallet connection required):");
registerFiatToSatsCommand(program);
registerSatsToFiatCommand(program);
registerParseInvoiceCommand(program);
registerVerifyPreimageCommand(program);
registerRequestInvoiceFromLightningAddressCommand(program);

// Register fetch command for payment-protected resources
program.commandsGroup("HTTP 402 Payments (require --connection-secret):");
program.commandsGroup("HTTP 402 Payments (requires wallet connection):");
registerFetch402Command(program);

// Register setup commands
Expand Down
Loading