From 862a50d61de5d054418ae205c7f791d1e3cbc081 Mon Sep 17 00:00:00 2001 From: Jacob Hands Date: Tue, 29 Jul 2025 10:03:11 -0500 Subject: feat: add OPENCODE_CONFIG env var for specifying a custom config file (#1370) --- packages/web/src/content/docs/docs/config.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'packages/web/src') diff --git a/packages/web/src/content/docs/docs/config.mdx b/packages/web/src/content/docs/docs/config.mdx index 34184107b..abd05c335 100644 --- a/packages/web/src/content/docs/docs/config.mdx +++ b/packages/web/src/content/docs/docs/config.mdx @@ -34,6 +34,17 @@ This is also safe to be checked into Git and uses the same schema as the global --- +### Custom config file + +You can specify a custom config file using the `OPENCODE_CONFIG` environment variable. This takes precedence over the global and project configs. + +```bash +export OPENCODE_CONFIG=/path/to/my/custom-config.json +opencode run "Hello world" +``` + +--- + ## Schema The config file has a schema that's defined in [**`opencode.ai/config.json`**](https://opencode.ai/config.json). -- cgit v1.2.3