@lightning-tools/lt 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +97 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # `lt` — Lightning Tools CLI
2
+
3
+ Command-line interface for [Lightning Tools](https://lightningapi.tools). Manage credits and call pay-per-use AI tools directly from your terminal.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @lightning-tools/lt
9
+ ```
10
+
11
+ Requires Node.js 18+.
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ lt start
17
+ ```
18
+
19
+ Follow the prompts to buy credits and receive an API key. The key is saved to `~/.lightning-tools/config.json` automatically.
20
+
21
+ ## Commands
22
+
23
+ ### Account
24
+
25
+ | Command | Description |
26
+ |---|---|
27
+ | `lt start` | Buy credits and get an API key, or manage your existing account |
28
+ | `lt topup <quantity>` | Top up credits for your existing account |
29
+ | `lt set-key <key>` | Store an existing API key |
30
+ | `lt balance` | Show your current credit balance |
31
+
32
+ ### Tools
33
+
34
+ | Command | Description |
35
+ |---|---|
36
+ | `lt tools` | List all available tools |
37
+ | `lt run [name]` | Run a tool interactively with guided prompts |
38
+ | `lt <tool-name> --flag value` | Call a tool directly by name |
39
+
40
+ ## Using Tools
41
+
42
+ ### Interactive wizard
43
+
44
+ Run any tool without flags to get guided prompts:
45
+
46
+ ```bash
47
+ lt email-validator
48
+ lt run email-validator
49
+ ```
50
+
51
+ ### Direct flags
52
+
53
+ Pass all required flags to skip the wizard:
54
+
55
+ ```bash
56
+ lt email-validator --email hello@example.com
57
+ lt email-validator --email hello@example.com --pretty
58
+ ```
59
+
60
+ The `--pretty` flag pretty-prints JSON output for any tool.
61
+
62
+ Credits remaining are printed to stderr after each call.
63
+
64
+ ## Configuration
65
+
66
+ The CLI stores your API key at `~/.lightning-tools/config.json`.
67
+
68
+ You can also set the key via environment variable:
69
+
70
+ ```bash
71
+ export LIGHTNING_TOOLS_API_KEY=lt_yourkey
72
+ ```
73
+
74
+ ## Examples
75
+
76
+ ```bash
77
+ # Get started
78
+ lt start
79
+
80
+ # Check balance
81
+ lt balance
82
+
83
+ # See what tools are available
84
+ lt tools
85
+
86
+ # Validate an email address
87
+ lt email-validator --email user@example.com
88
+
89
+ # Validate a phone number
90
+ lt phone-validator --phone +447911123456
91
+
92
+ # Generate a QR code
93
+ lt qr-code --text "https://example.com"
94
+
95
+ # Top up 100 credits
96
+ lt topup 100
97
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightning-tools/lt",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "CLI for Lightning Tools — manage credits and call pay-per-use tools from the terminal",
5
5
  "bin": {
6
6
  "lt": "./dist/index.js"