Skip to content

Add --update flag to install.sh for easy version updates#287

Open
CheeYuTan wants to merge 2 commits intodatabricks-solutions:mainfrom
CheeYuTan:feat/update-command
Open

Add --update flag to install.sh for easy version updates#287
CheeYuTan wants to merge 2 commits intodatabricks-solutions:mainfrom
CheeYuTan:feat/update-command

Conversation

@CheeYuTan
Copy link
Contributor

Summary

Addresses #232, #167, and #137 — users have no clear way to update ai-dev-kit after initial install. Skills are copied to tool-specific directories (e.g., ~/.cursor/skills/), so git pull on the repo only updates the MCP server source, not the copied skills.

This PR adds:

File Change
install.sh Add --update flag that loads saved install config and re-runs with --force (no interactive prompts)
install.sh Add save_config() / load_config() to persist install settings to ~/.ai-dev-kit/install.conf
README.md Add "Updating to the Latest Version" section explaining --update and why it's needed
auth.py, test_sql.py Fix pre-existing ruff format issues on main

How it works

  1. On every install, settings (tools, scope, profile, base_dir) are saved to ~/.ai-dev-kit/install.conf
  2. --update reads that config, sets FORCE=true and SILENT=true, then runs the full install pipeline
  3. Users who installed before this change can use --force as a fallback (documented in README)

Usage

# First-time install (saves config automatically)
bash <(curl -sL .../install.sh)

# Future updates — one command, no prompts
bash <(curl -sL .../install.sh) --update

Test plan

  • Fresh install creates ~/.ai-dev-kit/install.conf with correct values
  • --update reads config and skips all interactive prompts
  • --update fails gracefully with clear error if no saved config exists
  • --force still works as before (backward compatible)
  • bash -n install.sh passes syntax check
  • CI passes (ruff lint + format)

Addresses issues databricks-solutions#232, databricks-solutions#167, and databricks-solutions#137 — users had no clear way to
update skills after initial install since skills are copied to
tool-specific directories and git pull only updates the MCP server.

Changes:
- install.sh: Add --update flag that loads saved install config
  (tools, scope, profile) and re-runs with --force, no prompts
- install.sh: Add save_config/load_config functions to persist
  install settings to ~/.ai-dev-kit/install.conf
- README.md: Add "Updating to the Latest Version" section with
  clear instructions and explanation of why --update is needed
- Fix pre-existing ruff format issues in auth.py and test_sql.py
load_config now restores SAVED_BASE_DIR so project-scoped installs
update the correct .cursor/skills/ and .claude/skills/ paths even
when --update is run from a different working directory.
@calreynolds
Copy link
Collaborator

@CheeYuTan today, we expect that folks will just re-run installation in order to update!

@CheeYuTan
Copy link
Contributor Author

@calreynolds

Is there any value that you see in adding the update flag?

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.

2 participants