From 984c3a19d5e2f27b2d89551eb143cc833a45297b Mon Sep 17 00:00:00 2001 From: Yash Date: Sat, 21 Feb 2026 18:10:32 +0700 Subject: [PATCH 1/2] add npm publishing to release workflow - remove private flag from package.json - add build:npm script and files field - add npm publish job using OIDC trusted publishing - keep existing binary release jobs unchanged --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++-- package.json | 9 +++++++-- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b5320e..8431fcb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,10 @@ on: tags: - 'v*' +permissions: + id-token: write + contents: write + jobs: build: name: Build binaries @@ -51,8 +55,6 @@ jobs: name: Create release needs: build runs-on: ubuntu-latest - permissions: - contents: write steps: - name: Checkout code @@ -79,3 +81,33 @@ jobs: prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish: + name: Publish to npm + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '24' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: bun install + + - name: Build for npm + run: bun run build:npm + + - name: Verify npm version + run: npm --version + + - name: Publish + run: npm publish --access public diff --git a/package.json b/package.json index 7d8b082..5f8287e 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,15 @@ "version": "1.6.1", "module": "src/index.ts", "type": "module", - "private": true, "description": "Fast code intelligence for AI agents. Query symbols, dependencies, and references without reading files.", "bin": { - "dora": "./src/index.ts" + "dora": "./dist/index.js" }, + "files": [ + "dist/index.js", + "README.md", + "LICENSE" + ], "author": { "name": "butttons" }, @@ -16,6 +20,7 @@ "test": "bun test ./test/", "type-check": "tsc", "build": "bun build src/index.ts --compile --outfile dist/dora", + "build:npm": "bun build src/index.ts --outfile dist/index.js --target bun", "generate-proto": "protoc --plugin=./node_modules/.bin/protoc-gen-es --es_out=src/converter --es_opt=target=ts --proto_path=src/proto src/proto/scip.proto", "biome:format": "biome format --write ./src", "build:linux": "bun build src/index.ts --compile --target=bun-linux-x64 --outfile dist/dora-linux-x64", From 9fb4d226cb8fda5bbe7d089f2e1faddfc23405c0 Mon Sep 17 00:00:00 2001 From: Yash Date: Sat, 21 Feb 2026 18:15:56 +0700 Subject: [PATCH 2/2] add npm install option to README and docs site - add Option 2 (npm) to README, bump build from source to Option 3 - add npm option to docs.astro installation section - add npm to QuickStart.astro platform selector as default --- README.md | 16 +++++++++++++++- docs/src/components/QuickStart.astro | 15 ++++++++++----- docs/src/pages/docs.astro | 26 +++++++++++++++++++++++++- 3 files changed, 50 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 194b893..eb9832c 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,21 @@ sudo mv dora /usr/local/bin/ # Download dora-windows-x64.exe and add to PATH ``` -### Option 2: Build from Source +### Option 2: Install via npm + +Requires [Bun](https://bun.sh) runtime installed. + +```bash +bun install -g @butttons/dora +``` + +Or run without installing: + +```bash +bunx @butttons/dora +``` + +### Option 3: Build from Source ```bash # Install Bun (if not already installed) diff --git a/docs/src/components/QuickStart.astro b/docs/src/components/QuickStart.astro index e911fd7..b42715c 100644 --- a/docs/src/components/QuickStart.astro +++ b/docs/src/components/QuickStart.astro @@ -1,5 +1,9 @@ --- const platformConfigs = { + npm: { + install: `# Install globally (requires Bun) +bun install -g @butttons/dora`, + }, "macos-arm": { install: `curl -L https://github.com/butttons/dora/releases/latest/download/dora-darwin-arm64 -o dora chmod +x dora @@ -113,10 +117,11 @@ bundle install`, id="platform-select" class="w-full bg-zinc-900 border border-zinc-800 text-zinc-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:border-blue-500 transition-colors" > - - - - + + + + + @@ -193,7 +198,7 @@ bundle install`, return "windows"; } - return "macos-arm"; + return "npm"; } function updateInstallCommands() { diff --git a/docs/src/pages/docs.astro b/docs/src/pages/docs.astro index d33ed8a..99e71d3 100644 --- a/docs/src/pages/docs.astro +++ b/docs/src/pages/docs.astro @@ -156,7 +156,31 @@ import Layout from "../layouts/Layout.astro";

- Option 2: Build from Source + Option 2: Install via npm +

+

+ Requires Bun runtime installed. +

+
+
# Install globally
+
+ bun install -g @butttons/dora +
+
# Or run without installing
+
+ bunx @butttons/dora +
+
+ +

+ Option 3: Build from Source