# Where Is the Pi Runtime Executable Located in the Feynman Project?

> Find the Pi runtime executable in the Feynman project at node_modules/@earendil-works/pi-coding-agent/bin/pi. Learn how npm install and package.json define its location.

- Repository: [Advait Paliwal/feynman](https://github.com/advaitpaliwal/feynman)
- Tags: faq
- Published: 2026-09-08

---

**The Pi runtime executable is located at `node_modules/@earendil-works/pi-coding-agent/bin/pi` (or [`pi.js`](https://github.com/advaitpaliwal/feynman/blob/main/pi.js) on Windows) after running `npm install`, as defined by the dependency declared in [`package.json`](https://github.com/advaitpaliwal/feynman/blob/main/package.json) and invoked by the Feynman CLI wrapper at [`bin/feynman.js`](https://github.com/advaitpaliwal/feynman/blob/main/bin/feynman.js).**

The Feynman project by Advait Paliwal leverages the Pi coding agent to power AI-driven sub-agents for automated software engineering tasks. Understanding the Pi runtime executable location is essential for debugging, custom scripting, and direct invocation outside the standard CLI workflow. This guide maps the exact file paths and dependency chain that bring the Pi binary into the Feynman environment.

## How the Pi Runtime Is Distributed via NPM

The Pi runtime is **not** committed directly to the Feynman source repository. Instead, it is distributed as a **Node.js module** through the `@earendil-works/pi-coding-agent` package. When you install Feynman’s dependencies, NPM fetches this package and places its executable in the local `node_modules` directory.

- **Package name:** `@earendil-works/pi-coding-agent`
- **Registry:** NPM (specified in [`package.json`](https://github.com/advaitpaliwal/feynman/blob/main/package.json))
- **Installation trigger:** `npm install` or `npm ci`

According to the repository’s [`package.json`](https://github.com/advaitpaliwal/feynman/blob/main/package.json), this package is listed as a dependency, ensuring the Pi runtime is available whenever the project is initialized.

## Exact File Path to the Pi Executable

Once installation completes, the Pi runtime executable resides at a predictable path within the `node_modules` hierarchy. This location follows standard Node.js conventions for package binaries.

**Primary executable path:**

```bash
node_modules/@earendil-works/pi-coding-agent/bin/pi

```

**Windows-compatible path:**

```bash
node_modules/@earendil-works/pi-coding-agent/bin/pi.js

```

The file at `bin/pi` is a JavaScript entry point (or a shell script wrapper) that initializes the Pi coding agent environment. Because `node_modules` is typically excluded from version control via `.gitignore`, this executable only exists on your local filesystem after dependency installation.

## How Feynman Invokes the Pi Runtime

The Feynman CLI acts as a wrapper that spawns the Pi runtime to execute agentic tasks. The invocation chain follows this flow:

1. **Entry point:** [`bin/feynman.js`](https://github.com/advaitpaliwal/feynman/blob/main/bin/feynman.js) receives user commands
2. **CLI logic:** [`src/cli.ts`](https://github.com/advaitpaliwal/feynman/blob/main/src/cli.ts) processes arguments and prepares the execution context
3. **Runtime spawn:** The CLI resolves the path to `node_modules/@earendil-works/pi-coding-agent/bin/pi` and spawns the process

**Example invocation from [`bin/feynman.js`](https://github.com/advaitpaliwal/feynman/blob/main/bin/feynman.js):**

```javascript
const { spawn } = require('child_process');
const path = require('path');

const piPath = path.join(__dirname, '..', 'node_modules', '@earendil-works', 'pi-coding-agent', 'bin', 'pi');
const piProcess = spawn('node', [piPath, ...process.argv.slice(2)], {
  stdio: 'inherit',
  env: process.env
});

```

This architecture allows Feynman to abstract Pi’s initialization while maintaining direct access to the underlying runtime for advanced users.

## Verifying Your Installation

To confirm the Pi runtime is present and locate the exact path on your system, run these commands in the project root:

**Check if the binary exists:**

```bash
ls -la node_modules/@earendil-works/pi-coding-agent/bin/

```

**Validate the dependency tree:**

```bash
npm list @earendil-works/pi-coding-agent

```

**Direct execution test:**

```bash
node ./node_modules/@earendil-works/pi-coding-agent/bin/pi --help

```

If these commands return file paths or version numbers, the Pi runtime is correctly installed and accessible.

## Troubleshooting Missing Executable Issues

If the `bin/pi` file is absent, the most common causes relate to incomplete installations or path resolution errors.

**Reinstall dependencies:**

```bash
rm -rf node_modules package-lock.json
npm install

```

**Check for nested installations:**
In monorepo setups, the executable might reside in a parent or workspace `node_modules` directory. Adjust relative paths in [`src/cli.ts`](https://github.com/advaitpaliwal/feynman/blob/main/src/cli.ts) accordingly.

**Permission fixes:**
Ensure the binary has execute permissions on Unix systems:

```bash
chmod +x node_modules/@earendil-works/pi-coding-agent/bin/pi

```

## Summary

- The **Pi runtime executable** is provided by the `@earendil-works/pi-coding-agent` NPM package, not stored in the Feynman repository itself.
- After installation, the executable is located at **`node_modules/@earendil-works/pi-coding-agent/bin/pi`** (or [`pi.js`](https://github.com/advaitpaliwal/feynman/blob/main/pi.js) on Windows platforms).
- **[`bin/feynman.js`](https://github.com/advaitpaliwal/feynman/blob/main/bin/feynman.js)** serves as the wrapper that locates and spawns the Pi runtime, with orchestration logic defined in **[`src/cli.ts`](https://github.com/advaitpaliwal/feynman/blob/main/src/cli.ts)**.
- Always run **`npm install`** before attempting to execute Pi commands, as the `node_modules` directory is excluded from Git version control.

## Frequently Asked Questions

### Is the Pi executable committed to the Feynman GitHub repository?

No. Like standard Node.js projects, Feynman excludes the `node_modules` directory via `.gitignore`. The Pi runtime is installed dynamically when you run `npm install`, pulling the binary from the `@earendil-works/pi-coding-agent` package on the NPM registry.

### Can I run the Pi runtime without installing the full Feynman project?

Yes. You can install the Pi coding agent independently via `npm install -g @earendil-works/pi-coding-agent`. However, using Feynman’s wrapper at [`bin/feynman.js`](https://github.com/advaitpaliwal/feynman/blob/main/bin/feynman.js) provides additional context, environment configuration, and integration with Feynman-specific workflows that the standalone binary lacks.

### What is the difference between [`bin/feynman.js`](https://github.com/advaitpaliwal/feynman/blob/main/bin/feynman.js) and the Pi binary?

[`bin/feynman.js`](https://github.com/advaitpaliwal/feynman/blob/main/bin/feynman.js) is Feynman’s custom CLI entry point that handles argument parsing, configuration loading, and environment setup before delegating to the Pi runtime. The Pi binary at `node_modules/@earendil-works/pi-coding-agent/bin/pi` is the core engine that executes the AI agent logic and manages sub-processes.

### How do I update the Pi runtime to the latest version?

Modify the version string in [`package.json`](https://github.com/advaitpaliwal/feynman/blob/main/package.json) for the `@earendil-works/pi-coding-agent` dependency, then run `npm update @earendil-works/pi-coding-agent`. Alternatively, run `npm install @earendil-works/pi-coding-agent@latest` to fetch the newest release and update the lockfile automatically.