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/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/README.md b/README.md index 808ad44..48c74fb 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 ``` diff --git a/package.json b/package.json index d066980..a13f0a6 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", + "license": "MIT", + "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"