Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- 'v*'

permissions:
id-token: write
contents: write

jobs:
build:
name: Build binaries
Expand Down Expand Up @@ -51,8 +55,6 @@ jobs:
name: Create release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout code
Expand All @@ -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
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 10 additions & 5 deletions docs/src/components/QuickStart.astro
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"
>
<option value="macos-arm">macOS (ARM)</option>
<option value="macos-intel">macOS (Intel)</option>
<option value="linux">Linux x64</option>
<option value="windows">Windows x64</option>
<option value="npm">npm (requires Bun)</option>
<option value="macos-arm">macOS (ARM) binary</option>
<option value="macos-intel">macOS (Intel) binary</option>
<option value="linux">Linux x64 binary</option>
<option value="windows">Windows x64 binary</option>
</select>
</div>
</div>
Expand Down Expand Up @@ -193,7 +198,7 @@ bundle install`,
return "windows";
}

return "macos-arm";
return "npm";
}

function updateInstallCommands() {
Expand Down
26 changes: 25 additions & 1 deletion docs/src/pages/docs.astro
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,31 @@ import Layout from "../layouts/Layout.astro";
</div>

<h3 class="text-xl font-semibold mb-4 text-blue-300">
Option 2: Build from Source
Option 2: Install via npm
</h3>
<p class="text-zinc-300 mb-4">
Requires <a
href="https://bun.sh"
target="_blank"
rel="noopener noreferrer"
class="text-blue-400 hover:underline">Bun</a
> runtime installed.
</p>
<div
class="bg-zinc-900/50 rounded-lg p-4 font-mono text-sm space-y-2 mb-8 overflow-x-auto"
>
<div class="text-zinc-500"># Install globally</div>
<div class="text-zinc-300">
bun install -g @butttons/dora
</div>
<div class="text-zinc-500 mt-3"># Or run without installing</div>
<div class="text-zinc-300">
bunx @butttons/dora
</div>
</div>

<h3 class="text-xl font-semibold mb-4 text-blue-300">
Option 3: Build from Source
</h3>
<div
class="bg-zinc-900/50 rounded-lg p-4 font-mono text-sm space-y-2 mb-8 overflow-x-auto"
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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",
Expand Down