@bloque/cli 0.0.45

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 (3) hide show
  1. package/README.md +152 -0
  2. package/dist/bin.js +2371 -0
  3. package/package.json +49 -0
package/README.md ADDED
@@ -0,0 +1,152 @@
1
+ # @bloque/cli
2
+
3
+ Use Bloque from your AI agent. One command to set up, then just ask.
4
+
5
+ ## Get Started
6
+
7
+ ```bash
8
+ npx @bloque/cli setup
9
+ ```
10
+
11
+ That's it. The wizard logs you in, finds your AI agents, and configures everything. Restart your agent and you're ready.
12
+
13
+ ## What You Can Ask Your Agent
14
+
15
+ Once set up, talk to your agent like you would a financial assistant:
16
+
17
+ - **"Create a card for food expenses, load it with $200"**
18
+ - **"I need a one-time $25 card for this website"**
19
+ - **"Assign my card ending in 4532 to amazon.com"**
20
+ - **"Which card should I use for netflix.com?"**
21
+ - **"Show me my balances"**
22
+ - **"Top up my account with 100,000 COP from my bank"**
23
+ - **"Freeze my card"**
24
+ - **"What transactions happened this week?"**
25
+
26
+ Your agent handles the rest — creating accounts, issuing cards, moving money, and reporting back.
27
+
28
+ ## How It Works
29
+
30
+ The CLI installs an [MCP server](https://modelcontextprotocol.io/) that gives your AI agent access to 40 financial tools. When you ask your agent to create a card, it calls `create_card` behind the scenes — you never need to learn the tool names.
31
+
32
+ Every card is a **crypto card**: it automatically gets a virtual account (holds the balance) and a Polygon address (receives USDC). You can top up via crypto, PSE bank transfer, or internal transfer.
33
+
34
+ ## Supported Agents
35
+
36
+ | Agent | Platforms |
37
+ |-------|-----------|
38
+ | Cursor | macOS, Linux, Windows |
39
+ | Claude Desktop | macOS, Windows |
40
+ | Claude Code | macOS, Linux, Windows |
41
+ | Antigravity (Google) | macOS, Linux, Windows |
42
+
43
+ ## Commands
44
+
45
+ | Command | What it does |
46
+ |---------|-------------|
47
+ | `bloque setup` | Wizard: log in + install MCP in your agents |
48
+ | `bloque login` | Log in via WhatsApp/Email OTP or API key |
49
+ | `bloque logout` | Clear your local session |
50
+ | `bloque whoami` | Show who you're logged in as |
51
+ | `bloque mcp` | Start the MCP server (stdio) |
52
+ | `bloque mcp --http` | Start the MCP server over HTTP |
53
+
54
+ ### Options
55
+
56
+ **`bloque setup`** — `--jwt <token>` to skip OTP, `--sandbox` for sandbox environment.
57
+
58
+ **`bloque login`** — `--api-key <key> --origin <origin> --alias <alias>` for backend auth, `--sandbox` for sandbox.
59
+
60
+ **`bloque mcp`** — `--http` for HTTP transport, `--port <port>` to set port (default 3100).
61
+
62
+ ## Manual Setup
63
+
64
+ If you'd rather configure manually:
65
+
66
+ 1. Log in:
67
+
68
+ ```bash
69
+ npx @bloque/cli login
70
+ ```
71
+
72
+ 2. Add this to your agent's MCP config file:
73
+
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "bloque": {
78
+ "command": "npx",
79
+ "args": ["-y", "@bloque/cli", "mcp"]
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ 3. Restart your agent.
86
+
87
+ ## Tools Reference
88
+
89
+ <details>
90
+ <summary>Workflows — 14 high-level tools (click to expand)</summary>
91
+
92
+ | Tool | What it does |
93
+ |------|-------------|
94
+ | `get_profile` | Your identity and KYC status |
95
+ | `verify_identity` | Start or check KYC verification |
96
+ | `create_account` | Create a pocket + Polygon address |
97
+ | `create_card` | Full card setup with optional spending restrictions, website binding, and funding |
98
+ | `create_disposable_card` | One-time card with exact funded amount and optional website binding |
99
+ | `fund_card` | Top up a card |
100
+ | `resolve_card_for_website` | Find which card(s) to use for a given website |
101
+ | `assign_card_to_website` | Associate a card with one or more website domains |
102
+ | `topup_via_pse` | Load COP via PSE bank transfer |
103
+ | `cashout_to_bank` | Cash out USD to a Colombian bank |
104
+ | `configure_spending_rules` | Route transactions to different accounts by merchant type |
105
+ | `add_spending_category` | Add a spending category to a card |
106
+ | `wallet_overview` | All accounts, balances, and recent transactions |
107
+ | `card_summary` | Everything about a specific card |
108
+
109
+ </details>
110
+
111
+ <details>
112
+ <summary>Primitives — 26 low-level tools (click to expand)</summary>
113
+
114
+ | Domain | Tools |
115
+ |--------|-------|
116
+ | Accounts | `list_accounts`, `get_account`, `get_balance`, `get_all_balances` |
117
+ | Virtual | `create_virtual_account`, `list_virtual_accounts` |
118
+ | Cards | `create_raw_card`, `list_cards`, `freeze_card`, `activate_card`, `disable_card`, `update_card_metadata`, `rename_card` |
119
+ | Polygon | `create_polygon_account`, `list_polygon_accounts` |
120
+ | US Bank | `get_us_tos_link`, `create_us_account`, `list_us_accounts` |
121
+ | Transfers | `transfer`, `batch_transfer` |
122
+ | History | `list_transactions`, `list_account_movements` |
123
+ | Swap | `find_rates`, `list_pse_banks`, `create_pse_order`, `create_bank_transfer_order` |
124
+
125
+ </details>
126
+
127
+ <details>
128
+ <summary>Spending categories (click to expand)</summary>
129
+
130
+ Restrict cards with friendly names — no need to memorize MCC codes:
131
+
132
+ | Category | Examples |
133
+ |----------|---------|
134
+ | `food` | Grocery, restaurants, fast food |
135
+ | `transport` | Taxis, rideshare, gas, transit |
136
+ | `ads` | Advertising, SaaS |
137
+ | `entertainment` | Movies, streaming, events |
138
+ | `health` | Pharmacies, doctors, dentists |
139
+ | `shopping` | Department stores, clothing |
140
+ | `travel` | Airlines, hotels |
141
+ | `subscriptions` | Digital goods, streaming, games |
142
+
143
+ </details>
144
+
145
+ ## Requirements
146
+
147
+ - Node.js 22+ or Bun 1+
148
+ - A [Bloque](https://www.bloque.app) account
149
+
150
+ ## License
151
+
152
+ MIT