opensea-cli 0.1.6 → 0.2.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/package.json CHANGED
@@ -1,49 +1,10 @@
1
1
  {
2
2
  "name": "opensea-cli",
3
- "version": "0.1.6",
4
- "type": "module",
5
- "description": "OpenSea CLI - Query the OpenSea API from the command line or programmatically",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "bin": {
9
- "opensea": "dist/cli.js"
10
- },
11
- "files": [
12
- "dist"
13
- ],
3
+ "version": "0.2.0",
4
+ "description": "This package has moved to @opensea/cli",
14
5
  "scripts": {
15
- "build": "tsup",
16
- "dev": "tsup --watch",
17
- "format": "biome format --write .",
18
- "format:check": "biome format .",
19
- "lint": "biome check .",
20
- "lint:fix": "biome check --fix .",
21
- "type-check": "tsc --noEmit",
22
- "test": "vitest run",
23
- "prepublishOnly": "npm run build"
24
- },
25
- "dependencies": {
26
- "commander": "^12.1.0",
27
- "zod": "^3.24.0"
28
- },
29
- "devDependencies": {
30
- "@biomejs/biome": "^2.2.4",
31
- "@types/node": "^20.0.0",
32
- "@vitest/coverage-v8": "^3.2.4",
33
- "tsup": "^8.3.0",
34
- "typescript": "^5.8.3",
35
- "vitest": "^3.2.4"
36
- },
37
- "engines": {
38
- "node": ">=18.0.0"
6
+ "postinstall": "node postinstall.js"
39
7
  },
40
- "keywords": [
41
- "opensea",
42
- "nft",
43
- "cli",
44
- "api",
45
- "web3"
46
- ],
47
8
  "license": "MIT",
48
9
  "repository": {
49
10
  "type": "git",
package/postinstall.js ADDED
@@ -0,0 +1,11 @@
1
+ console.warn(`
2
+ ╔═══════════════════════════════════════════════════════════════╗
3
+ ║ ║
4
+ ║ You installed "opensea-cli" — this package has moved. ║
5
+ ║ ║
6
+ ║ Install the correct package: ║
7
+ ║ ║
8
+ ║ npm install -g @opensea/cli ║
9
+ ║ ║
10
+ ╚═══════════════════════════════════════════════════════════════╝
11
+ `)
package/LICENSE DELETED
@@ -1,7 +0,0 @@
1
- Copyright 2026 Ozone Networks, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md DELETED
@@ -1,343 +0,0 @@
1
- <p align="center">
2
- <img src="./img/banner.png" />
3
- </p>
4
-
5
- [![Version][version-badge]][version-link]
6
- [![npm][npm-badge]][npm-link]
7
- [![Test CI][ci-badge]][ci-link]
8
- [![License][license-badge]][license-link]
9
-
10
- # opensea-cli <!-- omit in toc -->
11
-
12
- Query the OpenSea API from the command line or programmatically. Designed for both AI agents and developers.
13
-
14
- ## Table of Contents
15
-
16
- - [Install](#install)
17
- - [Authentication](#authentication)
18
- - [CLI Usage](#cli-usage)
19
- - [Global Options](#global-options)
20
- - [Collections](#collections)
21
- - [NFTs](#nfts)
22
- - [Listings](#listings)
23
- - [Offers](#offers)
24
- - [Events](#events)
25
- - [Search](#search)
26
- - [Tokens](#tokens)
27
- - [Swaps](#swaps)
28
- - [Accounts](#accounts)
29
- - [Programmatic SDK](#programmatic-sdk)
30
- - [Output Formats](#output-formats)
31
- - [Examples](#examples)
32
- - [Exit Codes](#exit-codes)
33
- - [Requirements](#requirements)
34
-
35
- ## Install
36
-
37
- ```bash
38
- npm install -g opensea-cli
39
- ```
40
-
41
- Or use without installing:
42
-
43
- ```bash
44
- npx opensea-cli collections get mfers
45
- ```
46
-
47
- ## Authentication
48
-
49
- Set your API key via environment variable or flag:
50
-
51
- ```bash
52
- export OPENSEA_API_KEY=your-api-key
53
- opensea collections get mfers
54
-
55
- # or pass inline
56
- opensea --api-key your-api-key collections get mfers
57
- ```
58
-
59
- Get an API key at [docs.opensea.io](https://docs.opensea.io/reference/api-keys).
60
-
61
- ## CLI Usage
62
-
63
- ### Global Options
64
-
65
- ```
66
- --api-key <key> OpenSea API key (or set OPENSEA_API_KEY env var)
67
- --chain <chain> Default chain (default: ethereum)
68
- --format <format> Output format: json or table (default: json)
69
- --base-url <url> API base URL override
70
- ```
71
-
72
- ### Collections
73
-
74
- ```bash
75
- opensea collections get <slug>
76
- opensea collections list [--chain <chain>] [--order-by <field>] [--limit <n>]
77
- opensea collections stats <slug>
78
- opensea collections traits <slug>
79
- ```
80
-
81
- ### NFTs
82
-
83
- ```bash
84
- opensea nfts get <chain> <contract> <token-id>
85
- opensea nfts list-by-collection <slug> [--limit <n>]
86
- opensea nfts list-by-contract <chain> <contract> [--limit <n>]
87
- opensea nfts list-by-account <chain> <address> [--limit <n>]
88
- opensea nfts refresh <chain> <contract> <token-id>
89
- opensea nfts contract <chain> <address>
90
- ```
91
-
92
- ### Listings
93
-
94
- ```bash
95
- opensea listings all <collection> [--limit <n>]
96
- opensea listings best <collection> [--limit <n>]
97
- opensea listings best-for-nft <collection> <token-id>
98
- ```
99
-
100
- ### Offers
101
-
102
- ```bash
103
- opensea offers all <collection> [--limit <n>]
104
- opensea offers collection <collection> [--limit <n>]
105
- opensea offers best-for-nft <collection> <token-id>
106
- opensea offers traits <collection> --type <type> --value <value>
107
- ```
108
-
109
- ### Events
110
-
111
- ```bash
112
- opensea events list [--event-type <type>] [--chain <chain>] [--limit <n>]
113
- opensea events by-account <address> [--event-type <type>]
114
- opensea events by-collection <slug> [--event-type <type>]
115
- opensea events by-nft <chain> <contract> <token-id> [--event-type <type>]
116
- ```
117
-
118
- ### Search
119
-
120
- ```bash
121
- opensea search collections <query> [--chains <chains>] [--limit <n>]
122
- opensea search nfts <query> [--collection <slug>] [--chains <chains>] [--limit <n>]
123
- opensea search tokens <query> [--chain <chain>] [--limit <n>]
124
- opensea search accounts <query> [--limit <n>]
125
- ```
126
-
127
- ### Tokens
128
-
129
- ```bash
130
- opensea tokens trending [--chains <chains>] [--limit <n>] [--cursor <cursor>]
131
- opensea tokens top [--chains <chains>] [--limit <n>] [--cursor <cursor>]
132
- opensea tokens get <chain> <address>
133
- ```
134
-
135
- ### Swaps
136
-
137
- ```bash
138
- opensea swaps quote --from-chain <chain> --from-address <address> --to-chain <chain> --to-address <address> --quantity <quantity> --address <address> [--slippage <slippage>] [--recipient <recipient>]
139
- ```
140
-
141
- ### Accounts
142
-
143
- ```bash
144
- opensea accounts get <address>
145
- ```
146
-
147
- ## Programmatic SDK
148
-
149
- Use as a TypeScript/JavaScript library:
150
-
151
- ```typescript
152
- import { OpenSeaCLI } from "opensea-cli"
153
-
154
- const client = new OpenSeaCLI({ apiKey: process.env.OPENSEA_API_KEY })
155
-
156
- const collection = await client.collections.get("mfers")
157
- const stats = await client.collections.stats("mfers")
158
- const nfts = await client.nfts.listByCollection("mfers", { limit: 5 })
159
- const listings = await client.listings.best("mfers", { limit: 10 })
160
- const events = await client.events.byCollection("mfers", { eventType: "sale" })
161
- const account = await client.accounts.get("0x21130e908bba2d41b63fbca7caa131285b8724f8")
162
- const searchResults = await client.search.collections("mfers", { limit: 5 })
163
- ```
164
-
165
- ## Output Formats
166
-
167
- JSON (default) - structured output for agents and scripts:
168
-
169
- ```bash
170
- opensea collections get mfers
171
- ```
172
-
173
- Table - human-readable output:
174
-
175
- ```bash
176
- opensea --format table collections list --limit 5
177
- ```
178
-
179
- ## Examples
180
-
181
- Here are real-world examples using the [tiny dinos](https://opensea.io/collection/tiny-dinos-eth) and [mfers](https://opensea.io/collection/mfers) collections:
182
-
183
- ### Collections
184
-
185
- ```bash
186
- # Get collection details
187
- opensea collections get tiny-dinos-eth
188
-
189
- # List collections with a limit
190
- opensea collections list --limit 2
191
-
192
- # Get collection stats (volume, floor price, etc.)
193
- opensea collections stats tiny-dinos-eth
194
-
195
- # Get collection traits
196
- opensea collections traits tiny-dinos-eth
197
- ```
198
-
199
- ### NFTs
200
-
201
- ```bash
202
- # Get a specific NFT by chain/contract/token-id
203
- opensea nfts get ethereum 0xd9b78a2f1dafc8bb9c60961790d2beefebee56f4 1
204
-
205
- # List NFTs in a collection
206
- opensea nfts list-by-collection tiny-dinos-eth --limit 2
207
-
208
- # List NFTs by contract address
209
- opensea nfts list-by-contract ethereum 0xd9b78a2f1dafc8bb9c60961790d2beefebee56f4 --limit 2
210
-
211
- # List NFTs owned by an account
212
- opensea nfts list-by-account ethereum 0x21130e908bba2d41b63fbca7caa131285b8724f8 --limit 2
213
-
214
- # Get contract details
215
- opensea nfts contract ethereum 0xd9b78a2f1dafc8bb9c60961790d2beefebee56f4
216
-
217
- # Refresh NFT metadata
218
- opensea nfts refresh ethereum 0xd9b78a2f1dafc8bb9c60961790d2beefebee56f4 1
219
- ```
220
-
221
- ### Listings
222
-
223
- ```bash
224
- # Get all listings for a collection
225
- opensea listings all tiny-dinos-eth --limit 2
226
-
227
- # Get best (cheapest) listings
228
- opensea listings best tiny-dinos-eth --limit 2
229
-
230
- # Get the best listing for a specific NFT
231
- opensea listings best-for-nft mfers 3490
232
- ```
233
-
234
- ### Offers
235
-
236
- ```bash
237
- # Get all offers for a collection
238
- opensea offers all tiny-dinos-eth --limit 2
239
-
240
- # Get collection offers
241
- opensea offers collection tiny-dinos-eth --limit 2
242
-
243
- # Get best offer for a specific NFT
244
- opensea offers best-for-nft tiny-dinos-eth 1
245
-
246
- # Get trait offers (type and value are required)
247
- opensea offers traits tiny-dinos-eth --type background --value blue --limit 2
248
- ```
249
-
250
- ### Events
251
-
252
- ```bash
253
- # List recent events across all collections
254
- opensea events list --limit 2
255
-
256
- # Get events for a collection
257
- opensea events by-collection tiny-dinos-eth --limit 2
258
-
259
- # Get events for a specific NFT
260
- opensea events by-nft ethereum 0xd9b78a2f1dafc8bb9c60961790d2beefebee56f4 1 --limit 2
261
-
262
- # Get events for an account
263
- opensea events by-account 0x21130e908bba2d41b63fbca7caa131285b8724f8 --limit 2
264
- ```
265
-
266
- ### Search
267
-
268
- ```bash
269
- # Search for collections
270
- opensea search collections mfers
271
-
272
- # Search for NFTs
273
- opensea search nfts "cool cat" --limit 5
274
-
275
- # Search for NFTs within a specific collection
276
- opensea search nfts "rare" --collection tiny-dinos-eth --limit 5
277
-
278
- # Search for tokens/currencies
279
- opensea search tokens eth --limit 5
280
-
281
- # Search for tokens on a specific chain
282
- opensea search tokens usdc --chain base --limit 5
283
-
284
- # Search for accounts
285
- opensea search accounts vitalik --limit 5
286
- ```
287
-
288
- ### Tokens
289
-
290
- ```bash
291
- # Get trending tokens
292
- opensea tokens trending --limit 2
293
-
294
- # Get trending tokens on a specific chain
295
- opensea tokens trending --chains base --limit 2
296
-
297
- # Get top tokens by 24-hour volume
298
- opensea tokens top --limit 2
299
-
300
- # Get top tokens on a specific chain
301
- opensea tokens top --chains base --limit 2
302
-
303
- # Get details for a specific token (DebtReliefBot on Base)
304
- opensea tokens get base 0x3ec2156d4c0a9cbdab4a016633b7bcf6a8d68ea2
305
- ```
306
-
307
- ### Swaps
308
-
309
- ```bash
310
- # Get a swap quote for USDC to DRB on Base
311
- opensea swaps quote \
312
- --from-chain base --from-address 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 \
313
- --to-chain base --to-address 0x3ec2156d4c0a9cbdab4a016633b7bcf6a8d68ea2 \
314
- --quantity 1000000 \
315
- --address 0x21130e908bba2d41b63fbca7caa131285b8724f8
316
- ```
317
-
318
- ### Accounts
319
-
320
- ```bash
321
- # Get account details
322
- opensea accounts get 0x21130e908bba2d41b63fbca7caa131285b8724f8
323
- ```
324
-
325
- ## Exit Codes
326
-
327
- - `0` - Success
328
- - `1` - API error
329
- - `2` - Authentication error
330
-
331
- ## Requirements
332
-
333
- - Node.js >= 18.0.0
334
- - OpenSea API key ([get one here](https://docs.opensea.io/reference/api-keys))
335
-
336
- [version-badge]: https://img.shields.io/github/package-json/v/ProjectOpenSea/opensea-cli
337
- [version-link]: https://github.com/ProjectOpenSea/opensea-cli/releases
338
- [npm-badge]: https://img.shields.io/npm/v/opensea-cli?color=red
339
- [npm-link]: https://www.npmjs.com/package/opensea-cli
340
- [ci-badge]: https://github.com/ProjectOpenSea/opensea-cli/actions/workflows/ci.yml/badge.svg
341
- [ci-link]: https://github.com/ProjectOpenSea/opensea-cli/actions/workflows/ci.yml
342
- [license-badge]: https://img.shields.io/github/license/ProjectOpenSea/opensea-cli
343
- [license-link]: https://github.com/ProjectOpenSea/opensea-cli/blob/main/LICENSE