コマンド
Astreus CLIの全コマンドとキーボードショートカットの完全なリファレンスです。これらのコマンドを使って、エージェント開発セッションを管理し、モデルを切り替え、ワークフローを整理しましょう。
Astreus CLIの全コマンドとキーボードショートカットの完全なリファレンスです。これらのコマンドを使って、エージェント開発セッションを管理し、モデルを切り替え、ワークフローを整理しましょう。
スラッシュコマンド
| コマンド | 説明 |
|---|---|
/model [name] | AIモデルを変更する(名前を指定しない場合はセレクターを開く) |
/provider [name] | AIプロバイダーを変更する(名前を指定しない場合はセレクターを開く) |
/sessions | セッションマネージャーを開く |
/new | 新しいチャットセッションを開始する |
/attach <path> | ファイルまたはフォルダをアタッチする |
/attachments | 現在のアタッチメントを表示する |
/clear-attachments | すべてのアタッチメントをクリアする |
/pwd | 現在の作業ディレクトリを表示する |
/tools | 登録されているツールを表示する |
/graph | グラフ/セッションの状態を表示する |
/settings | 設定パネルを開く |
/clear | チャット履歴をクリアする |
/help | 利用可能なコマンドを表示する |
/exit | CLIを終了する |
コマンドエイリアス
より速く入力できるよう、以下のショートカットが使えます。
| エイリアス | フルコマンド |
|---|---|
/session | /sessions |
/add または /a | /attach |
/ca | /clear-attachments |
/status | /graph |
/quit または /q | /exit |
キーボードショートカット
| ショートカット | アクション |
|---|---|
Ctrl+C | CLIを終了する |
Escape | 現在の操作をキャンセルする |
↑/↓ | コマンド履歴または候補を移動する |
Tab | コマンドをオートコンプリートする |
? | コマンドショートカットの表示を切り替える |
組み込みファイルツール
CLIは、エージェントプロジェクトを管理するための強力なファイルシステムツールを提供します。AIはこれらを使ってエージェント、プラグイン、設定を作成したり、コードを変更したりします。
| ツール | 説明 |
|---|---|
read_file | ファイルの内容を読み込む |
write_file | ファイルに内容を書き込む(必要に応じてディレクトリを作成) |
edit_file | 特定の内容を置き換えてファイルを編集する |
list_directory | ディレクトリの内容を一覧表示する |
create_directory | 新しいディレクトリを作成する |
delete_file | ファイルまたはディレクトリを削除する |
move_file | ファイルまたはディレクトリを移動・リネームする |
search_files | 名前パターンでファイルを検索する |
セッション管理
セッションの表示
/sessionsセッションマネージャーが開き、以下が行えます。
- 保存されているすべてのセッションを表示
- セッション間を切り替え
- 古いセッションを削除
- セッションのメタデータ(日付、メッセージ、モデル)を確認
新しいセッションの開始
/new以前のセッションを保持したまま、新しいセッションを作成します。
セッションの自動保存
すべての会話は自動的に保存されます。CLIを再起動すると、続きから再開できます。
ファイルアタッチメント
ファイルをアタッチする
/attach ./src/index.ts会話のコンテキストにファイルをアタッチします。AIはこのファイルを読み取り、参照できます。
フォルダをアタッチする
/attach ./srcフォルダ全体をアタッチします。フォルダがアタッチされると、それがファイル操作の作業ディレクトリになります。
ドラッグアンドドロップ
ファイルパスをターミナルに直接ドラッグアンドドロップすることもできます。
アタッチメントの表示
/attachments現在アタッチされているすべてのファイルとフォルダを表示します。
アタッチメントのクリア
/clear-attachmentsまたはショートカットを使用します。
/caモデル切り替え
クイック切り替え
/model gpt-4o指定したモデルに即座に切り替えます。
インタラクティブ選択
/model現在のプロバイダーで利用可能なすべてのモデルを表示するインタラクティブなモデルセレクターを開きます。
プロバイダーの変更
/provider claude別のプロバイダーに切り替えます。適切なAPIキーが設定されている必要があります。
サンプルセッション: エージェントの構築
You: /attach ./my-agent
Attached folder: ./my-agent (working directory set)
You: What's the current agent configuration?
Astreus: Let me check the project structure.
[Tool: list_directory] Listing ./my-agent...
[Tool: read_file] Reading ./my-agent/src/agent.ts...
This is an Astreus agent project with:
- Agent configured with GPT-4o model
- Memory enabled for conversation persistence
- No knowledge base configured yet
- No custom plugins
You: Add a knowledge base and ingest our docs folder
Astreus: I'll add knowledge base support to your agent.
[Tool: edit_file] Updating ./my-agent/src/agent.ts...
[Tool: write_file] Creating ./my-agent/src/ingest-docs.ts...
Done! I've updated your agent with:
- Knowledge base enabled in agent config
- Created ingest-docs.ts script to load your documentation
- Run `npx ts-node src/ingest-docs.ts` to ingest docs
You: Create a plugin for fetching weather data
Astreus: I'll create a weather plugin for your agent.
[Tool: create_directory] Creating ./my-agent/src/plugins...
[Tool: write_file] Creating ./my-agent/src/plugins/weather.ts...
[Tool: edit_file] Updating ./my-agent/src/agent.ts to register plugin...
Done! Weather plugin created with:
- get_weather tool for current conditions
- get_forecast tool for 5-day forecast
- Proper TypeScript types and error handling
- Registered in your agent configurationサンプルセッション: 新しいエージェントのスキャフォールディング
You: Create a code review agent that can analyze PRs
Astreus: I'll create a complete code review agent project.
[Tool: create_directory] Creating ./code-review-agent...
[Tool: write_file] Creating package.json...
[Tool: write_file] Creating tsconfig.json...
[Tool: write_file] Creating .env.example...
[Tool: write_file] Creating src/agent.ts...
[Tool: write_file] Creating src/index.ts...
[Tool: write_file] Creating src/plugins/github.ts...
Done! Code review agent created with:
- Claude model (better for code analysis)
- GitHub plugin for PR fetching
- Memory for tracking reviewed PRs
- System prompt optimized for code review
Run these commands to get started:
cd code-review-agent
npm install
cp .env.example .env # Add your API keys
npm run dev最終更新日: 2026年7月6日
このセクション内