classifier: drop redundant kiro default config
autosel: add Kiro CLI model support
Update dependencies to latest versions
AUTOSEL is a tool designed to automatically classify whether Linux kernel commits should be backported to stable trees. It leverages machine learning and large language models to analyze commits and provide recommendations.
Clone this repository:
git clone https://github.com/sashal/autosel.git
cd autosel
Build the project:
cargo build --release
Optional: Build with CUDA support for faster embeddings:
cargo build --release --features cuda
Set the following environment variables for the LLM providers you want to use:
ANTHROPIC_API_KEY - For Claude modelsOPENAI_API_KEY - For OpenAI models (GPT-4, etc.)NVIDIA_API_KEY - For NVIDIA modelsKIRO_API_KEY - For Kiro (alternatively, use an existing kiro-cli browser login)For Kiro, no API key is needed if you already have an authenticated kiro-cli session (browser login). Set KIRO_API_KEY for headless/CI environments.
Basic usage:
./target/release/autosel --kernel-repo ~/path/to/linux --models claude
Analyze a specific commit:
./target/release/autosel --kernel-repo ~/path/to/linux --models claude --commit <SHA>
Analyze multiple commits:
./target/release/autosel --kernel-repo ~/path/to/linux --models claude --commits <SHA1> <SHA2> <SHA3>
Train the model on existing data:
./target/release/autosel --kernel-repo ~/path/to/linux --train
Generate and view prompts without sending them:
./target/release/autosel --kernel-repo ~/path/to/linux --commit <SHA> --make-prompt ./prompts
You can use AUTOSEL with local LLMs or free alternatives to commercial APIs using the --make-prompt option:
Generate prompts without sending to any API:
./target/release/autosel --kernel-repo ~/path/to/linux --commit <SHA> --make-prompt ./my-prompts
This saves structured prompts to the specified directory that you can manually feed to any LLM:
cat ./my-prompts/prompt_<SHA>.txt | llm-cli --model my-local-model
Compatible with various local LLM runners:
Workflow example with Ollama:
# Generate the prompt file for a commit
./target/release/autosel --kernel-repo ~/path/to/linux --commit abc123 --make-prompt ./prompts
# Process with Ollama using a local code-capable model
cat ./prompts/prompt_abc123.txt | ollama run codellama:7b > result.txt
# Examine results
cat result.txt
Tips for using with local LLMs:
Batch processing with saved explanations:
./target/release/autosel --kernel-repo ~/path/to/linux --models claude,openai --commits <SHA1> <SHA2> --batch ./explanations
SPDX-License-Identifier: GPL-2.0 (c) 2025, Sasha Levin sashal@kernel.org
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.