Skip to content

noahseger/mise

Repository files navigation

LLM Workflow Tools with Mise

This repository contains configuration and templates for managing AI-powered code analysis workflows using mise (a development environment management tool) and llm (a CLI tool for interacting with large language models).

Overview

This project provides a streamlined workflow for analyzing code repositories using large language models. It uses:

  • mise for environment and task management
  • llm for interacting with LLMs (particularly Claude models from Anthropic)
  • repomix for bundling repository content for LLM analysis

The project sets up structured tasks to analyze code and generate various types of documentation and insights:

  • Code reviews
  • GitHub issues based on code analysis
  • Prompt engineering for code issues
  • Test coverage analysis
  • README documentation

Prerequisites

  • mise for task and environment management
  • llm for interacting with language models
  • repomix for bundling repository content
  • An Anthropic API key for Claude access

Installation

  1. Clone this repository
  2. Ensure mise is installed on your system
  3. Copy the sample configuration:
    cp config.toml.sample config.toml
  4. Edit config.toml to match your environment:
    • Adjust Python version if needed
    • Set your templates directory path in MISE_TEMPLATES_DIR
    • For Linux, change pbcopy to xclip -selection clipboard or wl-copy
    • For Windows, change pbcopy to clip.exe
  5. Set up your Anthropic API key as an environment variable:
    export ANTHROPIC_API_KEY=your_api_key_here

Configuration

This project uses two configuration files:

config.toml

Contains task definitions and environment settings for mise:

  • Sets up Node.js and Python environments
  • Defines tasks for setting up Claude, bundling repos, and generating various analysis outputs
  • Configures paths and dependencies between tasks
  • Uses environment variables to avoid hardcoded paths

mise.toml

Simple configuration that ensures the latest Python version is used.

Templates

The repository includes several prompt templates for different analysis tasks:

Template Purpose
code-review-gen.md Generate thorough code reviews
github-issues-gen.md Create GitHub-compatible issue descriptions
issue-prompts-gen.md Create effective prompts for addressing code issues
missing-tests-gen.md Identify test coverage gaps
readme-gen.md Generate project documentation

Usage

The repository provides several pre-configured tasks:

Setup

# Set up the Claude integration
mise run llm:setup_claude

# Register all templates with llm
mise run llm:register_templates

Analysis Workflows

# Generate a code review
mise run llm:generate_code_review

# Generate GitHub issues
mise run llm:generate_github_issues

# Generate issue prompts
mise run llm:generate_issue_prompts

# Generate missing tests report
mise run llm:generate_missing_tests

# Generate a README
mise run llm:generate_readme

Intermediate Tasks

# Create repository bundle (if not exists)
mise run llm:clean_bundles

# Copy bundle to clipboard for external use
mise run llm:copy_buffer_bundle

Workflow

  1. The workflow typically starts by using repomix to bundle your repository content into a single file (repomix-output.txt)
  2. This bundled content is then passed to the appropriate llm template using Claude
  3. The analysis output is saved to a corresponding markdown file (e.g., code-review.md, github-issues.md)

Output Files

Each analysis task generates a corresponding output file:

  • code-review.md: Detailed code review
  • github-issues.md: Potential issues in GitHub format
  • issue-prompts.md: Prompts for addressing issues
  • missing-tests.md: Test coverage analysis
  • README.md: Project documentation

Extending

To add new templates:

  1. Create a new markdown file in the templates/ directory
  2. Add a new task in config.toml to register and use the template

License

Not specified in the provided code.

Contributing

No contribution guidelines are specified in the provided code.

About

mise llm config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published