# ai.shell

AIがコンピュータのコマンド操作を行うCLIツール

## 概要

ai.shellは、ローカルLLMを活用してコード生成、ファイル操作、プロジェクト管理を行うClaude Codeライクなツールです。

## 必要要件

- macOS
- Rust (1.70+)
- Python (3.9+)
- Ollama (ローカルLLM用)

## インストール

```bash
# 1. リポジトリをクローン
git clone https://git.syui.ai/ai/shell.git
cd shell

# 2. セットアップ(venv環境を~/.config/ai-shellに構築)
make setup

# 3. PATHに追加(~/.zshrcまたは~/.bash_profileに追記)
export PATH="$HOME/.config/ai-shell/bin:$PATH"
```

## 使い方

セットアップ後、以下のコマンドで起動:

```bash
# ai.shellを起動
ai-shell

# または、プロジェクトディレクトリから
make run
```

### コマンド例

```bash
# インタラクティブモード
ai> create a web server in rust
ai> explain this error: [paste error]
ai> /analyze src/main.rs
ai> /create rust my-project

# ワンショット実行
ai-shell exec "create a fibonacci function"
ai-shell analyze src/main.rs
```

## 機能

- 🤖 ローカルLLMによるコード生成
- 📝 ファイル分析と説明
- 🚀 プロジェクトテンプレート作成
- 🎨 カラー出力対応
- 📦 Python venv環境の自動管理

## 設定

設定ファイル: `~/.config/ai-shell/config.toml`

```toml
[server]
host = "127.0.0.1"
port = 8765

[llm]
default_model = "qwen2.5-coder:7b"
```

## アンインストール

```bash
make uninstall
```

## 開発

```bash
# テスト実行
make test

# クリーンアップ
make clean
```

## ライセンス

© syui