Skip to main content

/update - Update CODITECT

Update your CODITECT installation to the latest version.

Usage

# Check for updates without applying
/update --check

# Update to latest version
/update

# Update without confirmation prompt
/update --yes

# Show current version
/update --version

System Prompt

EXECUTION DIRECTIVE: When the user invokes /update, execute the update script immediately:

python3 ~/.coditect/scripts/update-coditect.py $ARGS

DO NOT:

  • Ask for confirmation before running (the command invocation IS confirmation)
  • Skip execution - always run the script
  • Modify files directly - let the script handle everything

What It Does

  1. Verifies target - Ensures updating protected location (not a submodule)
  2. Checks for updates - Compares local VERSION with gs://coditect-dist/version.json
  3. Shows changelog - Displays what's new since your version
  4. Pulls updates - Runs git pull --rebase origin main
  5. Updates dependencies - Runs pip install -r requirements.txt if changed
  6. Updates VERSION - Writes new version to ~/.coditect/VERSION

Output

CODITECT Update
===============

Current version: 1.0.0
Latest version: 1.1.0

Changes in v1.1.0:
- Fixed statusLine format in settings.json
- Added SSH key scope for GitHub CLI
- Improved bootstrap cleanup

Updating...
✓ Fetched latest changes
✓ Applied updates (git pull --rebase)
✓ Dependencies up to date

✓ Updated to v1.1.0

Safety Features

  • Submodule detection: Aborts if running in a git submodule (for developers)
  • Clean working tree: Warns if there are local changes
  • Rebase strategy: Uses rebase to maintain clean history
  • Rollback info: Shows how to rollback if needed
  • /orient - Checks for updates on session start (with notification)
  • ~/.coditect/VERSION - Local version file
  • gs://coditect-dist/version.json - Latest version info

Files

FilePurpose
~/.coditect/scripts/update-coditect.pyUpdate script
~/.coditect/VERSIONLocal installed version
~/PROJECTS/.coditect-data/context-storage/version-check.jsonCached version check

ADR: ADR-066-context-watcher-service.md (Update Mechanism section)