Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mycroft/aika-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aika-rs

License: MIT

A command-line tool that leverages Anthropic's Claude AI models to generate git commit messages and process text-based outputs. Built in Rust, aika-rs provides a seamless interface for interacting with Claude AI from your terminal.

Features

  • 🤖 Generate AI-powered commit messages from git diffs
  • 📋 List available Claude AI models
  • 🔧 Flexible input sources (files, directories, commands)
  • 📝 Customizable prompts via TOML configuration
  • 🔄 Support for streaming responses
  • 🎯 Debug mode for detailed execution information

Installation

Prerequisites

  • Rust toolchain (1.56 or later)
  • Anthropic API key
  • Git (for commit message generation)

Building from Source

git clone https://github.com/mycroft/aika-rs
cd aika-rs
cargo build --release

The binary will be available at target/release/aika

Configuration

Create a configuration file at ~/.config/aika-rs/config.toml (or specify custom location with --config):

[providers.claude]
model = "claude-3-5-sonnet-latest"

[inputs.git-diff-cached]
command = "git diff --cached"

[prompts.commit-message]
prompt = "Generate a concise and descriptive git commit message for the following changes:\n\n```\n{input}\n```"

Environment Variables

  • ANTHROPIC_API_KEY: Your Anthropic API key (required)

Usage

List Available Models

aika list-models

Generate Commit Message

# Using staged changes
aika query

# Using specific files
aika query --input "file:src/main.rs,README.md"

# Using a directory
aika query --input "dir:src"

# Using a specific model
aika query --model "claude-3-5-opus-latest"

# Using a custom prompt
aika query --prompt "custom-prompt-name"

Enable streaming output:

aika query --stream

Debug Mode

Add --debug flag to see detailed execution information:

aika query --debug

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Dependencies

  • Anthropic's Claude API - AI model provider
  • clap - Command line argument parsing
  • ureq - HTTP client
  • Additional dependencies can be found in Cargo.toml

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

AI-based coding helper CLI tool

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages