To use npx commitgpt, type the command into your terminal. To generate a conventional commits format for your commit message, add ‘-c’ after the command. On the first run of this tool, you’ll be asked to enter an OpenAI session token. You can get your token by visiting https://chat.openai.com/chat and logging in or signing up. Then open developer console with F12 and select Application > Cookies where you will find __Secure-next-auth.session-token value that you need to copy and paste it into the terminal prompt when prompted while running npx commitgpt -c . This tool runs git diff –cached before sending out diffs to ChatGPT which then provides suggested commit messages for users to review.