Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

docs: document forge config path overrides (#8191)

[._.]/ Adam Eivy8f051a776ea8
diff --git a/.env.example b/.env.example
index c3d0164a8e..138ac977b0 100644
--- a/.env.example
+++ b/.env.example
@@ -103,6 +103,14 @@ PGPASSWORD=portos
# Maximum simultaneous requests to each local LLM endpoint (default: 1)
# LOCAL_LLM_MAX_CONCURRENCY=1
+# Optional CLI config paths used to recognize custom forge hosts for managed apps
+# whose work tracker is set to Auto. Defaults follow gh/glab and XDG platform paths.
+# GH_CONFIG_DIR=
+# GLAB_CONFIG_DIR=
+# XDG_CONFIG_HOME=
+# XDG_CONFIG_DIRS=
+# APPDATA=
+
# Maximum Codex image-generation runtime in milliseconds (default: 1200000 / 20 minutes)
# CODEX_TIMEOUT_MS=1200000
diff --git a/server/lib/workTracker.js b/server/lib/workTracker.js
index ca5d4a124b..91974970f8 100644
--- a/server/lib/workTracker.js
+++ b/server/lib/workTracker.js
@@ -546,8 +546,8 @@ async function hostKnownToForgeCli(host) {
let defaultGhConfigDir = path.join(homedir(), '.config', 'gh');
if (process.env.XDG_CONFIG_HOME) {
defaultGhConfigDir = path.join(process.env.XDG_CONFIG_HOME, 'gh');
- } else if (process.platform === 'win32' && (process.env.AppData || process.env.APPDATA)) {
- defaultGhConfigDir = path.join(process.env.AppData || process.env.APPDATA, 'GitHub CLI');
+ } else if (process.platform === 'win32' && process.env.APPDATA) {
+ defaultGhConfigDir = path.join(process.env.APPDATA, 'GitHub CLI');
}
const ghConfigDir = process.env.GH_CONFIG_DIR
|| defaultGhConfigDir;
@@ -673,8 +673,8 @@ function gitlabProjectPath(originUrl) {
* a self-hosted GitHub Enterprise Server or GitLab instance can run on ANY
* domain the operator picked (`git.mycompany.com`,
* `scm.mycompany.com`, …) — there is no hostname heuristic that can tell such a
- * host apart from a non-forge remote, so the user's own pin is the only signal
- * left. A genuinely wrong pin (e.g. a bitbucket.org origin pinned to 'github')
+ * host apart from a non-forge remote, so the app setting or CLI host config is
+ * the only signal left. A genuinely wrong preference (e.g. a bitbucket.org origin pinned to 'github')
* still degrades gracefully: the resulting `gh`/`glab` call fails and the
* caller reports a transient "couldn't reach" error rather than PortOS lying
* upfront that the origin "isn't GitHub or GitLab".