Streamline install paths and runtime bootstrap

This commit is contained in:
Advait Paliwal
2026-03-24 19:24:04 -07:00
parent 3ee6ff4199
commit cd85e875df
9 changed files with 47 additions and 56 deletions

View File

@@ -6,7 +6,6 @@
<p align="center">The open source AI research agent.</p> <p align="center">The open source AI research agent.</p>
<p align="center"> <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://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> <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> </p>
@@ -16,21 +15,10 @@
```bash ```bash
curl -fsSL https://feynman.is/install | bash curl -fsSL https://feynman.is/install | bash
```
```powershell # package manager fallback
# Windows
irm https://feynman.is/install.ps1 | iex
```
```bash
# npm fallback
npm install -g @companion-ai/feynman
# pnpm fallback
pnpm add -g @companion-ai/feynman pnpm add -g @companion-ai/feynman
# bun fallback
bun add -g @companion-ai/feynman 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 ```bash
git clone https://github.com/getcompanion-ai/feynman.git 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) [Docs](https://feynman.is/docs) · [MIT License](LICENSE)

3
bin/feynman.js Normal file → Executable file
View File

@@ -5,4 +5,5 @@ if (v[0] < 20) {
console.error("upgrade: https://nodejs.org or nvm install 20"); console.error("upgrade: https://nodejs.org or nvm install 20");
process.exit(1); process.exit(1);
} }
import("../dist/index.js"); await import("../scripts/patch-embedded-pi.mjs");
await import("../dist/index.js");

View File

@@ -34,7 +34,6 @@
"build:native-bundle": "node ./scripts/build-native-bundle.mjs", "build:native-bundle": "node ./scripts/build-native-bundle.mjs",
"dev": "tsx src/index.ts", "dev": "tsx src/index.ts",
"prepack": "node ./scripts/prepare-runtime-workspace.mjs", "prepack": "node ./scripts/prepare-runtime-workspace.mjs",
"postinstall": "node ./scripts/patch-embedded-pi.mjs",
"start": "tsx src/index.ts", "start": "tsx src/index.ts",
"start:dist": "node ./bin/feynman.js", "start:dist": "node ./bin/feynman.js",
"test": "node --import tsx --test --test-concurrency=1 tests/*.test.ts", "test": "node --import tsx --test --test-concurrency=1 tests/*.test.ts",

View File

@@ -57,7 +57,6 @@ This usually means the release exists, but not all platform bundles were uploade
Workarounds: Workarounds:
- try again after the release finishes publishing - 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 pnpm instead: pnpm add -g @companion-ai/feynman
- install via bun instead: bun add -g @companion-ai/feynman - install via bun instead: bun add -g @companion-ai/feynman
"@ "@

View File

@@ -232,7 +232,6 @@ This usually means the release exists, but not all platform bundles were uploade
Workarounds: Workarounds:
- try again after the release finishes publishing - 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 pnpm instead: pnpm add -g @companion-ai/feynman
- install via bun instead: bun add -g @companion-ai/feynman - install via bun instead: bun add -g @companion-ai/feynman
EOF EOF

View File

@@ -232,7 +232,6 @@ This usually means the release exists, but not all platform bundles were uploade
Workarounds: Workarounds:
- try again after the release finishes publishing - 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 pnpm instead: pnpm add -g @companion-ai/feynman
- install via bun instead: bun add -g @companion-ai/feynman - install via bun instead: bun add -g @companion-ai/feynman
EOF EOF

View File

@@ -57,7 +57,6 @@ This usually means the release exists, but not all platform bundles were uploade
Workarounds: Workarounds:
- try again after the release finishes publishing - 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 pnpm instead: pnpm add -g @companion-ai/feynman
- install via bun instead: bun add -g @companion-ai/feynman - install via bun instead: bun add -g @companion-ai/feynman
"@ "@

View File

@@ -1,11 +1,11 @@
--- ---
title: Installation 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 section: Getting Started
order: 1 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) ## 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. 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: If you already have Node.js 20.18.1+ installed, you can install Feynman globally via `pnpm` or `bun`:
```bash
npm install -g @companion-ai/feynman
```
`pnpm` and `bun` are supported as well:
```bash ```bash
pnpm add -g @companion-ai/feynman pnpm add -g @companion-ai/feynman
@@ -42,16 +36,12 @@ bun add -g @companion-ai/feynman
Or run it directly without installing: Or run it directly without installing:
```bash
npx @companion-ai/feynman
```
```bash ```bash
pnpm dlx @companion-ai/feynman pnpm dlx @companion-ai/feynman
bunx @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 ## Post-install setup
@@ -80,6 +70,6 @@ For contributing or running Feynman from source:
```bash ```bash
git clone https://github.com/getcompanion-ai/feynman.git git clone https://github.com/getcompanion-ai/feynman.git
cd feynman cd feynman
npm install pnpm install
npm run start pnpm start
``` ```

View File

@@ -36,6 +36,12 @@ const terminalCommands = [
{ command: "feynman audit 2401.12345", description: "Paper claims vs. what the code actually does" }, { 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" }, { 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"> <Layout title="Feynman — The open source AI research agent" active="home">
@@ -51,15 +57,23 @@ const terminalCommands = [
</p> </p>
</div> </div>
<div class="flex flex-col items-center gap-4"> <div class="flex w-full max-w-3xl flex-col items-center gap-4">
<button <div class="grid w-full gap-3 sm:grid-cols-3">
id="install-cmd" {installCommands.map((entry) => (
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" <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"
<span>curl -fsSL https://feynman.is/install | bash</span> data-command={entry.command}
<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> aria-label={`Copy ${entry.label} install command`}
<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 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"> <div class="flex items-center gap-3">
<a href="/docs/getting-started/installation"> <a href="/docs/getting-started/installation">
@@ -198,22 +212,25 @@ const terminalCommands = [
<script is:inline> <script is:inline>
function initCopyBtn() { function initCopyBtn() {
var btn = document.getElementById("install-cmd") document.querySelectorAll(".install-cmd").forEach(function (btn) {
if (btn && !btn._bound) { if (btn._bound) return
btn._bound = true btn._bound = true
btn.addEventListener("click", function () { btn.addEventListener("click", function () {
navigator.clipboard.writeText("curl -fsSL https://feynman.is/install | bash").then(function () { var command = btn.getAttribute("data-command")
var copyIcon = document.getElementById("copy-icon") if (!command) return
var checkIcon = document.getElementById("check-icon") navigator.clipboard.writeText(command).then(function () {
copyIcon.classList.add("hidden") var copyLabel = btn.querySelector(".install-copy")
checkIcon.classList.remove("hidden") var checkLabel = btn.querySelector(".install-check")
if (!copyLabel || !checkLabel) return
copyLabel.classList.add("hidden")
checkLabel.classList.remove("hidden")
setTimeout(function () { setTimeout(function () {
copyIcon.classList.remove("hidden") copyLabel.classList.remove("hidden")
checkIcon.classList.add("hidden") checkLabel.classList.add("hidden")
}, 2000) }, 2000)
}) })
}) })
} })
} }
initCopyBtn() initCopyBtn()
document.addEventListener("astro:after-swap", initCopyBtn) document.addEventListener("astro:after-swap", initCopyBtn)