Skip to content

Conversation

@oribarilan
Copy link
Contributor

@oribarilan oribarilan commented Oct 28, 2025

  • Adding OPENCODE_CONFIG_DIR to allow a custom config directory
  • Adding docs for this new flag
  • Adding tests

fixes: #3432
fixes: #3410

@rekram1-node
Copy link
Collaborator

rekram1-node commented Oct 28, 2025

Since this is your first OSS contribution just providing this info for future reference:

I am editing your description to include:

fixes: #3432

You can also do closes and some other terms. Basically what it does:

  • links PR to an issue
  • when PR gets merged it will automatically close the issue

@rekram1-node
Copy link
Collaborator

/oc undo all changes to config.test.ts that were made in this PR

@opencode-agent
Copy link
Contributor

opencode-agent bot commented Oct 28, 2025

Done! I've removed all the OPENCODE_CONFIG_DIR related tests from the config.test.ts file, reverting it to its original state before the PR changes.

New%20session%20-%202025-10-28T16%3A40%3A05.691Z
opencode session  |  github run

@rekram1-node
Copy link
Collaborator

/oc edit log.debug("using custom config directory", { path: Flag.OPENCODE_CONFIG_DIR }) in config.ts to be:

log.debug("loading config from OPENCODE_CONFIG_DIR", { path: Flag.OPENCODE_CONFIG_DIR })

@opencode-agent
Copy link
Contributor

opencode-agent bot commented Oct 28, 2025

Done! I've updated the log message from "using custom config directory" to "loading config from OPENCODE_CONFIG_DIR" in packages/opencode/src/config/config.ts:66.

New%20session%20-%202025-10-28T16%3A45%3A14.327Z
opencode session  |  github run

@rekram1-node rekram1-node changed the title Adding OPENCODE_CONFIG_DIR to allow a custom config directory add OPENCODE_CONFIG_DIR to allow loading a custom config directory Oct 28, 2025
@rekram1-node
Copy link
Collaborator

@oribarilan thanks for the PR! I made some small tweaks but this was perfect, and congrats on your first contribution

@rekram1-node rekram1-node merged commit eb398f1 into anomalyco:dev Oct 28, 2025
3 checks passed
@oribarilan oribarilan deleted the feat/opencode-config-dir branch October 28, 2025 17:16
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.

[FEATURE]: custom config path to also support agent definition (via markdown) [FEATURE]:global configuration /etc/opencode

2 participants