Git-native knowledge CLI — Markdown・Code・Git を横断し、ローカルで高速に知識を引き出す。
CommandIndex は、ローカルで動作するナレッジ検索・文脈取得システムです。 Markdownファイル、ソースコード、Git履歴をもとに、個人および少人数チーム向けの知識検索基盤を提供します。
cargo build --releaseビルド成果物は target/release/commandindex に生成されます。
Releases からプラットフォーム別のバイナリをダウンロードできます。
# インデックスの構築
commandindex index
# 検索
commandindex search "認証の流れ"
# 差分更新
commandindex update
# インデックス状態の確認
commandindex status
# インデックスの削除
commandindex clean
# 2ファイルの影響範囲を比較(コンフリクトリスク検出)
commandindex diff src/auth/jwt.rs src/auth/middleware.rs --format json注意: v0.0.0 時点ではコマンドは未実装です。Phase 1 以降で順次実装されます。
セマンティック検索を利用するには、Ollama でサポートされている embedding モデルが必要です。
| モデル | 次元数 | 特徴 |
|---|---|---|
qllama/bge-m3:q8_0 |
1024 | デフォルト。多言語対応(日本語に強い) |
nomic-embed-text |
768 | 英語中心 |
- Ollama をインストール・起動
- 使用するモデルを事前に pull
# デフォルトモデル
ollama pull qllama/bge-m3:q8_0
# 英語中心モデル
ollama pull nomic-embed-textcommandindex.toml の [embedding] セクションでモデルを変更した場合、次回の commandindex embed または commandindex index --with-embedding 実行時に旧モデルの embedding が自動的に削除され、新モデルで再生成されます。
[embedding]
model = "nomic-embed-text"注意: モデル変更後の再生成にはファイル数に応じた時間がかかります。
v0.x.x 以前からアップグレードした場合、デフォルトモデルが nomic-embed-text から qllama/bge-m3:q8_0 に変更されています。
- 新しいデフォルトモデルをインストール:
ollama pull qllama/bge-m3:q8_0 commandindex embedまたはcommandindex index --with-embeddingを実行すると、旧モデルの embedding は自動的に削除され、新モデルで再生成されます。- 旧モデルを引き続き使用する場合は、
commandindex.tomlに[embedding]セクションでmodel = "nomic-embed-text"を指定してください。
- Rust (Edition 2024)
# ビルド
cargo build
# テスト
cargo test --all
# 静的解析(ゼロ警告必須)
cargo clippy --all-targets -- -D warnings
# フォーマットチェック
cargo fmt --all -- --check| チェック項目 | コマンド | 基準 |
|---|---|---|
| ビルド | cargo build |
エラー 0 件 |
| Clippy | cargo clippy --all-targets -- -D warnings |
警告 0 件 |
| テスト | cargo test --all |
全テスト PASS |
| フォーマット | cargo fmt --all -- --check |
差分なし |
MIT License