Skip to content

Post-install alias setup and instructions are zsh-only, doesn't work correctly on bash (v3.0) #757

@lumberwhack

Description

@lumberwhack

After getting PAI installed on my Ubuntu Server bash environment via the CLI workaround (see #755), I noticed the post-install instructions were all pointing to ~/.zshrc — even though my shell is bash. The pai command wasn't available after install, and the validation step was also checking the wrong config file.

Environment

  • Ubuntu Server 24.04.4 LTS (Noble), SSH session
  • SHELL=/bin/bash
  • Installer run from v3.0 release copy under ~/.claude

Repro (bash)

  1. Install on a bash environment (SHELL=/bin/bash).
  2. Run v3 installer to completion.
  3. Observe completion instructions and validation output reference source ~/.zshrc.
  4. pai is not available in the current session — alias was written to .zshrc, not .bashrc.

Expected behavior

The alias should be written to whichever config file matches the detected shell (.bashrc/.bash_profile for bash, .zshrc for zsh, fish config for fish), and the completion instructions and validation messages should reflect that.

What I found in the code

Digging around a bit, the zsh path appears to be hardcoded in several places:

  • Alias write path: Releases/v3.0/.claude/PAI-Install/engine/actions.ts:573, :576
  • Alias validation check and message: Releases/v3.0/.claude/PAI-Install/engine/validate.ts:169, :182
  • Final CLI activation instruction: Releases/v3.0/.claude/PAI-Install/cli/index.ts:222
  • Summary screen activation command: Releases/v3.0/.claude/PAI-Install/cli/display.ts:162
  • Web UI activation command: Releases/v3.0/.claude/PAI-Install/public/app.js:375
  • Docs post-install commands: Releases/v3.0/.claude/README.md:21, Releases/v3.0/.claude/PAI-Install/README.md:265, :280

There's also a mismatch with the top-level README which says shell auto-detection is supported (Releases/v3.0/README.md:390), but the actual behavior doesn't reflect that.

Workaround

The installer had written the alias to ~/.zshrc. I found it there with cat ~/.zshrc, then manually added it to ~/.bashrc and reloaded:

# PAI alias
alias pai='bun /home/lumberwhack/.claude/skills/PAI/Tools/pai.ts'
source ~/.bashrc && pai

Suggestions

The fix seems pretty contained — if the shell config path gets resolved once from detection and reused across the alias write, validation, completion instructions, and docs snippets, that should cover it. Happy to test a fix if helpful.


Same situation as my other issue — had a working PR but it touched quite a few files and leaned heavily on AI to write it. Figured a well-documented issue was more useful than dropping a large AI-generated diff on you.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions