docs: add missing CLI options to manpage and cli docs#60857
Closed
ATMAKURIDHANUSH33102 wants to merge 1 commit intonodejs:mainfrom
Closed
docs: add missing CLI options to manpage and cli docs#60857ATMAKURIDHANUSH33102 wants to merge 1 commit intonodejs:mainfrom
ATMAKURIDHANUSH33102 wants to merge 1 commit intonodejs:mainfrom
Conversation
aduh95
reviewed
Nov 26, 2025
Contributor
aduh95
left a comment
There was a problem hiding this comment.
Please remove the sections that are already there
| If you want to load environment variables from a file that may not exist, you | ||
| can use the [`--env-file-if-exists`][] flag instead. | ||
|
|
||
| #### `--env-file` |
| Loads environment variables from the provided file and applies them to the current process environment. | ||
| If the file does not exist, Node.js will exit with an error. | ||
|
|
||
| #### `--env-file-if-exists` |
| Same as `--env-file` but does not error when the file is missing. | ||
| Useful for optional `.env` setups. | ||
|
|
||
| #### `--report-dir`, `--report-directory` |
| Load environment variables from the specified file if it exists. No error is thrown when the file is missing. | ||
|
|
||
| .TP | ||
| .B --report-dir, --report-directory |
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.
This PR updates the Node.js documentation to include several CLI options that were present in the CLI reference but missing from the
node.1manpage.Added CLI flags
--env-file— load environment variables from a file, error if missing--env-file-if-exists— load env file only if it exists--report-dir,--report-directory— specify the directory for diagnostic reportsThese flags now appear in both:
doc/api/cli.mddoc/node.1Notes
--expose-gcis intentionally excluded pending the discussion in doc: remove--expose-gcflag from CLI documentation #58909.Fixes: #58895