diff --git a/README.md b/README.md index 2b18797..a4e6970 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ You can also use the local model for free with Ollama. `--force`: Automatically create a commit without being prompted to select a message (can't be used with `--list`) +`--message-only` Runs the app in a non-interactive mode, avoiding unnecessary prompts or actions beyond displaying the message. + `--filter-fee`: Displays the approximate fee for using the API and prompts you to confirm the request `--apiKey`: Your OpenAI API key. It is not recommended to pass `apiKey` here, it is better to use `env` variable diff --git a/index.js b/index.js index 4206168..1da4527 100755 --- a/index.js +++ b/index.js @@ -103,6 +103,10 @@ const generateSingleCommit = async (diff) => { return; } + if (args["message-only"]) { + process.exit(0); + } + const answer = await inquirer.prompt([ { type: "confirm",