Skip to content

Support user OpenCode profiles under ~/.config/agentic/opencode/profiles and show them in the profile menu#57

Merged
sawrus merged 2 commits into
mainfrom
codex/add-user-profiles-to-menu
Jun 15, 2026
Merged

Support user OpenCode profiles under ~/.config/agentic/opencode/profiles and show them in the profile menu#57
sawrus merged 2 commits into
mainfrom
codex/add-user-profiles-to-menu

Conversation

@sawrus

@sawrus sawrus commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Allow users to add local OpenCode model profiles that can be selected during interactive installs without modifying bundled extensions.
  • Surface user profiles in the same optional plugin/profile menu as built-in profiles so installs can apply them seamlessly.
  • Keep profile application logic unified so bundled and user profiles are handled the same when writing .opencode/opencode.json.

Description

  • Added OPENCODE_USER_PROFILES_DIR and new helper functions opencode_builtin_profile_contains, opencode_user_profile_ids, and opencode_profile_source_path to discover and prefer bundled profiles when present.
  • Renamed and adjusted opencode_profile_* utilities so labels for user profiles are displayed as <profile-id> profile and opencode_profile_id_from_label strips that suffix for lookup.
  • Updated interactive plugin/profile selection to include user profiles from $HOME/.config/agentic/opencode/profiles/<profile-id>/opencode.json and to set SELECTED_OPENCODE_PROFILE for chosen user profiles.
  • Modified profile application to use opencode_profile_source_path so installs copy from bundled profiles when available or from the user profile path otherwise.
  • Documentation updates in README.md, docs/opencode_setup.md, and docs/agentic-usage.md documenting the user profile directory and examples.
  • Extended tests/e2e/opencode_plugins.e2e.sh to create sample user profiles (DT and GH) and add assertions that the menu lists and applies those profiles correctly.

Testing

  • Ran the updated end-to-end test tests/e2e/opencode_plugins.e2e.sh which creates DT and GH profiles under a fake HOME and verifies menu entries and applied profiles; the test passed.
  • Existing assertions in the same e2e test that check built-in profiles and final project files were executed and remained passing.

Codex Task

@sawrus sawrus merged commit 62f436d into main Jun 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant