You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Force OpenClaw integration even if not auto-detected
41
24
bitrefill init --openclaw
42
25
```
43
26
44
-
After `init`, the stored key is picked up automatically -- no need to pass `--api-key` on every invocation.
27
+
```bash
28
+
bitrefill login --email you@example.com
29
+
bitrefill verify --code 123456
30
+
```
45
31
46
32
### OpenClaw + Telegram
47
33
48
34
If you use [OpenClaw](https://github.com/openclaw/openclaw) as your AI agent gateway (e.g. via Telegram), `bitrefill init` does extra work:
49
35
50
-
- Writes `BITREFILL_API_KEY` to `~/.openclaw/.env` (read by the gateway at activation)
51
-
- Adds an MCP server entry to `~/.openclaw/openclaw.json` using `${BITREFILL_API_KEY}` -- the config file never contains the actual key
36
+
- Adds an MCP server entry to `~/.openclaw/openclaw.json`
52
37
- Generates `~/.openclaw/skills/bitrefill/SKILL.md` so the agent knows about all available tools
53
38
54
39
After init, tell your Telegram bot: *"Search for Netflix gift cards on Bitrefill"*.
55
40
56
41
## Authentication
57
42
58
-
### API Key (recommended)
59
-
60
-
Generate an API key at [bitrefill.com/account/developers](https://www.bitrefill.com/account/developers). After running `bitrefill init`, the key is stored locally and used automatically.
43
+
### Sign in
61
44
62
-
You can also pass it explicitly:
45
+
Two steps. Use the emailed verification `--code`; add `--otp` if your account also requires a second factor (for example TOTP).
Key resolution priority: `--api-key` flag > `BITREFILL_API_KEY` env var > stored credentials file.
74
-
75
-
### OAuth
76
-
77
-
On first run without an API key, the CLI opens your browser for OAuth authorization. Credentials are stored in `~/.config/bitrefill-cli/`.
78
-
79
52
### Non-interactive / CI
80
53
81
-
In environments without a TTY (e.g. CI, Docker, scripts), or when `CI=true`, the CLI cannot complete browser-based OAuth. Use `bitrefill init` first, or pass `--api-key` / `BITREFILL_API_KEY`.
82
-
83
-
Node does not load `.env` files automatically. After editing `.env`, either export variables in your shell (`set -a && source .env && set +a` in bash/zsh) or pass `--api-key` on the command line.
54
+
In environments without a TTY (e.g. CI, Docker, scripts), ensure credentials are provided by your runtime and then run `bitrefill init`.
Generates Markdown from the MCP `tools/list` response: tool names, descriptions, parameter tables, JSON Schema, example `bitrefill …` invocations, and example MCP `tools/call` payloads. Intended for **CLAUDE.md**, **Cursor** rules, or **`.github/copilot-instructions.md`**.
111
82
112
83
-**stdout** by default, or **`-o` / `--output <file>`** to write a file.
113
-
- Uses the same auth as other commands (`--api-key`, `BITREFILL_API_KEY`, or OAuth).
114
-
- The generated **Connection** line shows a redacted MCP URL (`…/mcp/<API_KEY>`), not your real key.
84
+
- Uses the same auth as other commands.
85
+
- The generated **Connection** line shows a redacted MCP URL, not sensitive credentials.
115
86
116
87
```bash
117
-
export BITREFILL_API_KEY=YOUR_API_KEY
118
88
bitrefill llm-context -o BITREFILL-MCP.md
119
89
# or: bitrefill llm-context > BITREFILL-MCP.md
120
90
```
@@ -140,7 +110,7 @@ bitrefill list-orders
140
110
# List available commands
141
111
bitrefill --help
142
112
143
-
# Clear stored credentials
113
+
# Clear local login session
144
114
bitrefill logout
145
115
146
116
# Export tool docs for coding agents (see "LLM context" above)
0 commit comments