@tpmjs/tools-conventional-commit-suggest
Suggests a conventional commit message based on a description of changes and optionally a list of changed files. Follows the Conventional Commits specification with types like feat, fix, docs, etc. Useful for maintaining consistent commit history.
Test @tpmjs/tools-conventional-commit-suggest (conventionalCommitSuggest) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-conventional-commit-suggestpnpm add @tpmjs/tools-conventional-commit-suggestyarn add @tpmjs/tools-conventional-commit-suggestbun add @tpmjs/tools-conventional-commit-suggestdeno add npm:@tpmjs/tools-conventional-commit-suggestimport { conventionalCommitSuggest } from '@tpmjs/tools-conventional-commit-suggest';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { conventionalCommitSuggest } from '@tpmjs/tools-conventional-commit-suggest';
const result = await generateText({
model: openai('gpt-4o'),
tools: { conventionalCommitSuggest },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
descriptionstringDescription of the changes made (e.g., "fixed login bug", "added dark mode")
filesarrayOptional array of changed file paths to help determine scope
Schema extracted: 1/1/2026, 8:17:38 AM
Suggests conventional commit messages from descriptions or file changes following the Conventional Commits specification.
npm install @tpmjs/tools-conventional-commit-suggest
import { conventionalCommitSuggest } from '@tpmjs/tools-conventional-commit-suggest'; import { generateText } from 'ai'; const result = await generateText({ model: yourModel, tools: { conventionalCommitSuggest, }, prompt: 'Suggest a commit message for adding a new login feature', });
Suggests a conventional commit message based on a description of changes and optionally a list of changed files.
Parameters:
description (string, required) - Description of the changes madefiles (array of strings, optional) - Changed file paths to help determine scopeReturns:
{ message: string; // The commit message subject line type: CommitType; // feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert scope: string | null; // The scope (usually derived from files) breaking: boolean; // Whether this is a breaking change body: string | null; // Optional commit body fullMessage: string; // Complete commit message with body explanation: string; // Explanation of the commit type }
Input:
{ description: "added dark mode toggle to settings page", files: ["src/components/settings/ThemeToggle.tsx", "src/components/settings/Settings.tsx"] }
Output:
{ message: "feat(settings): add dark mode toggle to settings page", type: "feat", scope: "settings", breaking: false, body: "Files changed:\n- src/components/settings/ThemeToggle.tsx\n- src/components/settings/Settings.tsx", fullMessage: "feat(settings): add dark mode toggle to settings page\n\nFiles changed:\n- src/components/settings/ThemeToggle.tsx\n- src/components/settings/Settings.tsx", explanation: "A new feature" }
This tool follows the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
Breaking changes are indicated with ! after the type/scope:
feat(api)!: remove deprecated endpoints
MIT
Downloads/month
34
Quality Score