Skip to content

fix(install): detect Scripts/bin dir and offer to add it to PATH#19

Merged
phuonghx merged 1 commit into
mainfrom
fix/installer-path-detection
Jun 14, 2026
Merged

fix(install): detect Scripts/bin dir and offer to add it to PATH#19
phuonghx merged 1 commit into
mainfrom
fix/installer-path-detection

Conversation

@phuonghx

@phuonghx phuonghx commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Problem

Right after installation, users frequently hit 'aim' is not recognized (Windows) or aim: command not found (macOS/Linux). The cause is almost always pip placing the aim executable in a Scripts (Windows) / bin (Unix) folder that is not on PATH.

Changes

  • install.ps1 / install.sh: after install, auto-detect the folder that holds aim via sysconfig (user scheme first, also checking for aim.exe/aim).
    • If the folder is already on PATH -> report OK.
    • If not, and running interactively -> prompt [Y/n] to add it to the user PATH, and update the current session immediately so aim works right away.
    • If running non-interactively (e.g. CI / pipe) -> do not modify PATH, just print manual instructions.
    • install.sh reads the answer via /dev/tty so it still works when installed through curl ... | bash, and picks the correct rc file (.zshrc / .bashrc / .bash_profile / .profile).
  • README.md / README-VI.md: add a troubleshooting section for this error, plus a no-PATH way to run it: python -m aim.aim_cli init.

Notes

  • The PATH-fixing part runs under set +e (sh) so minor errors don't break the already-successful install.
  • Core install behavior is unchanged; this only adds a PATH detection & guidance step at the end.

The "'aim' is not recognized" / "command not found" error right after
install is almost always pip placing the console script in a folder that
is not on PATH. Both one-line installers now locate that folder via
sysconfig, and when running interactively offer to append it to the user
PATH (also updating the current session so 'aim' works right away).
Non-interactive runs print manual instructions instead of changing PATH.

Document the fix plus a no-PATH `python -m aim.aim_cli` workaround in both
README.md and README-VI.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@phuonghx phuonghx merged commit ec35ee0 into main Jun 14, 2026
4 checks passed
phuonghx added a commit that referenced this pull request Jun 14, 2026
fix(install): detect Scripts/bin dir and offer to add it to PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant