feat(config): expose FORGE_* env vars via :config-env command#2682
Open
marchantdev wants to merge 1 commit intoantinomyhq:mainfrom
Open
feat(config): expose FORGE_* env vars via :config-env command#2682marchantdev wants to merge 1 commit intoantinomyhq:mainfrom
marchantdev wants to merge 1 commit intoantinomyhq:mainfrom
Conversation
Closes antinomyhq#2638 ## Summary Some Forge configurations were only discoverable by reading source code or documentation; they could only be changed by manually editing `.env` files. This adds a first-class `:config-env` (`:ce`) command and the underlying CLI plumbing so users can browse, inspect, and set all FORGE_* variables without ever touching a file directly. ## Changes ### CLI (`forge config get env` / `forge config set env`) * **`forge config get env [KEY]`** — prints the current value of a specific `FORGE_*` variable, or lists the entire catalogue (38 vars) with their default values and one-line descriptions when `KEY` is omitted. * **`forge config set env KEY VALUE`** — writes `KEY=VALUE` to the nearest `.env` file in the current working directory (creates the file if it does not exist; updates in-place if the key is already present) and applies the change to the running process immediately so a restart is not required. ### ZSH plugin (`:config-env` / `:ce`) * Opens an fzf picker populated by `forge config get env`, showing every `FORGE_*` variable with its current value. * Selecting a variable prompts for a new value and calls `forge config set env` automatically. * Registered in `built_in_commands.json` so it appears in `:help` and completion.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2638
Problem
Many Forge tuning knobs — retry limits, HTTP timeouts, tool timeouts, max file sizes — are only discoverable by reading the source code or documentation. Changing them requires manually editing a
.envfile. There is no in-shell way to list what is configurable or to set a value without leaving the terminal.Solution
This PR adds a
:config-env(:ce) command and the corresponding CLI plumbing so users can browse, inspect, and set allFORGE_*environment variables without touching a file.CLI changes
forge config get envFORGE_*vars with current values and defaultsforge config get env KEYforge config set env KEY VALUEKEY=VALUEto.envin cwd and applies immediately (no restart needed)ZSH changes
:config-env/:ce— opens an fzf picker populated byforge config get env; selecting a variable prompts for a value and callsforge config set envautomaticallybuilt_in_commands.jsonso it appears in:helpand tab completionExample
Variables exposed
All 38
FORGE_*variables including: tool timeouts, file size limits, HTTP/TLS config, retry settings, semantic search parameters, API URLs, conversation history settings, and dump/debug options.