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
20 changes: 20 additions & 0 deletions .github/installer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"schemaVersion": 1,
"repo": "pablozaiden/link",
"installDir": "$HOME/.local/bin",
"binaries": [
{
"name": "link-cli",
"assetPrefix": "link-cli",
"postInstallMessage": "Run 'link-cli web' to start Link."
}
],
"checksums": {
"required": true,
"extension": ".sha256"
},
"platforms": {
"linux": ["x64", "arm64"],
"darwin": ["x64", "arm64"]
}
}
69 changes: 13 additions & 56 deletions .github/workflows/binary-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,18 @@ on:
- published

jobs:
build-binaries:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: linux-x64
- os: ubuntu-latest
target: linux-arm64
- os: macos-latest
target: darwin-x64
- os: macos-latest
target: darwin-arm64

runs-on: ${{ matrix.os }}
binaries:
uses: pablozaiden/installer/.github/workflows/reusable-binary-release.yml@f7315acbadbf0c7fc9f869b4f1e88daa925a4756
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Update package.json version
run: |
VERSION="${GITHUB_REF_NAME#v}"
jq --arg v "$VERSION" '.version = $v' package.json > package.json.tmp && mv package.json.tmp package.json

- name: Build web assets
run: bun run build

- name: Build standalone binary
run: bun run build-binary.ts --target=bun-${{ matrix.target }} --outfile=dist/link-cli-${{ github.ref_name }}-${{ matrix.target }}

- name: Generate checksum
working-directory: dist
run: shasum -a 256 link-cli-${{ github.ref_name }}-${{ matrix.target }} > link-cli-${{ github.ref_name }}-${{ matrix.target }}.sha256

- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: link-cli-${{ github.ref_name }}-${{ matrix.target }}
path: |
dist/link-cli-${{ github.ref_name }}-${{ matrix.target }}
dist/link-cli-${{ github.ref_name }}-${{ matrix.target }}.sha256
if-no-files-found: error

- name: Upload binary to release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ github.ref_name }} dist/link-cli-${{ github.ref_name }}-${{ matrix.target }} dist/link-cli-${{ github.ref_name }}-${{ matrix.target }}.sha256 --clobber
with:
prebuild_command: bun run build
binaries: |
[
{
"name": "link-cli",
"asset_prefix": "link-cli",
"build_command": "bun run build-binary.ts --target=$BUN_TARGET --outfile=dist/$ASSET_NAME",
Comment thread
PabloZaiden marked this conversation as resolved.
"output_path": "dist/$ASSET_NAME"
}
]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Link is a tool to track relationships between entities in an agent-friendly way.
Install the latest Linux or macOS binary release:

```bash
curl -fsSL https://raw.githubusercontent.com/pablozaiden/link/main/install.sh | sh
curl -fsSL https://raw.githubusercontent.com/pablozaiden/installer/v0.0.2/install.sh | sh -s -- pablozaiden/link
```

The installer downloads the latest release for your platform and installs it as `link-cli` in `$HOME/.local/bin`. If that directory is not on your `PATH`, the installer prints the shell profile line to add.
The shared installer reads Link's installer manifest, downloads the latest release for your platform, verifies its checksum, and installs it as `link-cli` in `$HOME/.local/bin`. If that directory is not on your `PATH`, the installer prints the shell profile line to add.

Installed binaries can check for or install release updates:

Expand Down
5 changes: 5 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

137 changes: 0 additions & 137 deletions install.sh

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.29.0",
"@pablozaiden/installer": "github:pablozaiden/installer#v0.0.2",
"bun-plugin-tailwind": "^0.1.2",
"react": "^19",
"react-dom": "^19",
Expand Down
3 changes: 1 addition & 2 deletions src/server/commands.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { GraphError } from "../domain/errors";
import { callGraphTool } from "../graph/tools";
import { JsonGraphRepository, validateGraphPath } from "../storage/json";
import { LINK_VERSION } from "../version";
import { loadConfig } from "./config";
import { runUpdateCommand } from "./update";
import {
Expand Down Expand Up @@ -33,7 +32,7 @@ export async function runCliCommand(command: CliCommand): Promise<number | undef
case "seed":
return runSeedCommand();
case "update":
return await runUpdateCommand(command, { currentVersion: LINK_VERSION });
return await runUpdateCommand(command);
case "graph-help":
console.log(formatGraphHelp());
return 0;
Expand Down
Loading