Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Install or update to the latest release (Linux/macOS, no Go required):

```bash
curl -fsSL https://raw.githubusercontent.com/AxmeAI/axme-cli/main/install.sh | sh
source ~/.zshrc # or open a new terminal
```

The same command installs if you don't have the CLI, and upgrades to the latest release if you do. After install the CLI periodically checks for new versions in the background and prompts you to update.
Expand Down
9 changes: 3 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,6 @@ fi
log "Installed ${BIN_NAME} ${VERSION} to ${INSTALL_DIR}/${BIN_NAME}"

ensure_path() {
# Already in PATH — nothing to do
case ":$PATH:" in
*":${INSTALL_DIR}:"*) return 0 ;;
esac

SHELL_NAME="$(basename "${SHELL:-/bin/sh}")"
LINE="export PATH=\"${INSTALL_DIR}:\$PATH\""

Expand All @@ -158,7 +153,7 @@ ensure_path() {
*) RC_FILE="$HOME/.profile" ;;
esac

# Don't duplicate if the line is already in the rc file
# Skip if rc file already has the path (don't check runtime PATH — may be temporary)
if [ -f "$RC_FILE" ] && grep -qF "$INSTALL_DIR" "$RC_FILE" 2>/dev/null; then
return 0
fi
Expand All @@ -176,6 +171,8 @@ ensure_path() {
export PATH="${INSTALL_DIR}:$PATH"

log "Done. PATH updated for current and future sessions."
log ""
log "To use axme in this terminal, run: source ${RC_FILE}"
}

ensure_path
Expand Down
Loading