From f4bb9e571237aaa6c605bafce252961b9ef404b8 Mon Sep 17 00:00:00 2001 From: SSNTPL Date: Sat, 2 May 2026 12:44:06 +0530 Subject: [PATCH 1/3] Use npm trusted publishing (drop NPM_TOKEN env) Trusted publishers authenticate via the GitHub Actions OIDC token (id-token: write is already set), so no long-lived NODE_AUTH_TOKEN secret is needed. --provenance is required and already in place. --- .github/workflows/publish.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 27ae629..b7589e6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,5 +21,3 @@ jobs: - run: npm ci - run: npm run build - run: npm publish --access public --provenance - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From f4d16793fe28135804ac58768b6a971fe10f5f0d Mon Sep 17 00:00:00 2001 From: SSNTPL Date: Sat, 2 May 2026 12:51:58 +0530 Subject: [PATCH 2/3] Fix build: prevent stale tsbuildinfo from skipping emit; tighten files - Move tsBuildInfoFile inside dist/ so 'rm -rf dist' clears it. Without this, tsc -b sees an up-to-date tsbuildinfo and emits nothing, resulting in a published tarball with no compiled commands. - Drop -b flag from build (no project references in use). - Drop oclif readme from prepack (manual README is curated). - Tighten files allowlist: only ship bin/run.js (not bin/dev.ts), dist, and the oclif manifest. --- package.json | 13 +++++-------- tsconfig.json | 3 ++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 3a0d5b4..8b418c0 100644 --- a/package.json +++ b/package.json @@ -25,21 +25,18 @@ "otper": "./bin/run.js" }, "files": [ - "/bin", - "/dist", - "/oclif.manifest.json", - "/README.md", - "/LICENSE" + "bin/run.js", + "dist", + "oclif.manifest.json" ], "engines": { "node": ">=18" }, "scripts": { - "build": "shx rm -rf dist && tsc -b", + "build": "shx rm -rf dist && tsc", "lint": "tsc --noEmit", - "prepack": "npm run build && oclif manifest && oclif readme", + "prepack": "npm run build && oclif manifest", "postpack": "shx rm -f oclif.manifest.json", - "version": "oclif readme && git add README.md", "dev": "tsx ./bin/dev.ts" }, "dependencies": { diff --git a/tsconfig.json b/tsconfig.json index 9d61dce..ca88951 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,8 @@ "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "incremental": true + "incremental": true, + "tsBuildInfoFile": "./dist/.tsbuildinfo" }, "include": ["src/**/*"], "exclude": ["node_modules", "dist", "test"] From bfdd45457b026c1f5c8877307fe70a9a63b074ed Mon Sep 17 00:00:00 2001 From: SSNTPL Date: Sun, 3 May 2026 14:33:53 +0530 Subject: [PATCH 3/3] Rename to unscoped 'otper-cli' for friction-free install Switching from @ssntpl/otper-cli to otper-cli so: - npm install -g otper-cli works (no scope to remember) - Publish doesn't require an org with 2FA enforcement - Bin name remains 'otper' Updates package.json name, README install/library examples, src/index.ts header comment, and drops --access public from publish workflow (unscoped packages are public by default). --- .github/workflows/publish.yml | 2 +- README.md | 16 ++++++++-------- package.json | 2 +- src/index.ts | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b7589e6..0ff35ce 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,4 +20,4 @@ jobs: cache: npm - run: npm ci - run: npm run build - - run: npm publish --access public --provenance + - run: npm publish --provenance diff --git a/README.md b/README.md index 52b2ce9..db80fe0 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # otper-cli -[![npm version](https://img.shields.io/npm/v/@ssntpl/otper-cli.svg)](https://www.npmjs.com/package/@ssntpl/otper-cli) -[![License](https://img.shields.io/npm/l/@ssntpl/otper-cli.svg)](LICENSE) +[![npm version](https://img.shields.io/npm/v/otper-cli.svg)](https://www.npmjs.com/package/otper-cli) +[![License](https://img.shields.io/npm/l/otper-cli.svg)](LICENSE) Command-line interface for [Otper](https://otper.com) — manage boards, lists, cards, labels, and comments from your terminal. Talks directly to the Otper GraphQL API and is also embeddable as a Node library. ```sh -npm install -g @ssntpl/otper-cli +npm install -g otper-cli otper auth:login otper board:search "taillog" otper card:list --list 119 @@ -29,13 +29,13 @@ otper card:list --list 119 Requires **Node.js 18+**. ```sh -npm install -g @ssntpl/otper-cli +npm install -g otper-cli ``` To use it programmatically in another Node project (no global install needed): ```sh -npm install @ssntpl/otper-cli +npm install otper-cli ``` ## Authentication @@ -203,10 +203,10 @@ otper card:move 1234 --to-list 138 --format silent && echo moved ## Library usage -`@ssntpl/otper-cli` doubles as a typed library. Useful for openclaw plugins and other Node integrations: +`otper-cli` doubles as a typed library. Useful for openclaw plugins and other Node integrations: ```ts -import { OtperClient, boards, cards, lists } from '@ssntpl/otper-cli'; +import { OtperClient, boards, cards, lists } from 'otper-cli'; const client = new OtperClient({ baseUrl: 'https://otper.com', @@ -226,7 +226,7 @@ await cards.moveCard(client, '36905', '120'); // → Done You can also load the user's saved config: ```ts -import { OtperClient, resolveConfig } from '@ssntpl/otper-cli'; +import { OtperClient, resolveConfig } from 'otper-cli'; const cfg = resolveConfig(); // throws if not authenticated const client = OtperClient.fromConfig(cfg); diff --git a/package.json b/package.json index 8b418c0..9ccf5bc 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@ssntpl/otper-cli", + "name": "otper-cli", "version": "0.1.0", "description": "Command-line interface for Otper boards (https://otper.com).", "author": "SSNTPL ", diff --git a/src/index.ts b/src/index.ts index c3d9c7c..9a9c7bf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,9 @@ /** - * Library entry point for embedding @ssntpl/otper-cli inside other Node apps + * Library entry point for embedding otper-cli inside other Node apps * (for example, openclaw plugins). * * Example: - * import { OtperClient, boards } from '@ssntpl/otper-cli'; + * import { OtperClient, boards } from 'otper-cli'; * const client = new OtperClient({ baseUrl: 'https://otper.com', token: '...' }); * const board = await boards.getBoard(client, '24'); */