Skip to content

Commit 229db1c

Browse files
ryanioclaude
andauthored
feat: rename package to @opensea/cli with stub redirect (#24)
Move from `opensea-cli` to the scoped `@opensea/cli` package name. The old `opensea-cli` name becomes a minimal stub that warns users to install `@opensea/cli` instead. Bumps version to 0.2.0. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 74df91c commit 229db1c

7 files changed

Lines changed: 45 additions & 11 deletions

File tree

.agents/rules.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,7 @@ All CI checks must pass before merging.
228228
### Publishing
229229

230230
- GitHub Actions workflow (`.github/workflows/npm-publish.yml`) publishes to npm on GitHub release.
231+
- **Dual-package publishing**: The workflow publishes two packages:
232+
1. `@opensea/cli` — the main package (from repo root).
233+
2. `opensea-cli` — a stub redirect package (from `packages/opensea-cli-stub/`) that warns users to install `@opensea/cli`. The stub publish uses `continue-on-error: true` since its version rarely changes.
234+
- Auth uses OIDC via `id-token: write` + `setup-node` with `registry-url` + `--provenance` flag. No npm token secret needed.

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,11 @@ jobs:
1616
with:
1717
node-version-file: .nvmrc
1818
registry-url: https://registry.npmjs.org/
19+
# Publish @opensea/cli
1920
- run: npm install
2021
- run: npm publish --provenance --access public
22+
23+
# Publish opensea-cli stub (skip if version already exists)
24+
- run: npm publish --provenance --access public
25+
working-directory: packages/opensea-cli-stub
26+
continue-on-error: true

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ Query the OpenSea API from the command line or programmatically. Designed for bo
3535
## Install
3636

3737
```bash
38-
npm install -g opensea-cli
38+
npm install -g @opensea/cli
3939
```
4040

4141
Or use without installing:
4242

4343
```bash
44-
npx opensea-cli collections get mfers
44+
npx @opensea/cli collections get mfers
4545
```
4646

4747
## Authentication
@@ -149,7 +149,7 @@ opensea accounts get <address>
149149
Use as a TypeScript/JavaScript library:
150150

151151
```typescript
152-
import { OpenSeaCLI } from "opensea-cli"
152+
import { OpenSeaCLI } from "@opensea/cli"
153153

154154
const client = new OpenSeaCLI({ apiKey: process.env.OPENSEA_API_KEY })
155155

@@ -335,8 +335,8 @@ opensea accounts get 0x21130e908bba2d41b63fbca7caa131285b8724f8
335335

336336
[version-badge]: https://img.shields.io/github/package-json/v/ProjectOpenSea/opensea-cli
337337
[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
338+
[npm-badge]: https://img.shields.io/npm/v/@opensea/cli?color=red
339+
[npm-link]: https://www.npmjs.com/package/@opensea/cli
340340
[ci-badge]: https://github.com/ProjectOpenSea/opensea-cli/actions/workflows/ci.yml/badge.svg
341341
[ci-link]: https://github.com/ProjectOpenSea/opensea-cli/actions/workflows/ci.yml
342342
[license-badge]: https://img.shields.io/github/license/ProjectOpenSea/opensea-cli

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "opensea-cli",
3-
"version": "0.1.6",
2+
"name": "@opensea/cli",
3+
"version": "0.2.0",
44
"type": "module",
55
"description": "OpenSea CLI - Query the OpenSea API from the command line or programmatically",
66
"main": "dist/index.js",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "opensea-cli",
3+
"version": "0.2.0",
4+
"description": "This package has moved to @opensea/cli",
5+
"scripts": {
6+
"postinstall": "node postinstall.js"
7+
},
8+
"license": "MIT",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/ProjectOpenSea/opensea-cli"
12+
}
13+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
`)

0 commit comments

Comments
 (0)