taskfoundry
v0.4.0
Published
Generate task content and commit messages from your Git diffs — in Markdown or JSON — powered by Groq, OpenAI, or your own local model.
Downloads
29
Maintainers
Readme
TaskFoundry 🛠️
Generate task content and commit messages from your Git diffs — in Markdown or JSON — powered by OpenAI, Groq, or your own local model.
✨ Features
- 🧠 AI-Powered Task Summaries from your Git changes
- 📝 Conventional Commit Messages generated from staged changes
- 🔀 Support for staged or latest commit diffs
- 🧾 Output in Markdown (default) or JSON
- 🤖 Use OpenAI, Groq (recommended), or your own local model
- ⚡ Fast and CLI-friendly — built for dev workflows
- 🆓 Free tier available with Groq
- 📝 Concise or detailed task descriptions
- 🔗 Built-in aliases for faster workflows
🚀 Installation
npm install -g taskfoundry🛠️ Usage
TaskFoundry provides two main commands with convenient aliases:
📋 Task Generation
create-task [options]
# or use the alias:
ct [options]Options
| Flag | Description |
|---------------------|-------------------------------------------------|
| --staged | Use staged changes (git diff --cached) |
| --output | Format: markdown (default) or json |
| --engine | Engine: groq (recommended), openai, or local |
| --model | AI model to use (optional) |
| --temperature | AI temperature (0-2, default: 0.3) |
| --file | Save output to file instead of stdout |
| --detailed | Generate comprehensive task descriptions |
| --verbose | Enable verbose logging |
Examples
# Generate a task from latest commit diff (uses Groq by default)
create-task
# or
ct
# Use staged files instead
create-task --staged
# or
ct --staged
# Generate detailed task description
create-task --detailed
# or
ct --detailed
# Output as JSON with detailed description
create-task --detailed --output json
# or
ct --detailed --output json
# Use with a specific engine
create-task --engine groq
# or
ct --engine groq
# Use a local model
create-task --engine local
# or
ct --engine local
# Output a detailed markdown tasks using groq
create-task --staged --engine groq --detailed --output markdown
# or
ct --staged --engine groq --detailed --output markdown
# Save to file
create-task --file task.md
# or
ct --file task.md💬 Commit Message Generation
create-commit [options]
# or use the alias:
cm [options]Options
| Flag | Description |
|---------------------|-------------------------------------------------|
| --type | Commit type: feat, fix, docs, style, etc. |
| --scope | Commit scope (optional) |
| --breaking | Mark as breaking change |
| --engine | Engine: groq (recommended), openai, or local |
| --model | AI model to use (optional) |
| --temperature | AI temperature (0-2, default: 0.2) |
| --file | Save commit message to file instead of stdout |
| --copy | Copy commit message to clipboard (macOS only) |
| --verbose | Enable verbose logging |
Examples
# Generate commit message from staged changes
create-commit
# or
cm
# Specify commit type
create-commit --type feat
# or
cm --type feat
# Add scope and mark as breaking change
create-commit --type feat --scope api --breaking
# or
cm --type feat --scope api --breaking
# Save to file for editing before commit
create-commit --file commit-message.txt
# or
cm --file commit-message.txt
# Copy to clipboard (macOS)
create-commit --copy
# or
cm --copy
# Use different engine
create-commit --engine openai --type docs
# or
cm --engine openai --type docsCommit Types
| Type | Description |
|------------|----------------------------------------------------------------|
| feat | A new feature |
| fix | A bug fix |
| docs | Documentation only changes |
| style | Changes that do not affect the meaning of the code |
| refactor | A code change that neither fixes a bug nor adds a feature |
| perf | A code change that improves performance |
| test | Adding missing tests or correcting existing tests |
| chore | Changes to the build process or auxiliary tools |
| ci | Changes to CI configuration files and scripts |
| build | Changes that affect the build system or external dependencies |
🚀 Quick Start
For the fastest workflow, use the built-in aliases:
# Stage your changes
git add .
# Generate commit message with alias
cm --type feat --scope api
# Generate detailed task description with alias
ct --staged --detailedAvailable Commands & Aliases
| Full Command | Alias | Description |
|------------------|-------|--------------------------------|
| create-task | ct | Generate task descriptions |
| create-commit | cm | Generate commit messages |
🔐 API Setup
Groq (Recommended) 🌟
Groq offers a generous free tier and fast inference. Create a .env file:
GROQ_API_KEY=your-groq-api-key-hereGet your free API key at console.groq.com
OpenAI
To use the openai engine, create a .env file:
OPENAI_API_KEY=your-openai-api-key-hereLocal Model
For local inference, set up your endpoint:
LOCAL_MODEL_ENDPOINT=http://localhost:11434🤖 Local Model Support
This project supports local inference via a stub. You can connect it to:
Update src/engines/localModelEngine.js to hook in your preferred model.
⚙️ Configuration
Create a .taskfoundry.json file in your project or home directory:
{
"engine": "groq",
"output": "markdown",
"model": "llama-3.3-70b-versatile",
"temperature": 0.3,
"detailed": false,
"includeFileNames": true,
"excludePatterns": ["*.lock", "node_modules/**"]
}Generate a default config file:
create-task init
# or
ct init🧪 Sample Output
Task Generation
Concise (default)
**Title**: Refactor auth service
**Summary**: Simplified token handling logic and added expiry validation.
**Technical considerations**: Introduced helper to decode JWT. Ensure compatibility with existing clients.Detailed (--detailed flag)
**Title**: Implement End-to-End Tests for Employee Management Portal
**Summary**: Create comprehensive end-to-end tests using Playwright to validate the Employee Management functionality in the Manage Business section. The tests should verify all critical user flows for managing employees, including adding, viewing, and removing employees.
Test coverage requirements:
- Navigate to Employee management section via Manage Business
- View all employees list with proper table columns validation
- Test filtering and searching functionality
- Employee addition workflow with form validation
- Employee deletion workflow with confirmation
- Verify success messages and error states
**Technical considerations**: Use Playwright as the testing framework with proper test organization using beforeEach setup for common operations. Implement explicit waiting mechanisms for elements and include proper assertions for success messages. Consider adding data cleanup for test isolation, using unique identifiers for test data, and implementing parallel test execution for efficiency. Add appropriate error handling and confirmation dialog testing.JSON Format
{
"title": "Refactor auth service",
"summary": "Simplified token handling logic and added expiry validation.",
"tech": "Introduced helper to decode JWT. Ensure compatibility with existing clients."
}Commit Message Generation
feat(auth): add JWT token validation
Implement comprehensive token validation including expiry checks and signature verification to improve security and prevent unauthorized access.With breaking change:
feat(api)!: restructure user authentication endpoints
BREAKING CHANGE: Authentication endpoints now require API version in headers and return different response structure.🔄 Workflow Integration
Typical Development Workflow
# 1. Stage your changes
git add .
# 2. Generate and review commit message (using alias)
cm --type feat --scope api --file commit-msg.txt
# 3. Edit if needed, then commit
git commit -F commit-msg.txt
# 4. Generate task description for your work item (using alias)
ct --staged --detailed --file task.md
# 5. Copy task content to your project management toolFast Workflow with Aliases
# Quick commit message generation
git add . && cm --type feat
# Quick task generation
ct --staged --detailed --copy
# Pipeline workflow
git add . && cm --file msg.txt && git commit -F msg.txt && ct --detailedIntegration with Git Hooks
You can integrate TaskFoundry into your git workflow:
# .git/hooks/prepare-commit-msg
#!/bin/sh
if [ -z "$2" ]; then
cm --file "$1"
fi📦 Development
# Clone the repo
npm install
npm link # Makes 'create-task', 'create-commit', 'ct', and 'cm' globally available
# Run tests
npm test
# Format code
npm run format📄 License
Apache-2.0 — happy tasking!
💡 Inspiration
TaskFoundry was built to speed up dev documentation and reduce the burden of writing DevOps tickets and commit messages manually.
✍🏽 Contribute
Have ideas or want to add a local model integration? PRs welcome! Or drop me a message.
