@spectratools/assembly-cli 0.1.1 → 0.3.0
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 +47 -197
- package/dist/cli.js +953 -108
- package/package.json +19 -2
package/README.md
CHANGED
|
@@ -1,231 +1,81 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @spectratools/assembly-cli
|
|
2
2
|
|
|
3
|
-
Assembly governance
|
|
3
|
+
Assembly is the governance layer for protocols on the Abstract chain: it manages membership, council seats, proposals, forum participation, and treasury controls through onchain contracts. Abstract is an Ethereum L2 focused on consumer-facing apps and agent-friendly infrastructure. This CLI gives operators and agents one interface to query Assembly state, run checks, and power automation.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Learn more:
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- `forum` — browse governance forum posts
|
|
10
|
-
- `members` — inspect member registry and membership status
|
|
11
|
-
- `votes` — view vote history and proposal tallies
|
|
7
|
+
- Abstract site: https://abs.xyz
|
|
8
|
+
- Abstract docs: https://docs.abs.xyz
|
|
12
9
|
|
|
13
|
-
##
|
|
10
|
+
## Install
|
|
14
11
|
|
|
15
12
|
```bash
|
|
16
|
-
pnpm add -g @
|
|
13
|
+
pnpm add -g @spectratools/assembly-cli
|
|
17
14
|
```
|
|
18
15
|
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
Set environment variables before running commands:
|
|
22
|
-
|
|
23
|
-
| Variable | Required | Description |
|
|
24
|
-
|---|---|---|
|
|
25
|
-
| `ASSEMBLY_API_URL` | No | Base URL for the Assembly API (defaults to `https://api.assembly.abs.xyz`) |
|
|
26
|
-
| `ASSEMBLY_API_KEY` | No* | API key sent as `X-Api-Key` header |
|
|
27
|
-
| `ABSTRACT_WALLET_ADDRESS` | No | Default wallet address used by `members status` when `--address` is omitted |
|
|
28
|
-
|
|
29
|
-
\* Some deployments/endpoints may require an API key.
|
|
30
|
-
|
|
31
|
-
Example setup:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
export ASSEMBLY_API_URL="https://api.assembly.abs.xyz"
|
|
35
|
-
export ASSEMBLY_API_KEY="your_api_key"
|
|
36
|
-
export ABSTRACT_WALLET_ADDRESS="0x1234...abcd"
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Usage
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
assembly-cli <group> <command> [args] [options]
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Commands
|
|
48
|
-
|
|
49
|
-
### Proposals
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
# List proposals
|
|
53
|
-
assembly-cli proposals list [--status active|passed|rejected|all]
|
|
54
|
-
|
|
55
|
-
# Get one proposal
|
|
56
|
-
assembly-cli proposals get <id>
|
|
57
|
-
|
|
58
|
-
# Vote on a proposal
|
|
59
|
-
assembly-cli proposals vote <id> <for|against|abstain> [--reason "optional reason"]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Examples:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
assembly-cli proposals list
|
|
66
|
-
assembly-cli proposals list --status active
|
|
67
|
-
assembly-cli proposals get 42
|
|
68
|
-
assembly-cli proposals vote 42 for --reason "Supports treasury transparency improvements"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Council
|
|
16
|
+
## LLM / Agent Discovery
|
|
72
17
|
|
|
73
18
|
```bash
|
|
74
|
-
#
|
|
75
|
-
assembly-cli
|
|
76
|
-
|
|
77
|
-
# Get member details by address
|
|
78
|
-
assembly-cli council info <address>
|
|
79
|
-
|
|
80
|
-
# List council seats
|
|
81
|
-
assembly-cli council seats [--status open|filled|all]
|
|
82
|
-
```
|
|
19
|
+
# Emit machine-readable command metadata
|
|
20
|
+
assembly-cli --llms
|
|
83
21
|
|
|
84
|
-
|
|
22
|
+
# Register as a reusable local skill for agent runtimes
|
|
23
|
+
assembly-cli skills add
|
|
85
24
|
|
|
86
|
-
|
|
87
|
-
assembly-cli
|
|
88
|
-
assembly-cli council members --status all
|
|
89
|
-
assembly-cli council info 0xabc123...
|
|
90
|
-
assembly-cli council seats --status open
|
|
25
|
+
# Register as an MCP server entry
|
|
26
|
+
assembly-cli mcp add
|
|
91
27
|
```
|
|
92
28
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
# List forum posts
|
|
97
|
-
assembly-cli forum posts [--category governance|general|all]
|
|
98
|
-
|
|
99
|
-
# Get a forum post by id
|
|
100
|
-
assembly-cli forum post <id>
|
|
29
|
+
## Configuration
|
|
101
30
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
31
|
+
| Variable | Required | Description |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `ABSTRACT_RPC_URL` | No | Abstract RPC URL override (default from package client) |
|
|
34
|
+
| `ASSEMBLY_INDEXER_URL` | No | Optional member snapshot endpoint for `members list` (falls back to on-chain `Registered` events with a warning if unavailable) |
|
|
105
35
|
|
|
106
|
-
|
|
36
|
+
## Command Group Intent Summary
|
|
107
37
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
38
|
+
- `members` — Membership state, counts, and registry fee settings
|
|
39
|
+
- `council` — Seat occupancy, active council members, auction slots, and council params
|
|
40
|
+
- `forum` — Threads, comments, petitions, and petition participation checks
|
|
41
|
+
- `governance` — Proposal index/details, vote participation checks, governance params
|
|
42
|
+
- `treasury` — Treasury balance, whitelist checks, major-spend status, execution checks
|
|
43
|
+
- root commands (`status`, `health`) — Cross-contract snapshots for bots/monitors
|
|
114
44
|
|
|
115
|
-
|
|
45
|
+
## Usage
|
|
116
46
|
|
|
117
47
|
```bash
|
|
118
|
-
|
|
119
|
-
assembly-cli members list [--role council|voter|all]
|
|
120
|
-
|
|
121
|
-
# Get member details
|
|
122
|
-
assembly-cli members info <address>
|
|
123
|
-
|
|
124
|
-
# Check membership status
|
|
125
|
-
assembly-cli members status [--address <address>]
|
|
48
|
+
assembly-cli <group> <command> [args] [options]
|
|
126
49
|
```
|
|
127
50
|
|
|
128
|
-
Examples
|
|
51
|
+
## Agent-Oriented Examples
|
|
129
52
|
|
|
130
53
|
```bash
|
|
131
|
-
|
|
132
|
-
assembly-cli
|
|
133
|
-
assembly-cli members info 0xabc123...
|
|
134
|
-
assembly-cli members status --address 0xabc123...
|
|
135
|
-
# or uses ABSTRACT_WALLET_ADDRESS if set:
|
|
136
|
-
assembly-cli members status
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Votes
|
|
54
|
+
# 1) Agent startup snapshot: report system health in one call
|
|
55
|
+
assembly-cli status --json
|
|
140
56
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
assembly-cli votes history [--voter <address>] [--proposal <id>]
|
|
57
|
+
# 2) Verify whether an address can currently participate as council
|
|
58
|
+
assembly-cli council is-member 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --format json
|
|
144
59
|
|
|
145
|
-
#
|
|
146
|
-
|
|
147
|
-
|
|
60
|
+
# 3) Pull active member roster with relative activity timings
|
|
61
|
+
# Note: best results require ASSEMBLY_INDEXER_URL; if the indexer returns 404/unavailable,
|
|
62
|
+
# the CLI falls back to onchain Registered events and output may be slower or partial.
|
|
63
|
+
assembly-cli members list --json
|
|
148
64
|
|
|
149
|
-
|
|
65
|
+
# 4) Pre-vote automation: list proposals and fetch one in detail
|
|
66
|
+
assembly-cli governance proposals --format json
|
|
67
|
+
assembly-cli governance proposal 1 --json
|
|
150
68
|
|
|
151
|
-
|
|
152
|
-
assembly-cli
|
|
153
|
-
assembly-cli
|
|
154
|
-
assembly-cli votes history --proposal 42
|
|
155
|
-
assembly-cli votes tally 42
|
|
69
|
+
# 5) Treasury monitoring loop: balance + spend lock status
|
|
70
|
+
assembly-cli treasury balance --format json
|
|
71
|
+
assembly-cli treasury major-spend-status --json
|
|
156
72
|
```
|
|
157
73
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
## Output formats
|
|
161
|
-
|
|
162
|
-
### Human-readable (default)
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
assembly-cli proposals list
|
|
166
|
-
```
|
|
74
|
+
## Output Mode
|
|
167
75
|
|
|
168
|
-
|
|
76
|
+
All commands support structured JSON output for agents with either `--json` or `--format json`:
|
|
169
77
|
|
|
170
78
|
```bash
|
|
171
|
-
assembly-cli
|
|
172
|
-
assembly-cli
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
Example JSON envelope:
|
|
176
|
-
|
|
177
|
-
```json
|
|
178
|
-
{
|
|
179
|
-
"ok": true,
|
|
180
|
-
"data": [
|
|
181
|
-
{
|
|
182
|
-
"id": "42",
|
|
183
|
-
"title": "Treasury Reallocation",
|
|
184
|
-
"status": "active",
|
|
185
|
-
"proposer": "0xabc123...",
|
|
186
|
-
"votes": {
|
|
187
|
-
"for": 120,
|
|
188
|
-
"against": 35,
|
|
189
|
-
"abstain": 4
|
|
190
|
-
},
|
|
191
|
-
"startTime": "2026-03-01T12:00:00.000Z",
|
|
192
|
-
"endTime": "2026-03-03T12:00:00.000Z"
|
|
193
|
-
}
|
|
194
|
-
]
|
|
195
|
-
}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Example tally output (`votes tally`):
|
|
199
|
-
|
|
200
|
-
```json
|
|
201
|
-
{
|
|
202
|
-
"ok": true,
|
|
203
|
-
"data": {
|
|
204
|
-
"proposalId": "42",
|
|
205
|
-
"votesFor": 120,
|
|
206
|
-
"votesAgainst": 35,
|
|
207
|
-
"votesAbstain": 4,
|
|
208
|
-
"totalVotes": 159,
|
|
209
|
-
"breakdown": {
|
|
210
|
-
"for": "75.5%",
|
|
211
|
-
"against": "22.0%",
|
|
212
|
-
"abstain": "2.5%"
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
## Error handling
|
|
219
|
-
|
|
220
|
-
On request failures, commands return structured errors. Example:
|
|
221
|
-
|
|
222
|
-
```json
|
|
223
|
-
{
|
|
224
|
-
"ok": false,
|
|
225
|
-
"error": {
|
|
226
|
-
"code": "FETCH_ERROR",
|
|
227
|
-
"message": "Failed to fetch proposals: ...",
|
|
228
|
-
"retryable": true
|
|
229
|
-
}
|
|
230
|
-
}
|
|
79
|
+
assembly-cli forum threads --json
|
|
80
|
+
assembly-cli forum threads --format json
|
|
231
81
|
```
|