Streamline install paths and runtime bootstrap
This commit is contained in:
16
README.md
16
README.md
@@ -6,7 +6,6 @@
|
||||
<p align="center">The open source AI research agent.</p>
|
||||
<p align="center">
|
||||
<a href="https://feynman.is/docs"><img alt="Docs" src="https://img.shields.io/badge/docs-feynman.is-0d9668?style=flat-square" /></a>
|
||||
<a href="https://www.npmjs.com/package/@companion-ai/feynman"><img alt="npm" src="https://img.shields.io/npm/v/@companion-ai/feynman?style=flat-square" /></a>
|
||||
<a href="https://github.com/getcompanion-ai/feynman/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/getcompanion-ai/feynman?style=flat-square" /></a>
|
||||
</p>
|
||||
|
||||
@@ -16,21 +15,10 @@
|
||||
|
||||
```bash
|
||||
curl -fsSL https://feynman.is/install | bash
|
||||
```
|
||||
|
||||
```powershell
|
||||
# Windows
|
||||
irm https://feynman.is/install.ps1 | iex
|
||||
```
|
||||
|
||||
```bash
|
||||
# npm fallback
|
||||
npm install -g @companion-ai/feynman
|
||||
|
||||
# pnpm fallback
|
||||
# package manager fallback
|
||||
pnpm add -g @companion-ai/feynman
|
||||
|
||||
# bun fallback
|
||||
bun add -g @companion-ai/feynman
|
||||
```
|
||||
|
||||
@@ -108,7 +96,7 @@ Built on [Pi](https://github.com/badlogic/pi-mono) for the agent runtime, [alpha
|
||||
|
||||
```bash
|
||||
git clone https://github.com/getcompanion-ai/feynman.git
|
||||
cd feynman && npm install && npm run start
|
||||
cd feynman && pnpm install && pnpm start
|
||||
```
|
||||
|
||||
[Docs](https://feynman.is/docs) · [MIT License](LICENSE)
|
||||
|
||||
3
bin/feynman.js
Normal file → Executable file
3
bin/feynman.js
Normal file → Executable file
@@ -5,4 +5,5 @@ if (v[0] < 20) {
|
||||
console.error("upgrade: https://nodejs.org or nvm install 20");
|
||||
process.exit(1);
|
||||
}
|
||||
import("../dist/index.js");
|
||||
await import("../scripts/patch-embedded-pi.mjs");
|
||||
await import("../dist/index.js");
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
"build:native-bundle": "node ./scripts/build-native-bundle.mjs",
|
||||
"dev": "tsx src/index.ts",
|
||||
"prepack": "node ./scripts/prepare-runtime-workspace.mjs",
|
||||
"postinstall": "node ./scripts/patch-embedded-pi.mjs",
|
||||
"start": "tsx src/index.ts",
|
||||
"start:dist": "node ./bin/feynman.js",
|
||||
"test": "node --import tsx --test --test-concurrency=1 tests/*.test.ts",
|
||||
|
||||
@@ -57,7 +57,6 @@ This usually means the release exists, but not all platform bundles were uploade
|
||||
|
||||
Workarounds:
|
||||
- try again after the release finishes publishing
|
||||
- install via npm instead: npm install -g @companion-ai/feynman
|
||||
- install via pnpm instead: pnpm add -g @companion-ai/feynman
|
||||
- install via bun instead: bun add -g @companion-ai/feynman
|
||||
"@
|
||||
|
||||
@@ -232,7 +232,6 @@ This usually means the release exists, but not all platform bundles were uploade
|
||||
|
||||
Workarounds:
|
||||
- try again after the release finishes publishing
|
||||
- install via npm instead: npm install -g @companion-ai/feynman
|
||||
- install via pnpm instead: pnpm add -g @companion-ai/feynman
|
||||
- install via bun instead: bun add -g @companion-ai/feynman
|
||||
EOF
|
||||
|
||||
@@ -232,7 +232,6 @@ This usually means the release exists, but not all platform bundles were uploade
|
||||
|
||||
Workarounds:
|
||||
- try again after the release finishes publishing
|
||||
- install via npm instead: npm install -g @companion-ai/feynman
|
||||
- install via pnpm instead: pnpm add -g @companion-ai/feynman
|
||||
- install via bun instead: bun add -g @companion-ai/feynman
|
||||
EOF
|
||||
|
||||
@@ -57,7 +57,6 @@ This usually means the release exists, but not all platform bundles were uploade
|
||||
|
||||
Workarounds:
|
||||
- try again after the release finishes publishing
|
||||
- install via npm instead: npm install -g @companion-ai/feynman
|
||||
- install via pnpm instead: pnpm add -g @companion-ai/feynman
|
||||
- install via bun instead: bun add -g @companion-ai/feynman
|
||||
"@
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: Installation
|
||||
description: Install Feynman on macOS, Linux, or Windows using the one-line installer or npm.
|
||||
description: Install Feynman on macOS, Linux, or Windows using curl, pnpm, or bun.
|
||||
section: Getting Started
|
||||
order: 1
|
||||
---
|
||||
|
||||
Feynman ships as a standalone runtime bundle for macOS, Linux, and Windows, and as an npm package for environments where Node.js is already installed. The recommended approach is the one-line installer, which downloads a prebuilt native bundle with zero external runtime dependencies.
|
||||
Feynman ships as a standalone runtime bundle for macOS, Linux, and Windows, and as a package-manager install for environments where Node.js is already installed. The recommended approach is the one-line installer, which downloads a prebuilt native bundle with zero external runtime dependencies.
|
||||
|
||||
## One-line installer (recommended)
|
||||
|
||||
@@ -25,15 +25,9 @@ irm https://feynman.is/install.ps1 | iex
|
||||
|
||||
This installs the Windows runtime bundle under `%LOCALAPPDATA%\Programs\feynman`, adds its launcher to your user `PATH`, and lets you re-run the installer at any time to update.
|
||||
|
||||
## npm / npx
|
||||
## pnpm / bun
|
||||
|
||||
If you already have Node.js 20.18.1+ installed, you can install Feynman globally via npm:
|
||||
|
||||
```bash
|
||||
npm install -g @companion-ai/feynman
|
||||
```
|
||||
|
||||
`pnpm` and `bun` are supported as well:
|
||||
If you already have Node.js 20.18.1+ installed, you can install Feynman globally via `pnpm` or `bun`:
|
||||
|
||||
```bash
|
||||
pnpm add -g @companion-ai/feynman
|
||||
@@ -42,16 +36,12 @@ bun add -g @companion-ai/feynman
|
||||
|
||||
Or run it directly without installing:
|
||||
|
||||
```bash
|
||||
npx @companion-ai/feynman
|
||||
```
|
||||
|
||||
```bash
|
||||
pnpm dlx @companion-ai/feynman
|
||||
bunx @companion-ai/feynman
|
||||
```
|
||||
|
||||
The npm distribution ships the same core application but depends on Node.js being present on your system. The standalone installer is preferred because it bundles its own Node runtime and works without a separate Node installation.
|
||||
The package-manager distribution ships the same core application but depends on Node.js being present on your system. The standalone installer is preferred because it bundles its own Node runtime and works without a separate Node installation.
|
||||
|
||||
## Post-install setup
|
||||
|
||||
@@ -80,6 +70,6 @@ For contributing or running Feynman from source:
|
||||
```bash
|
||||
git clone https://github.com/getcompanion-ai/feynman.git
|
||||
cd feynman
|
||||
npm install
|
||||
npm run start
|
||||
pnpm install
|
||||
pnpm start
|
||||
```
|
||||
|
||||
@@ -36,6 +36,12 @@ const terminalCommands = [
|
||||
{ command: "feynman audit 2401.12345", description: "Paper claims vs. what the code actually does" },
|
||||
{ command: 'feynman replicate "chain-of-thought improves math"', description: "Replication plan, compute target, experiment execution" },
|
||||
]
|
||||
|
||||
const installCommands = [
|
||||
{ label: "curl", command: "curl -fsSL https://feynman.is/install | bash" },
|
||||
{ label: "pnpm", command: "pnpm add -g @companion-ai/feynman" },
|
||||
{ label: "bun", command: "bun add -g @companion-ai/feynman" },
|
||||
]
|
||||
---
|
||||
|
||||
<Layout title="Feynman — The open source AI research agent" active="home">
|
||||
@@ -51,15 +57,23 @@ const terminalCommands = [
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col items-center gap-4">
|
||||
<button
|
||||
id="install-cmd"
|
||||
class="group flex items-center gap-3 rounded-lg bg-muted px-4 py-2.5 font-mono text-sm transition-colors hover:bg-muted/80 cursor-pointer"
|
||||
>
|
||||
<span>curl -fsSL https://feynman.is/install | bash</span>
|
||||
<svg id="copy-icon" class="size-4 shrink-0 text-muted-foreground transition-colors group-hover:text-foreground" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
|
||||
<svg id="check-icon" class="hidden size-4 shrink-0 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path d="M20 6L9 17l-5-5"/></svg>
|
||||
</button>
|
||||
<div class="flex w-full max-w-3xl flex-col items-center gap-4">
|
||||
<div class="grid w-full gap-3 sm:grid-cols-3">
|
||||
{installCommands.map((entry) => (
|
||||
<button
|
||||
class="install-cmd group flex items-center justify-between gap-3 rounded-lg bg-muted px-4 py-3 text-left font-mono text-sm transition-colors hover:bg-muted/80 cursor-pointer"
|
||||
data-command={entry.command}
|
||||
aria-label={`Copy ${entry.label} install command`}
|
||||
>
|
||||
<div class="flex min-w-0 flex-col">
|
||||
<span class="text-xs uppercase tracking-[0.2em] text-muted-foreground">{entry.label}</span>
|
||||
<span class="truncate">{entry.command}</span>
|
||||
</div>
|
||||
<span class="install-copy shrink-0 text-muted-foreground transition-colors group-hover:text-foreground">Copy</span>
|
||||
<span class="install-check hidden shrink-0 text-primary">Copied</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<a href="/docs/getting-started/installation">
|
||||
@@ -198,22 +212,25 @@ const terminalCommands = [
|
||||
|
||||
<script is:inline>
|
||||
function initCopyBtn() {
|
||||
var btn = document.getElementById("install-cmd")
|
||||
if (btn && !btn._bound) {
|
||||
document.querySelectorAll(".install-cmd").forEach(function (btn) {
|
||||
if (btn._bound) return
|
||||
btn._bound = true
|
||||
btn.addEventListener("click", function () {
|
||||
navigator.clipboard.writeText("curl -fsSL https://feynman.is/install | bash").then(function () {
|
||||
var copyIcon = document.getElementById("copy-icon")
|
||||
var checkIcon = document.getElementById("check-icon")
|
||||
copyIcon.classList.add("hidden")
|
||||
checkIcon.classList.remove("hidden")
|
||||
var command = btn.getAttribute("data-command")
|
||||
if (!command) return
|
||||
navigator.clipboard.writeText(command).then(function () {
|
||||
var copyLabel = btn.querySelector(".install-copy")
|
||||
var checkLabel = btn.querySelector(".install-check")
|
||||
if (!copyLabel || !checkLabel) return
|
||||
copyLabel.classList.add("hidden")
|
||||
checkLabel.classList.remove("hidden")
|
||||
setTimeout(function () {
|
||||
copyIcon.classList.remove("hidden")
|
||||
checkIcon.classList.add("hidden")
|
||||
copyLabel.classList.remove("hidden")
|
||||
checkLabel.classList.add("hidden")
|
||||
}, 2000)
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
initCopyBtn()
|
||||
document.addEventListener("astro:after-swap", initCopyBtn)
|
||||
|
||||
Reference in New Issue
Block a user