mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
632 B
632 B
CLI - Critical Rules
-
ALWAYS output structured JSON when
process.env.BW_RESPONSE === "true"- Use Response objects (MessageResponse, ListResponse, etc.) from
/apps/cli/src/models/response/ - DON'T write free-form text that breaks JSON parsing
- Use Response objects (MessageResponse, ListResponse, etc.) from
-
NEVER use
console.log()for output- Use
CliUtils.writeLn()to respectBW_QUIETandBW_RESPONSEenvironment variables - Use the
ConsoleLogServicefrom theServiceContainer
- Use
-
ALWAYS respect
BW_CLEANEXITenvironment variable- Exit code 0 even on errors when
BW_CLEANEXITis set - Required for scripting environments that need clean exits
- Exit code 0 even on errors when