Skip to main content
For developers running Atomic on Windows or Windows Subsystem for Linux (WSL), this guide explains how to install Atomic with PowerShell, configure Git Bash and the Windows PowerShell tool, choose a compatible terminal, and troubleshoot Windows-specific issues. If you run Atomic inside WSL instead of native Windows, follow the macOS/Linux/WSL installer inside your WSL terminal.

Install with PowerShell (recommended)

The native PowerShell installer verifies checksums, unpacks Atomic under %LOCALAPPDATA%\atomic, and adds an atomic.cmd launcher to your User PATH.

Before you begin

Confirm you have the following prerequisites before running the installer:
  • Windows PowerShell 5.1 or PowerShell 7.
  • Git for Windows (recommended so Atomic’s bash tool uses Git Bash).
  • Windows Terminal (recommended for a current conhost).
1

Run the native PowerShell installer

Open PowerShell and run the following command:
Optional: To pin an exact release (<major>.<minor>.<patch> or <major>.<minor>.<patch>-alpha.<revision>), run the installer with -Ref:
Replace the following:
  • VERSION: the exact release tag to install, such as 0.10.31 or 0.11.0-alpha.1.
2

Open a new terminal if prompted

If the installer updated User PATH, open a new Windows Terminal window so the updated PATH applies everywhere.
3

Confirm the installation

Run the following command and confirm it prints the installed Atomic version:
Expected output shows the version number, for example:
By default, the installer verifies SHA256SUMS, stores versioned payloads under %LOCALAPPDATA%\atomic, and creates an ASCII-only atomic.cmd launcher plus an atomic-current junction in %LOCALAPPDATA%\atomic\bin. The relative shim supports Unicode install paths and custom bin directories. You can override defaults with ATOMIC_INSTALL_DIR, ATOMIC_BIN_DIR (defaults to <ATOMIC_INSTALL_DIR>\bin, so changing ATOMIC_INSTALL_DIR moves the default bin directory too), ATOMIC_VERSION (-Ref takes precedence), or optional GITHUB_TOKEN or GH_TOKEN (used only if release resolution falls back to the GitHub API). If you installed earlier with npm, pnpm, or Bun, see Switch to the native installer.

Installer rules and edge cases

Keep the following installer behaviors in mind:
  • Reruns, repair, and locking: Concurrent installer runs serialize on an exclusive lock file under ATOMIC_INSTALL_DIR. Rerunning skips the download when the requested release is healthy and restores a missing User PATH entry; pass -Force or set ATOMIC_FORCE_INSTALL=1 to reinstall anyway. A missing or mismatched atomic.cmd shim, invalid junction, or payload missing required startup files triggers a repair install.
  • PATH and PATHEXT: The installer updates User PATH and the active PowerShell process, then prompts you to open a new terminal when User PATH changed. A custom ATOMIC_BIN_DIR containing ; can’t be one Windows PATH entry, so the installer leaves PATH untouched and prints a direct command for atomic.cmd. PATHEXT must include .CMD for bare atomic to resolve, or installation stops with an error.
  • Existing launchers and directories: A same-stem launcher that PATHEXT resolves before atomic.cmd (such as a stale atomic.exe) stops installation before download until you remove it. The installer reports and skips an unexpected regular current entry under ATOMIC_INSTALL_DIR or a regular atomic-current entry under ATOMIC_BIN_DIR.
  • Pinned versions: The installer validates -Ref against <major>.<minor>.<patch> or <major>.<minor>.<patch>-alpha.<revision> and honors it literally. If GitHub returns a different release tag, installation stops before download.
  • TLS 1.2 on legacy PowerShell 5.1: After downloading, the script enables TLS 1.2 for its own GitHub requests and restores your previous setting. If irm itself fails to reach GitHub on Windows PowerShell 5.1, enable TLS 1.2 in your shell before running the command.
  • Output, Intercom upgrade, and cleanup: Setting NO_COLOR to any value (even empty) switches installer output to plain text (output is also plain under CI or redirected stdout). After installing, install.ps1 runs atomic intercom upgrade to replace any older running Intercom broker and warns if that step fails (see Updating while Intercom is running). The installer removes staging directories (atomic-install-*) when installation finishes.

Bash and PowerShell discovery

Atomic uses Bash for the bash tool and checks these locations in order:
  1. Custom shellPath in ~/.atomic/agent/settings.json, trusted project .atomic/settings.json, or legacy ~/.pi/agent/settings.json.
  2. Git Bash at %ProgramFiles%\Git\bin\bash.exe.
  3. Git Bash at %ProgramFiles(x86)%\Git\bin\bash.exe.
  4. bash.exe on PATH (Cygwin, MSYS2, or WSL).
Atomic accepts Windows Store app aliases (such as those in %LOCALAPPDATA%\Microsoft\WindowsApps) wherever it searches for a shell. Atomic checks only absolute directories on PATH in order, skips empty and relative entries, never searches the current working directory first, and caches missing PATH lookups for 30 seconds. For the bash tool on native Windows, install Git for Windows. Atomic rejects legacy WSL %SystemRoot%\System32\bash.exe in interactive and CLI sessions because Windows can’t reliably isolate legacy WSL child processes; run Atomic directly inside WSL when you want a WSL POSIX shell. PowerShell discovery checks these locations in order:
  1. pwsh.exe on PATH.
  2. %ProgramFiles%\PowerShell\7\pwsh.exe.
  3. powershell.exe on PATH.
  4. %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe.
Leave shellCommandPrefix unset on native Windows. Atomic prepends shellCommandPrefix to both model bash tool calls (Bash) and interactive ! and !! commands (PowerShell), so either Bash or PowerShell syntax breaks one side unless you disable the other. Inside WSL, both run in Bash. See Enable shell aliases.

Set a custom Bash path

To use a custom Bash executable such as Cygwin or MSYS2, set shellPath in ~/.atomic/agent/settings.json or a trusted project’s .atomic/settings.json:
If shellPath is a bare executable name (with no /, \, or :), Atomic searches absolute PATH directories. Otherwise Atomic expands a leading ~/ or ~\ to your home directory, checks the resolved path, and stops with Custom shell path not found: ... if it doesn’t exist instead of falling back to Git Bash. POSIX-style paths copied from Git Bash, MSYS2, Cygwin, or WSL work anywhere Atomic resolves a file path. Atomic translates /c/..., /cygdrive/c/..., and /mnt/c/... (case-insensitive single drive letter) into C:\..., while leaving Universal Naming Convention (UNC) and double-slash paths (//...) and paths already containing \ untouched.

PowerShell tool

On native Windows, Atomic enables the powershell tool by default whenever pwsh.exe or powershell.exe resolves in the preceding discovery order, and omits it if neither is installed. This tool is Windows-only and stays disabled on Linux or macOS even if pwsh is installed. Keep the following powershell tool details in mind:
  • Execution flags and encoding: Atomic launches PowerShell with -NoProfile -NonInteractive -ExecutionPolicy Bypass (using -EncodedCommand with UTF-16LE base64 in interactive and CLI sessions, or -Command in standalone SDK calls), sets UTF-8 console output, turns off progress output ($ProgressPreference = 'SilentlyContinue') so progress bars such as Invoke-WebRequest’s never reach the result, and wraps Windows PowerShell 5.1 (powershell.exe) calls so script errors exit with code 1. In interactive and CLI sessions, PowerShell writes errors, warnings, verbose, and debug messages as #< CLIXML; Atomic formats them as the console shows them (for example WARNING: ...), after the command’s other output.
  • Environment and PTY control: Both ATOMIC_* and legacy PI_* session environment variables are available inside PowerShell calls (see Environment variables). Setting ATOMIC_NO_PTY=1 (legacy PI_NO_PTY=1, where ATOMIC_NO_PTY=0 overrides PI_NO_PTY=1) disables pseudo-terminal (PTY) allocation for both powershell and bash tool calls.
  • Tool lists and output: Add powershell to defaultTools in Tool settings if you define a custom built-in tool allowlist. To disable all shell execution on native Windows, exclude both bash and powershell (--exclude-tools bash,powershell; see No built-in sandbox). PowerShell calls render with a PS> prompt, and truncated output spills to an atomic-powershell-* temporary file separate from Bash spill files.
  • Programmatic SDK usage: For TypeScript SDK PowerShell tool factories and options, see PowerShell tool behavior.

Choose a terminal

Windows terminals run Atomic through a console host (conhost). Terminals using the older built-in Windows conhost have rendering and input bugs that affect Atomic. Use Windows Terminal, which ships a current conhost (see Windows Terminal setup for WSL and SSH Shift+Enter configuration). For terminal multiplexers and Windows desktop or terminal automation with psmux and UI Automation, see Run Atomic in Herdr and Computer use. On a fresh Windows install, agent-desktop exits with code 0xC0000135 until you install the Microsoft Visual C++ Redistributable for x64. The following table compares Windows terminals and their conhost compatibility:

Windows and WSL keybindings

Atomic adjusts several default shortcuts on native Windows and WSL to avoid terminal conflicts. WSL keybindings activate automatically on Linux whenever WSL_DISTRO_NAME or WSL_INTEROP is set. The following table compares default shortcuts on native Windows and WSL: On native Windows outside VS Code’s integrated terminal, pressing the unmodified secondary mouse button pastes clipboard text into the focused input. See Keybindings for the complete shortcut reference.

Shutdown and process cleanup

Atomic manages Windows shutdown hooks, child process isolation, and caches as follows:
  • Graceful shutdown: Quitting Atomic gives the session up to 5 seconds to run session_shutdown handlers.
  • Console close and Windows sign-out: Closing the console window and signing out, restarting, or shutting down Windows also run session_shutdown handlers with fromSignal: true for up to about 4 seconds before Windows stops the process.
  • Shell process-tree cleanup: The session contains interactive and CLI bash and powershell tool calls automatically. Interactive ! commands and standalone SDK shell calls start in their own Windows Job object, so pressing Escape, hitting a timeout, or cancelling stops the shell and its child processes. Background processes that Git Bash detaches from the job outlive bash if left running when it exits. Set ATOMIC_HOST_SPAWN=child-process to disable native Job-object containment for ! commands, helper processes, and standalone SDK tool calls and fall back to Node’s child_process (see Environment variables).
  • Apps opened by a tool call: When a bash or powershell tool call finishes, Atomic ends every process it started that is still running, including apps it opened and the agent-browser browser. To keep an app open across calls, start it in a background call that stays open—such as agent-desktop launch notepad; Start-Sleep -Seconds 86400 with wait: { kind: "background" }—and stop that task with kill when finished (see Desktop automation).
  • Node.js compile cache: On Node.js, Atomic enables Node’s persistent compile cache automatically and warms a cold default cache in a background helper during interactive runs. Set NODE_COMPILE_CACHE to use a custom directory or NODE_DISABLE_COMPILE_CACHE=1 to disable it (see Environment variables).

Update Atomic on Windows

Use atomic update to keep Atomic, packages, and model catalogs up to date:
  • atomic update or atomic update --self: updates Atomic only (add --force to reinstall the same version, --version <release> for an exact release, or --prerelease to include prereleases on release-archive installs).
  • atomic update --all: updates Atomic and installed packages.
  • atomic update --extensions: updates installed packages only.
  • atomic update --models: refreshes configured provider model catalogs.
For writable global package-manager installs on Windows, Atomic handles loaded native add-ons during self-update so Windows file locks don’t block replacement. For custom or wrapped installations, configure selfUpdateCommand in global settings or ATOMIC_SELF_UPDATE_COMMAND (see Custom update command). If atomic update can’t update a native install, rerun the PowerShell installer. If another tool installed Atomic, use that tool to update it. For standalone binaries, download the latest Atomic release.

Headless skills and file watchers

Keep two Windows-specific behaviors in mind when running headless skills or watching files:
  • Headless skill commands: Skills such as /skill:skill-creator run evaluation queries in a hidden Windows console that can’t answer interactive credential prompts. Configure an API key, an environment variable, or a credential command that reads a cached token without prompting.
  • File watcher polling: When a Windows path can’t be watched reliably with native filesystem events, Atomic falls back to polling: every 1,000 ms for custom theme files and Git HEAD, and every 250 ms for Git reftable lists. Theme reloads and Git status updates might arrive after that short interval.

Known issues

The following display and input issues come from older versions of Windows conhost:
Upgrading npm installs from Atomic 0.10.4 or earlier (EBUSY): Earlier Intercom brokers locked files inside the global npm install directory, causing npm install -g @bastani/atomic to fail with EBUSY. Close running Atomic sessions and wait 5 seconds (or run atomic intercom restart), then rerun the install. From 0.10.5 onward, the broker runs outside the install directory (see Updating while Intercom is running).

Next steps

Continue configuring Windows terminals, shortcuts, and built-in tools: