From 68504c29ff1d5ab04fcb837927801590c38edb05 Mon Sep 17 00:00:00 2001 From: Christian Korndoerfer Date: Wed, 21 Oct 2026 00:01:22 +0200 Subject: [PATCH 1/3] CAP-4819 build: prepare publishing @perspective-software/cli to npm - package.json: drop private, publish publicly, add repository/homepage/keywords - clear dist/ before every build; stale files (the removed MCP code) were in the tarball - prepublishOnly runs typecheck and tests - Release workflow: publishes on a v* tag via npm trusted publishing (OIDC, no token) - README: install from npm, release steps Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ README.md | 8 +++++++- package.json | 24 ++++++++++++++++++++++-- 3 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bd3af31 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release + +# Publishes to npm when a version tag (v0.1.1, …) is pushed. Uses npm trusted +# publishing (OIDC): no npm token is stored in the repo. The trusted publisher +# is configured on npmjs.com under the package's Settings. +on: + push: + tags: ['v*'] + +permissions: + contents: read + id-token: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 24 + registry-url: https://registry.npmjs.org + # Trusted publishing needs npm 11.5.1 or newer. + - run: npm install -g npm@latest + - run: npm ci + - name: Tag matches package.json version + run: test "v$(node -p 'require(`./package.json`).version')" = "$GITHUB_REF_NAME" + - run: npm publish diff --git a/README.md b/README.md index 808ad44..673900d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Full docs: Requires Node.js ≥ 22.12. ```bash -npm install -g github:Perspective-Software/perspective-cli +npm install -g @perspective-software/cli perspective --help ``` @@ -88,3 +88,9 @@ Layout: `src/cli.ts` (entry) · `src/commands/*` (one file per command group) · When you add or change a command, update `SKILL.md` and the docs in `Perspective-Software/developer-docs` (`docs/cli/`) in the same change. + +## Releasing + +1. Bump the version: `npm version patch` (or `minor`). This commits and creates the `v…` tag. +2. `git push --follow-tags`. The Release workflow checks that the tag matches `package.json`, + runs typecheck and tests, and publishes to npm via trusted publishing (no npm token). diff --git a/package.json b/package.json index d066980..930455e 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,26 @@ "name": "@perspective-software/cli", "version": "0.1.0", "description": "Command-line interface for the Perspective External API", - "private": true, "license": "UNLICENSED", + "keywords": [ + "perspective", + "cli", + "funnels", + "agents", + "claude-code", + "skill" + ], + "homepage": "https://developers.perspective.co/cli/overview", + "repository": { + "type": "git", + "url": "git+https://github.com/Perspective-Software/perspective-cli.git" + }, + "bugs": { + "url": "https://github.com/Perspective-Software/perspective-cli/issues" + }, + "publishConfig": { + "access": "public" + }, "type": "module", "bin": { "perspective": "dist/cli.js" @@ -16,11 +34,13 @@ "node": ">=22.12.0" }, "scripts": { + "prebuild": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"", "build": "tsc -p tsconfig.build.json", "dev": "node --experimental-strip-types src/cli.ts", "typecheck": "tsc -p tsconfig.json --noEmit", "test": "vitest run", - "prepare": "npm run build" + "prepare": "npm run build", + "prepublishOnly": "npm run typecheck && npm test" }, "dependencies": { "commander": "^15.0.0" From b86a502edc778cb64c55eb3659018a0d6a19021d Mon Sep 17 00:00:00 2001 From: Christian Korndoerfer Date: Wed, 21 Oct 2026 00:10:32 +0200 Subject: [PATCH 2/3] CAP-4819 docs(readme): drop the releasing section Co-Authored-By: Claude Opus 5.5 --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 673900d..48c74fb 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,3 @@ Layout: `src/cli.ts` (entry) · `src/commands/*` (one file per command group) · When you add or change a command, update `SKILL.md` and the docs in `Perspective-Software/developer-docs` (`docs/cli/`) in the same change. - -## Releasing - -1. Bump the version: `npm version patch` (or `minor`). This commits and creates the `v…` tag. -2. `git push --follow-tags`. The Release workflow checks that the tag matches `package.json`, - runs typecheck and tests, and publishes to npm via trusted publishing (no npm token). From 9e67e2a1bdbc6f3ef0c8e83d701de3b687e1f2d0 Mon Sep 17 00:00:00 2001 From: Christian Korndoerfer Date: Wed, 21 Oct 2026 00:11:09 +0200 Subject: [PATCH 3/3] CAP-4819 chore: license under MIT Co-Authored-By: Claude Opus 5.5 --- LICENSE | 21 +++++++++++++++++++++ package.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..955f4f9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Perspective Software GmbH + +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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. diff --git a/package.json b/package.json index 930455e..a13f0a6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@perspective-software/cli", "version": "0.1.0", "description": "Command-line interface for the Perspective External API", - "license": "UNLICENSED", + "license": "MIT", "keywords": [ "perspective", "cli",