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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,16 @@ The result: AI agents that work *with* your development process, not around it.

```bash
npm install -g aidevops
aidevops update # Deploy agents (required after npm install)
```

> **Note**: npm suppresses postinstall output. Run `aidevops update` to deploy agents to `~/.aidevops/agents/`. The CLI will remind you if agents need updating.

**Bun** (fast alternative):

```bash
bun install -g aidevops
aidevops update # Deploy agents
```

**Homebrew** (macOS/Linux):
Expand Down
20 changes: 20 additions & 0 deletions aidevops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,26 @@ main() {
echo ""
fi

# Check if agents need updating (skip for update command itself)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this warning runs for all commands except update/upgrade/u (including version/--version and help), which can be a breaking change if anyone parses those outputs in scripts.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

if [[ "$command" != "update" && "$command" != "upgrade" && "$command" != "u" ]]; then
local cli_version agents_version
cli_version=$(get_version)
if [[ -f "$AGENTS_DIR/VERSION" ]]; then
agents_version=$(cat "$AGENTS_DIR/VERSION")
else
agents_version="not installed"
fi

if [[ "$agents_version" == "not installed" ]]; then
echo -e "${YELLOW}[WARN]${NC} Agents not installed. Run: aidevops update"
echo ""
elif [[ "$cli_version" != "$agents_version" ]]; then
echo -e "${YELLOW}[WARN]${NC} Version mismatch - CLI: $cli_version, Agents: $agents_version"
echo -e " Run: aidevops update"
echo ""
fi
fi
Comment on lines +1706 to +1723

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The logic for checking agent versions can be slightly refactored for clarity and efficiency. By first checking if the agents are installed, you can avoid unnecessarily fetching the CLI version if they aren't. This also makes the logic more direct.

Suggested change
if [[ "$command" != "update" && "$command" != "upgrade" && "$command" != "u" ]]; then
local cli_version agents_version
cli_version=$(get_version)
if [[ -f "$AGENTS_DIR/VERSION" ]]; then
agents_version=$(cat "$AGENTS_DIR/VERSION")
else
agents_version="not installed"
fi
if [[ "$agents_version" == "not installed" ]]; then
echo -e "${YELLOW}[WARN]${NC} Agents not installed. Run: aidevops update"
echo ""
elif [[ "$cli_version" != "$agents_version" ]]; then
echo -e "${YELLOW}[WARN]${NC} Version mismatch - CLI: $cli_version, Agents: $agents_version"
echo -e " Run: aidevops update"
echo ""
fi
fi
if [[ "$command" != "update" && "$command" != "upgrade" && "$command" != "u" ]]; then
if [[ ! -f "$AGENTS_DIR/VERSION" ]]; then
echo -e "${YELLOW}[WARN]${NC} Agents not installed. Run: aidevops update"
echo ""
else
local cli_version agents_version
cli_version=$(get_version)
agents_version=$(cat "$AGENTS_DIR/VERSION")
if [[ "$cli_version" != "$agents_version" ]]; then
echo -e "${YELLOW}[WARN]${NC} Version mismatch - CLI: $cli_version, Agents: $agents_version"
echo -e " Run: aidevops update"
echo ""
fi
fi
fi


case "$command" in
init|i)
shift
Expand Down
Loading