@spectratools/assembly-cli 0.1.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +231 -0
  3. package/dist/cli.js +5211 -0
  4. package/package.json +40 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 spectra-the-bot
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,231 @@
1
+ # @spectra-the-bot/assembly-cli
2
+
3
+ Assembly governance CLI for the Abstract ecosystem. Built on [incur](https://github.com/wevm/incur).
4
+
5
+ The CLI is organized into 5 command groups:
6
+
7
+ - `proposals` — list/get/vote on governance proposals
8
+ - `council` — inspect council members and seats
9
+ - `forum` — browse governance forum posts
10
+ - `members` — inspect member registry and membership status
11
+ - `votes` — view vote history and proposal tallies
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pnpm add -g @spectra-the-bot/assembly-cli
17
+ ```
18
+
19
+ ## Configuration
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
72
+
73
+ ```bash
74
+ # List council members
75
+ assembly-cli council members [--status active|inactive|all]
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
+ ```
83
+
84
+ Examples:
85
+
86
+ ```bash
87
+ assembly-cli council members
88
+ assembly-cli council members --status all
89
+ assembly-cli council info 0xabc123...
90
+ assembly-cli council seats --status open
91
+ ```
92
+
93
+ ### Forum
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>
101
+
102
+ # Search forum posts
103
+ assembly-cli forum search <query>
104
+ ```
105
+
106
+ Examples:
107
+
108
+ ```bash
109
+ assembly-cli forum posts
110
+ assembly-cli forum posts --category governance
111
+ assembly-cli forum post post-123
112
+ assembly-cli forum search "delegate incentives"
113
+ ```
114
+
115
+ ### Members
116
+
117
+ ```bash
118
+ # List members
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>]
126
+ ```
127
+
128
+ Examples:
129
+
130
+ ```bash
131
+ assembly-cli members list
132
+ assembly-cli members list --role voter
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
140
+
141
+ ```bash
142
+ # Vote history
143
+ assembly-cli votes history [--voter <address>] [--proposal <id>]
144
+
145
+ # Proposal tally
146
+ assembly-cli votes tally <proposalId>
147
+ ```
148
+
149
+ Examples:
150
+
151
+ ```bash
152
+ assembly-cli votes history
153
+ assembly-cli votes history --voter 0xabc123...
154
+ assembly-cli votes history --proposal 42
155
+ assembly-cli votes tally 42
156
+ ```
157
+
158
+ ---
159
+
160
+ ## Output formats
161
+
162
+ ### Human-readable (default)
163
+
164
+ ```bash
165
+ assembly-cli proposals list
166
+ ```
167
+
168
+ ### JSON (agent/script-friendly)
169
+
170
+ ```bash
171
+ assembly-cli proposals list --format json
172
+ assembly-cli votes tally 42 --format json
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
+ }
231
+ ```