@highlightxyz/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.
- package/README.md +158 -0
- package/lib/index.js +3694 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# @highlightxyz/cli
|
|
2
|
+
|
|
3
|
+
Official command-line interface for the Highlight API. The `hl` binary is built
|
|
4
|
+
on `@highlightxyz/sdk`, so CLI operations use the same generated public
|
|
5
|
+
contract as TypeScript integrations.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
bun add --global @highlightxyz/cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Node.js 20 or later is supported.
|
|
14
|
+
|
|
15
|
+
## Authenticate
|
|
16
|
+
|
|
17
|
+
Create an API key in Highlight, then log in:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
hl auth login
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For CI and agents, prefer an environment variable:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
export HIGHLIGHT_API_KEY="hl_live_..."
|
|
27
|
+
hl auth status
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Named profiles and custom API URLs are supported:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
hl auth login --profile staging --api-url http://localhost:8787
|
|
34
|
+
hl collections list --profile staging
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Saved keys live in `~/.config/highlight/config.json` with mode `0600`.
|
|
38
|
+
`HIGHLIGHT_API_KEY`, `HIGHLIGHT_API_URL`, and `HIGHLIGHT_CONFIG_DIR` override
|
|
39
|
+
saved configuration.
|
|
40
|
+
|
|
41
|
+
## Collections
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
hl collections list
|
|
45
|
+
hl collections get <highlight-id>
|
|
46
|
+
hl collections create --input collection.json
|
|
47
|
+
hl collections deploy <highlight-id> --wait
|
|
48
|
+
hl collections deploy-status <highlight-id>
|
|
49
|
+
hl collections deploy-cancel <highlight-id>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Creation input uses the SDK's `collection.create` shape:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"name": "My Drop",
|
|
57
|
+
"description": "Created with the Highlight CLI",
|
|
58
|
+
"type": "OpenEdition",
|
|
59
|
+
"logoMediaId": "00000000-0000-0000-0000-000000000000",
|
|
60
|
+
"image": "https://assets.example/art.png",
|
|
61
|
+
"contract": {
|
|
62
|
+
"chainId": 84532,
|
|
63
|
+
"name": "My Drop",
|
|
64
|
+
"symbol": "DROP",
|
|
65
|
+
"standard": "ERC721"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Use `--input -` to read JSON from stdin.
|
|
71
|
+
|
|
72
|
+
## Sales
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
hl sales list <highlight-id>
|
|
76
|
+
hl sales create <highlight-id> --input sale.json
|
|
77
|
+
hl sales update <highlight-id> <sale-id> --input sale-update.json
|
|
78
|
+
hl sales delete <highlight-id> <sale-id>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Sale input uses the SDK's `collection.addSale` body shape:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"type": "FIXED_PRICE",
|
|
86
|
+
"accessMode": "PUBLIC",
|
|
87
|
+
"startAt": "2026-01-01T00:00:00.000Z",
|
|
88
|
+
"price": "0.01",
|
|
89
|
+
"currency": "ETH",
|
|
90
|
+
"maxPerTransaction": 5,
|
|
91
|
+
"maxPerWallet": 10,
|
|
92
|
+
"maxTotal": 100,
|
|
93
|
+
"paymentRecipient": "0x0000000000000000000000000000000000000001"
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The API enforces the collection functionality matrices. Unsupported
|
|
98
|
+
combinations, such as gated ranked auctions, return the canonical domain error.
|
|
99
|
+
Live public sale changes can return a transaction payload that requires a
|
|
100
|
+
wallet signature.
|
|
101
|
+
|
|
102
|
+
## Gates
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
hl gates list
|
|
106
|
+
hl gates get <gate-id>
|
|
107
|
+
hl gates create --input gate.json
|
|
108
|
+
hl gates update <gate-id> --input gate-update.json
|
|
109
|
+
hl gates delete <gate-id>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Gate JSON uses the SDK `gate.create` or `gate.update` body shape and supports
|
|
113
|
+
allowlists, token ownership, specific tokens, token attributes, currency
|
|
114
|
+
balances, and Farcaster follows.
|
|
115
|
+
|
|
116
|
+
## Contracts, tokens, and chains
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
hl contracts list
|
|
120
|
+
hl contracts get <contract-id>
|
|
121
|
+
|
|
122
|
+
hl tokens list <highlight-id>
|
|
123
|
+
hl tokens get <highlight-id> <token-id>
|
|
124
|
+
hl tokens owners <highlight-id> <token-id>
|
|
125
|
+
hl tokens facets <highlight-id>
|
|
126
|
+
hl tokens redrive <highlight-id>
|
|
127
|
+
|
|
128
|
+
hl chains list --testnet
|
|
129
|
+
hl chains system-contract 84532 MintManager
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Token reads and chain configuration are public and do not require credentials.
|
|
133
|
+
Contract queries and token reveal redrives require authentication.
|
|
134
|
+
|
|
135
|
+
## Media
|
|
136
|
+
|
|
137
|
+
```sh
|
|
138
|
+
hl media upload ./art.png
|
|
139
|
+
hl media upload ./generative-code.zip --kind directory
|
|
140
|
+
hl media get <media-id>
|
|
141
|
+
hl media publish <media-id>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Uploads wait for processing by default. Use `--no-wait` for asynchronous jobs.
|
|
145
|
+
|
|
146
|
+
## Automation
|
|
147
|
+
|
|
148
|
+
Pass `--json` anywhere in the command to receive stable machine-readable
|
|
149
|
+
output:
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
hl collections list --json
|
|
153
|
+
hl media upload ./art.png --json
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Errors are written to stderr and commands return non-zero exit codes.
|
|
157
|
+
|
|
158
|
+
Run `hl --help`, `hl collections --help`, or `hl media --help` for all options.
|