Skip to content

Latest commit

 

History

12,340 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

physicscode logo

physicscode

physicscode is an open source agentic AI coding environment for physics-focused software, simulations, analysis, and research engineering, built by PAI Dynamics.

Install

Install dependencies from the repository root:

bun install

Run the CLI/TUI locally:

bun run dev

Run the desktop app locally (Tauri, the primary desktop shell):

bun run dev:desktop

This requires the Rust toolchain and platform Tauri prerequisites — see packages/desktop/README.md and the Tauri prerequisites guide.

Build the downloadable desktop app:

cd packages/desktop
bun run tauri build

Packaged desktop artifacts are written under packages/desktop/src-tauri/target/release/bundle/ (per-platform subdirectories, e.g. dmg/, deb/, rpm/, nsis/).

An Electron build of the same UI also exists in packages/desktop-electron (bun run dev:desktop:electron) but is being phased out in favor of Tauri — see that package's README for status.

Build the CLI executable:

cd packages/physicscode
bun run build

The build outputs platform-specific executables under packages/physicscode/dist/. Those binaries are the artifacts to publish for users who want to download and run physicscode directly.

Connect a Model Provider

physicscode doesn't ship with any API keys — you connect your own. It supports 75+ providers (Anthropic, OpenAI, Google, Azure, Bedrock, local models, and more) via Models.dev.

Interactive (recommended): run physicscode, then inside the TUI run:

/connect

Pick a provider and paste your API key. It's written to ~/.local/share/physicscode/auth.json on your machine — this file is never part of the repo and should never be committed anywhere.

Environment variables: each provider also reads its standard env var, e.g.

export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...

Config file: provider behavior (base URL, proxies, model allowlists) can be set in physicscode.json — but never put a live API key in this file:

{
  "provider": {
    "anthropic": {
      "options": { "baseURL": "https://api.anthropic.com/v1" }
    }
  }
}

Full reference: Providers docs.

Science MCP

physicscode-science (provenance-aware retrieval for scientific software) is already wired into physicscode itself once you're logged in — no setup needed. To use it from Claude Code or Codex instead — on this machine or any other — see physicscode-science/docs/mcp-clients.md for the exact claude mcp add / codex mcp add commands, covering both the hosted endpoint (works from any machine with a PhysicsCode API key) and running your own local index.

VS Code Extension

The VS Code extension lives in sdks/vscode. Before publishing a new extension build, bump the version field in sdks/vscode/package.json; the Visual Studio Marketplace rejects uploads that reuse an existing version.

Build the VSIX:

cd sdks/vscode
bunx @vscode/vsce package --no-dependencies -o dist/physicscode.vsix

Publish to the Visual Studio Marketplace:

bunx @vscode/vsce publish --packagePath dist/physicscode.vsix

The extension publisher id is paidynamicsch, so the Marketplace extension id is paidynamicsch.physicscode. If publishing from a new machine, first run bunx @vscode/vsce login paidynamicsch and provide a Personal Access Token with Marketplace > Manage permission.

License

PhysicsCode started as a fork of OpenCode and has since diverged significantly for physics-focused workflows. Notices for OpenCode and other third-party materials are preserved in Licenses.

About

Physics-based agentic AI coding platform

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages