opencode-cliproxyapi-sync 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,6 +99,16 @@ If only `oh-my-opencode.json` changes, no notification is shown (those changes a
|
|
|
99
99
|
|
|
100
100
|
(Respects `XDG_CONFIG_HOME` environment variable if set)
|
|
101
101
|
|
|
102
|
+
## OCX Profile Support
|
|
103
|
+
|
|
104
|
+
When using [OCX](https://github.com/kdcokenny/ocx) profiles, the plugin automatically detects the profile directory via the `OPENCODE_CONFIG_DIR` environment variable that OCX sets.
|
|
105
|
+
|
|
106
|
+
This means configs are synced to the correct profile location:
|
|
107
|
+
- **Without profile**: `~/.config/opencode/opencode.json`
|
|
108
|
+
- **With profile**: `~/.config/opencode/profiles/<name>/opencode.json`
|
|
109
|
+
|
|
110
|
+
No additional configuration needed - just use `ocx oc -p myprofile` as usual.
|
|
111
|
+
|
|
102
112
|
## Troubleshooting
|
|
103
113
|
|
|
104
114
|
### Plugin doesn't sync
|
package/dist/index.js
CHANGED
|
@@ -128,6 +128,10 @@ import { createHash } from "crypto";
|
|
|
128
128
|
import { homedir as homedir2 } from "os";
|
|
129
129
|
import { join as join2 } from "path";
|
|
130
130
|
function getOpenCodeConfigDir() {
|
|
131
|
+
const ocxConfigDir = process.env.OPENCODE_CONFIG_DIR;
|
|
132
|
+
if (ocxConfigDir) {
|
|
133
|
+
return ocxConfigDir;
|
|
134
|
+
}
|
|
131
135
|
const xdgConfigHome = process.env.XDG_CONFIG_HOME;
|
|
132
136
|
if (xdgConfigHome) {
|
|
133
137
|
return join2(xdgConfigHome, "opencode");
|