@openfort/cli 0.1.0 → 0.1.2
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.
- package/README.md +94 -0
- package/package.json +13 -4
package/README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<div align="center">
|
|
5
|
+
<h4>
|
|
6
|
+
<a href="https://www.openfort.io/">
|
|
7
|
+
Website
|
|
8
|
+
</a>
|
|
9
|
+
<span> | </span>
|
|
10
|
+
<a href="https://www.openfort.io/docs/overview/building-with-cli">
|
|
11
|
+
Documentation
|
|
12
|
+
</a>
|
|
13
|
+
<span> | </span>
|
|
14
|
+
<a href="https://x.com/openfort_hq">
|
|
15
|
+
X
|
|
16
|
+
</a>
|
|
17
|
+
</h4>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
# Openfort CLI
|
|
21
|
+
|
|
22
|
+
[](LICENSE)
|
|
23
|
+
[](https://www.openfort.io/docs/overview/building-with-cli)
|
|
24
|
+
[](https://www.npmjs.org/package/@openfort/cli)
|
|
25
|
+
|
|
26
|
+
**Manage wallets, policies, and transactions from the terminal.** CLI for Openfort's wallet infrastructure.
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
- 💼 **Account Management** — create and list smart accounts
|
|
30
|
+
- 📜 **Contracts** — register and manage on-chain contracts
|
|
31
|
+
- ⚡ **Transactions** — send and estimate transactions
|
|
32
|
+
- 🔐 **Session Keys** — create and manage session keys
|
|
33
|
+
- 💸 **Gas Sponsorship** — configure policies and sponsorship rules
|
|
34
|
+
- 👥 **Users** — manage users and wallet keys
|
|
35
|
+
- 🔒 **Shield** — wallet encryption and recovery
|
|
36
|
+
- 🔔 **Subscriptions** — set up webhooks and event subscriptions
|
|
37
|
+
- 🤖 **AI-friendly** — works as an MCP tool for LLM agents
|
|
38
|
+
|
|
39
|
+
## Quick Start
|
|
40
|
+
|
|
41
|
+
### 1. Install
|
|
42
|
+
```bash
|
|
43
|
+
npm install -g @openfort/cli
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 2. Login
|
|
47
|
+
```bash
|
|
48
|
+
openfort login
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 3. Use
|
|
52
|
+
```bash
|
|
53
|
+
# List accounts
|
|
54
|
+
openfort accounts list
|
|
55
|
+
|
|
56
|
+
# Create a backend wallet
|
|
57
|
+
openfort accounts create --chainId 80002
|
|
58
|
+
|
|
59
|
+
# List policies
|
|
60
|
+
openfort policies list
|
|
61
|
+
|
|
62
|
+
# Send a transaction
|
|
63
|
+
openfort transactions create --policy <policy_id> --interactions '[...]'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Environment Variables
|
|
67
|
+
|
|
68
|
+
| Variable | Description |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `OPENFORT_API_KEY` | Secret API key (`sk_test_...` or `sk_live_...`) |
|
|
71
|
+
| `OPENFORT_WALLET_SECRET` | Wallet encryption secret |
|
|
72
|
+
| `OPENFORT_PUBLISHABLE_KEY` | Publishable key for client-side ops |
|
|
73
|
+
| `OPENFORT_BASE_URL` | Custom API base URL |
|
|
74
|
+
|
|
75
|
+
## Commands
|
|
76
|
+
|
|
77
|
+
| Command | Description |
|
|
78
|
+
|---|---|
|
|
79
|
+
| `login` | Authenticate with your Openfort API key |
|
|
80
|
+
| `accounts` | Create and manage smart accounts |
|
|
81
|
+
| `contracts` | Register and manage contracts |
|
|
82
|
+
| `paymasters` | Manage paymasters |
|
|
83
|
+
| `policies` | Configure gas policies |
|
|
84
|
+
| `sponsorship` | Set up gas sponsorship rules |
|
|
85
|
+
| `sessions` | Manage session keys |
|
|
86
|
+
| `subscriptions` | Set up webhooks and subscriptions |
|
|
87
|
+
| `transactions` | Send and estimate transactions |
|
|
88
|
+
| `users` | Manage users |
|
|
89
|
+
| `wallet-keys` | Manage wallet keys |
|
|
90
|
+
| `shield` | Wallet encryption and recovery |
|
|
91
|
+
|
|
92
|
+
## Documentation
|
|
93
|
+
|
|
94
|
+
For full documentation, visit [openfort.io/docs/overview/building-with-cli](https://www.openfort.io/docs/overview/building-with-cli).
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfort/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Openfort CLI — manage wallets, policies, and transactions from the terminal.",
|
|
5
|
+
"author": "Openfort (https://www.openfort.io)",
|
|
6
|
+
"bugs": "https://github.com/openfort-xyz/cli/issues",
|
|
7
|
+
"homepage": "https://github.com/openfort-xyz/cli#readme",
|
|
8
|
+
"repository": "github.com/openfort-xyz/cli.git",
|
|
5
9
|
"type": "module",
|
|
6
10
|
"bin": {
|
|
7
11
|
"openfort": "./dist/bin.js",
|
|
@@ -12,10 +16,12 @@
|
|
|
12
16
|
],
|
|
13
17
|
"main": "./dist/cli.js",
|
|
14
18
|
"dependencies": {
|
|
15
|
-
"@openfort/openfort-node": "^0.10.
|
|
16
|
-
"incur": "^0.3.
|
|
19
|
+
"@openfort/openfort-node": "^0.10.2",
|
|
20
|
+
"incur": "^0.3.2"
|
|
17
21
|
},
|
|
18
22
|
"devDependencies": {
|
|
23
|
+
"@changesets/changelog-github": "^0.5.1",
|
|
24
|
+
"@changesets/cli": "^2.29.7",
|
|
19
25
|
"@types/node": "latest",
|
|
20
26
|
"tsup": "^8.5.1",
|
|
21
27
|
"tsx": "^4.21.0",
|
|
@@ -25,6 +31,9 @@
|
|
|
25
31
|
"dev": "node --import tsx src/bin.ts",
|
|
26
32
|
"build": "tsup src/bin.ts src/cli.ts --format esm --clean",
|
|
27
33
|
"openfort": "node --import tsx src/bin.ts",
|
|
28
|
-
"skills": "pnpm openfort skills add"
|
|
34
|
+
"skills": "pnpm openfort skills add",
|
|
35
|
+
"changeset": "changeset",
|
|
36
|
+
"changeset:version": "changeset version",
|
|
37
|
+
"changeset:publish": "pnpm build && changeset publish"
|
|
29
38
|
}
|
|
30
39
|
}
|