Skip to main content
Reinstall only agents whose installed file hash doesn’t match the lock file. This command is a standalone alias for install --update.

Usage

npx opencode-agents update

How It Works

The update command:
  1. Reads the lock file.opencode/agents/.manifest-lock.json
  2. Computes hashes — SHA-256 of each installed agent file
  3. Compares hashes — Identifies agents where current hash ≠ lock hash
  4. Reinstalls outdated — Downloads and overwrites mismatched agents (forced)
  5. Updates lock — Records new hashes and timestamps
Hashes are computed after permission modifications, so changing permissions via CLI flags will not trigger reinstall.

When to Use

Use update when:
  • The registry manifest has been updated (new agent versions)
  • You manually edited an agent file and want to restore the original
  • You suspect local modifications and want to sync with upstream
This command overwrites local changes. Any manual edits to agent files will be lost.

Lock File

The lock file (.opencode/agents/.manifest-lock.json) tracks:
  • sha256 — Content hash for change detection (not security)
  • installedAt — ISO 8601 timestamp of first install
  • updatedAt — ISO 8601 timestamp of last update
Example lock entry:
{
  "postgres-pro": {
    "sha256": "a1b2c3d4e5f6...",
    "installedAt": "2026-03-01T10:30:00.000Z",
    "updatedAt": "2026-03-05T14:22:00.000Z"
  }
}

Flags

--dry-run
boolean
default:"false"
Preview which agents would be updated without downloading or writing files.
npx opencode-agents update --dry-run

Permission Flags

All permission flags from install are supported:
  • --permissions <preset> — Apply permission preset (strict, balanced, permissive, yolo)
  • --yolo — Allow all permissions (requires CONFIRM)
  • --permission-override <spec> — Override specific permissions
  • --save-permissions — Save permission choices for future installs
  • --no-saved-permissions — Ignore saved preferences
  • --no-interactive — Skip interactive prompts

Examples

Check for updates

npx opencode-agents update
Output (no updates):
All agents are up to date.
Output (3 outdated):
Updating 3 outdated agent(s)...
  → postgres-pro — hash mismatch, reinstalling
  → redis-specialist — hash mismatch, reinstalling
  → typescript-pro — hash mismatch, reinstalling

✓ postgres-pro → .opencode/agents/data-api/postgres-pro.md (forced)
✓ redis-specialist → .opencode/agents/data-api/redis-specialist.md (forced)
✓ typescript-pro → .opencode/agents/languages/typescript-pro.md (forced)

3 installed, 0 skipped, 0 failed

Dry-run update

npx opencode-agents update --dry-run
# Dry run — no files will be written
#
# Updating 2 outdated agent(s)...
#   → docker-specialist — hash mismatch, reinstalling
#   → kubernetes-specialist — hash mismatch, reinstalling
#
# [dry-run] docker-specialist → .opencode/agents/devops/docker-specialist.md
# [dry-run] kubernetes-specialist → .opencode/agents/devops/kubernetes-specialist.md
#
# 2 installed, 0 skipped, 0 failed

Update with custom permissions

npx opencode-agents update --permissions permissive
# Updating 1 outdated agent(s)...
#   → security-auditor — hash mismatch, reinstalling
#
# ✓ security-auditor (forced, permissive permissions)
#
# 1 installed, 0 skipped, 0 failed

Comparison with install —update

These commands are identical:
npx opencode-agents update
npx opencode-agents install --update
Both:
  • Detect outdated agents via hash comparison
  • Reinstall only mismatched agents
  • Force overwrite (ignore existing files)
  • Update lock file timestamps

Exit Codes

CodeMeaning
0All outdated agents updated successfully, or no updates needed
1One or more agents failed to update

What Gets Updated

  1. Agent file — Downloaded from GitHub and overwritten
  2. Lock entry — New hash and updatedAt timestamp
  3. Permissions — Applied from CLI flags or saved preferences
The installedAt timestamp is preserved during updates.
  • install — Install new agents or packs
  • verify — Check lock file integrity without reinstalling
  • rehash — Rebuild lock file from current disk state
  • uninstall — Remove agents

Build docs developers (and LLMs) love