Repository navigation
Enhance usage documentation and README navigation #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Usage Guide | ||
|
|
||
| This guide summarizes how to run AI Shell from the command line, select operating modes, and choose the right provider for your environment. | ||
|
|
||
| ## ⚙️ Command-Line Quick Reference | ||
|
|
||
| | Option | Description | | ||
| | ------ | ----------- | | ||
| | `--mode {translator,assistant,metasploit,wapiti}` | Run a specific mode without the interactive selector. | | ||
| | `--provider {gemini,local}` | Choose the LLM backend (Gemini API or local Ollama). | | ||
| | `--config <file>` | Path to a custom YAML configuration file. | | ||
| | `--api-key <key>` | Override the Gemini API key for this run. | | ||
| | `--no-confirmation` | Skip confirmation prompts for generated commands. | | ||
| | `--log-level {DEBUG,INFO,WARNING,ERROR}` | Override the logging level. | | ||
| | `--version` | Display AI Shell version. | | ||
|
|
||
| Configuration precedence follows: **CLI flags → environment variables → `config.yaml` → defaults**. | ||
|
|
||
| ## 🎯 Operating Modes | ||
|
|
||
| ### Translator Mode | ||
| - Start with `ai-shell --mode translator`. | ||
| - Enter natural language prompts and receive a single shell command. | ||
| - Commands are validated before execution; type `exit` to quit. | ||
|
|
||
| ### Assistant Mode | ||
| - Start with `ai-shell --mode assistant`. | ||
| - Conversational guidance with history; responses may include runnable commands. | ||
| - When a command is detected, AI Shell asks for confirmation before running it. | ||
|
|
||
| ### Metasploit Assistant | ||
| - Start with `ai-shell --mode metasploit` (requires `msfconsole`). | ||
| - A Metasploit shell opens; prefix prompts with `?` to ask the AI for help. | ||
| - Confirm before executing AI-suggested commands; type `exit` inside msfconsole to leave. | ||
|
|
||
| ### Wapiti Assistant | ||
| - Start with `ai-shell --mode wapiti` (requires `wapiti` on PATH). | ||
| - Opens a Bash session tailored for web security tasks; prefix prompts with `?` to get AI-generated commands. | ||
| - Confirm before execution; exit the shell to return to your terminal. | ||
|
|
||
| ## 🤖 Provider Setup | ||
|
|
||
| ### Gemini (Cloud) | ||
| - Export your key: `export GEMINI_API_KEY="your_key"`. | ||
| - Run with `--provider gemini` or set `llm.provider: gemini` in `config.yaml`. | ||
| - You can override the key per run with `--api-key`. | ||
|
|
||
| ### Local (Ollama) | ||
| - Install Ollama and pull a model (e.g., `ollama pull llama3`). | ||
| - Start AI Shell with `--provider local`; the guided prompt helps select a model and host/port. | ||
| - Connection details are stored in the config for future runs. | ||
|
|
||
| ## 🛡️ Security & Confirmation | ||
|
|
||
| - By default, AI Shell validates commands and asks for confirmation before executing. | ||
| - Use `--no-confirmation` for automation or when running in a controlled environment. | ||
| - Adjust safety lists in `config.yaml` under `security.dangerous_commands` and `security.safe_commands`. | ||
|
|
||
| ## 📚 Where to Go Next | ||
|
|
||
| - **Configuration details:** [docs/CONFIGURATION.md](CONFIGURATION.md) | ||
| - **Architecture overview:** [docs/ARCHITECTURE.md](ARCHITECTURE.md) | ||
| - **Examples & tutorials:** [docs/EXAMPLES.md](EXAMPLES.md) | ||
| - **Troubleshooting tips:** [docs/TROUBLESHOOTING.md](TROUBLESHOOTING.md) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two consecutive blank lines here, which creates inconsistent spacing within the code block. Consider removing one blank line to maintain consistent formatting throughout the example commands section.