Where Is the Pi Runtime Executable Located in the Feynman Project?
The Pi runtime executable is located at node_modules/@earendil-works/pi-coding-agent/bin/pi (or pi.js on Windows) after running npm install, as defined by the dependency declared in package.json and invoked by the Feynman CLI wrapper at 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) - Installation trigger:
npm installornpm ci
According to the repository’s 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:
node_modules/@earendil-works/pi-coding-agent/bin/pi
Windows-compatible path:
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:
- Entry point:
bin/feynman.jsreceives user commands - CLI logic:
src/cli.tsprocesses arguments and prepares the execution context - Runtime spawn: The CLI resolves the path to
node_modules/@earendil-works/pi-coding-agent/bin/piand spawns the process
Example invocation from bin/feynman.js:
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:
ls -la node_modules/@earendil-works/pi-coding-agent/bin/
Validate the dependency tree:
npm list @earendil-works/pi-coding-agent
Direct execution test:
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:
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 accordingly.
Permission fixes: Ensure the binary has execute permissions on Unix systems:
chmod +x node_modules/@earendil-works/pi-coding-agent/bin/pi
Summary
- The Pi runtime executable is provided by the
@earendil-works/pi-coding-agentNPM package, not stored in the Feynman repository itself. - After installation, the executable is located at
node_modules/@earendil-works/pi-coding-agent/bin/pi(orpi.json Windows platforms). bin/feynman.jsserves as the wrapper that locates and spawns the Pi runtime, with orchestration logic defined insrc/cli.ts.- Always run
npm installbefore attempting to execute Pi commands, as thenode_modulesdirectory 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 provides additional context, environment configuration, and integration with Feynman-specific workflows that the standalone binary lacks.
What is the difference between bin/feynman.js and the Pi binary?
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 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.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →