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
53 changes: 53 additions & 0 deletions .github/workflows/publish-installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Publishes the install scripts to get.valyu.ai whenever they change on main.
# The scripts are served from an S3 bucket behind CloudFront; this repo's
# install.sh / install.ps1 remain the source of truth, and the
# raw.githubusercontent.com URLs keep working as before.
name: Publish installer

on:
push:
branches: [main]
paths:
- install.sh
- install.ps1

permissions: {}

jobs:
publish:
runs-on: blacksmith-2vcpu-ubuntu-2404
permissions:
contents: read
id-token: write # OIDC token exchange with AWS; no stored credentials
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

# Pin to SHA: aws-actions/configure-aws-credentials@v4.3.1
- uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a
with:
role-to-assume: arn:aws:iam::627665855519:role/valyu-cli-installer-publish
aws-region: us-east-1

# no-cache: script fixes propagate immediately, no CDN invalidation needed
- name: Upload install scripts
run: |
aws s3 cp install.sh s3://valyu-install-scripts/install.sh \
--content-type "text/x-shellscript" --cache-control "no-cache"
aws s3 cp install.ps1 s3://valyu-install-scripts/install.ps1 \
--content-type "text/plain" --cache-control "no-cache"

- name: Verify get.valyu.ai serves the published scripts
run: |
sleep 5
for pair in "install.sh|https://get.valyu.ai" "install.ps1|https://get.valyu.ai/install.ps1"; do
file="${pair%%|*}"; url="${pair##*|}"
served=$(curl -fsSL "$url" | shasum -a 256 | cut -d' ' -f1)
local_sum=$(shasum -a 256 "$file" | cut -d' ' -f1)
if [ "$served" != "$local_sum" ]; then
echo "Mismatch for $file: served=$served local=$local_sum"
exit 1
fi
echo "OK: $url matches $file"
done
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ jobs:

**cURL (macOS / Linux)**
```sh
curl -fsSL https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.sh | bash
curl -fsSL https://get.valyu.ai | bash
```

**Node.js**
Expand All @@ -181,7 +181,7 @@ jobs:

**PowerShell (Windows)**
```sh
irm https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.ps1 | iex
irm https://get.valyu.ai/install.ps1 | iex
```
files: |
dist/valyu-darwin-arm64.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Built for AI (or human) knowledge workers.
### cURL (macOS / Linux)

```sh
curl -fsSL https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.sh | bash
curl -fsSL https://get.valyu.ai | bash
```

### Node.js
Expand All @@ -36,7 +36,7 @@ brew install valyuAI/cli/valyu
### PowerShell (Windows)

```sh
irm https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.ps1 | iex
irm https://get.valyu.ai/install.ps1 | iex
```

Then authenticate:
Expand Down
2 changes: 1 addition & 1 deletion install.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Valyu CLI installer for Windows
# Usage: irm https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.ps1 | iex
# Usage: irm https://get.valyu.ai/install.ps1 | iex
$ErrorActionPreference = "Stop"

$Repo = "valyuAI/valyu-cli"
Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Valyu CLI installer
#
# Usage:
# curl -fsSL https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.sh | bash
# curl -fsSL https://get.valyu.ai | bash
#
# Install specific version:
# curl -fsSL https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.sh | bash -s -- v1.0.2
# curl -fsSL https://get.valyu.ai | bash -s -- v1.0.2
#
set -e

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@valyu/cli",
"version": "1.2.1",
"version": "1.2.2",
"description": "The search CLI for knowledge workers",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -38,7 +38,7 @@
"test": "vitest run",
"test:watch": "vitest",
"sync-skill-version": "node scripts/sync-skill-version.mjs",
"version": "pnpm run sync-skill-version && git add skills/valyu-cli/SKILL.md",
"version": "pnpm run sync-skill-version && git add skills/valyu-cli/SKILL.md src/lib/version.ts",
"prepublishOnly": "pnpm run sync-skill-version && pnpm build && pnpm typecheck && pnpm test",
"prepack": "pnpm run sync-skill-version && pnpm build"
},
Expand Down
9 changes: 9 additions & 0 deletions scripts/sync-skill-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ content = content.replace(/version: "[^"]*"/, `version: "${version}"`);

writeFileSync(skillPath, content);
console.log(`Synced SKILL.md version to ${version}`);

// Keep the runtime version constant in lockstep with package.json - it is
// what `valyu --version` reports from pkg-compiled binaries.
const versionTsPath = './src/lib/version.ts';
const versionTs = readFileSync(versionTsPath, 'utf-8');
const updated = versionTs.replace(/VERSION = '[^']*'/, `VERSION = '${version}'`);

writeFileSync(versionTsPath, updated);
console.log(`Synced version.ts to ${version}`);
2 changes: 1 addition & 1 deletion skills/valyu-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: >
license: MIT
metadata:
author: valyu
version: "1.2.0"
version: "1.2.2"
homepage: https://valyu.ai
source: https://github.com/valyuAI/valyu-cli
inputs:
Expand Down
6 changes: 2 additions & 4 deletions src/lib/install-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,11 @@ export function upgradeCommandFor(source: InstallSource): UpgradeCommand {
case 'binary':
if (source.location === 'windows') {
return {
command:
'iwr https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.ps1 -UseBasicParsing | iex',
command: 'iwr https://get.valyu.ai/install.ps1 -UseBasicParsing | iex',
};
}
return {
command:
'curl -fsSL https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.sh | bash',
command: 'curl -fsSL https://get.valyu.ai | bash',
};
case 'dev':
return {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const VERSION = '1.2.0';
export const VERSION = '1.2.2';
export const PACKAGE_NAME = '@valyu/cli';