Skip to content

chore: clean up oh-my-opencode config on update#417

Merged
marcusquinn merged 1 commit intomainfrom
chore/cleanup-omo-config
Feb 7, 2026
Merged

chore: clean up oh-my-opencode config on update#417
marcusquinn merged 1 commit intomainfrom
chore/cleanup-omo-config

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 7, 2026

Summary

  • Remove ~/.config/opencode/oh-my-opencode.json config file on update
  • Remove oh-my-opencode from the plugin array in opencode.json on update

Ensures existing installs are fully cleaned of OmO artifacts when users run aidevops update or setup.sh.

Summary by CodeRabbit

  • Chores
    • Improved setup cleanup process to remove deprecated configuration files and legacy plugin references, ensuring a cleaner system state after installation.

Remove ~/.config/opencode/oh-my-opencode.json and the plugin entry
from opencode.json during cleanup_deprecated_paths(), ensuring
existing installs are fully cleaned on next aidevops update.
@gemini-code-assist
Copy link

Summary of Changes

Hello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on improving the update process by ensuring a thorough cleanup of oh-my-opencode related artifacts. It prevents leftover configuration files and outdated plugin entries from persisting after an update, contributing to a cleaner and more consistent user environment. The changes are integrated into the existing setup.sh script to run automatically when users update their installations.

Highlights

  • Configuration Cleanup: The pull request introduces logic to automatically remove the deprecated ~/.config/opencode/oh-my-opencode.json configuration file during updates.
  • Plugin List Management: It adds functionality to remove 'oh-my-opencode' from the plugin array within the main opencode.json configuration file, utilizing jq for JSON manipulation if available.
Changelog
  • setup.sh
    • Added new cleanup steps within the cleanup_deprecated_paths function.
    • Implemented removal of ~/.config/opencode/oh-my-opencode.json if it exists.
    • Added logic to find opencode.json and remove 'oh-my-opencode' from its plugin array using jq.
Activity
  • No specific activity (comments, reviews, etc.) was provided in the context for this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 7, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

This PR adds cleanup logic to setup.sh that removes deprecated "oh-my-opencode" plugin references from configuration files, including deletion of the legacy config file and removal of plugin entries from the opencode.json configuration when jq is available.

Changes

Cohort / File(s) Summary
Deprecated Plugin Cleanup
setup.sh
Added cleanup steps in cleanup_deprecated_paths to remove the oh-my-opencode.json config file and strip "oh-my-opencode" entries from the plugin array in opencode.json using jq, with confirmation logging for each action.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🧹 Deprecated paths fade away,
oh-my-opencode files at bay,
jq strips the old with care,
Cleaner configs, lighter air! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/cleanup-omo-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 25 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Feb 7 03:25:54 UTC 2026: Code review monitoring started
Sat Feb 7 03:25:54 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 25
Sat Feb 7 03:25:54 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Sat Feb 7 03:25:56 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 25
  • VULNERABILITIES: 0

Generated on: Sat Feb 7 03:25:58 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 7, 2026

@marcusquinn marcusquinn merged commit 87789c0 into main Feb 7, 2026
10 of 11 checks passed
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to clean up oh-my-opencode artifacts during an update. The changes in setup.sh correctly remove the oh-my-opencode.json config file and also remove the plugin entry from opencode.json using jq. The implementation is robust, handling cases where jq is not present or the configuration file doesn't exist. I've suggested a minor improvement to make the jq command more concise and idiomatic, which enhances maintainability. Overall, the changes are well-implemented and achieve the stated goal.

if jq -e '.plugin | index("oh-my-opencode")' "$opencode_config" >/dev/null 2>&1; then
local tmp_file
tmp_file=$(mktemp)
jq '.plugin = [.plugin[] | select(. != "oh-my-opencode")]' "$opencode_config" > "$tmp_file" && mv "$tmp_file" "$opencode_config"

Choose a reason for hiding this comment

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

medium

The jq command to remove an element from the JSON array can be simplified. Using the -= operator is more concise and idiomatic for removing elements from a JSON array, which improves code readability and maintainability.

Suggested change
jq '.plugin = [.plugin[] | select(. != "oh-my-opencode")]' "$opencode_config" > "$tmp_file" && mv "$tmp_file" "$opencode_config"
jq '.plugin -= ["oh-my-opencode"]' "$opencode_config" > "$tmp_file" && mv "$tmp_file" "$opencode_config"

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.

1 participant