Repository navigation
PR - #15
Merged
Merged
PR#15
Conversation
- ai_shell/plugins/ with ToolPlugin base, registry, auto-discovery - Built-in: Metasploit, Wapiti, Nmap, Docker - Dynamic mode menu + generic run_plugin() PTY runner - docs/PLUGINS.md
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
There was a problem hiding this comment.
Pull request overview
Introduces a new plugin architecture for AI Shell Suite, adding a registry + auto-discovery mechanism and a set of built-in “tool plugins” (security scanners, IaC tools, container tools, etc.), along with initial plugin documentation and a version bump.
Changes:
- Added plugin framework (
ToolPlugin, registry, discovery) underai_shell/plugins/. - Added multiple built-in tool plugin modules (e.g., Metasploit, Wapiti, Trivy, Terraform, AWS, etc.).
- Added
docs/PLUGINS.mdand bumped package version to0.2.3.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/PLUGINS.md | New documentation describing the plugin system, built-in plugins, and usage/examples. |
| ai_shell/plugins/base.py | Core plugin base class, plugin metadata, registry, and module auto-discovery. |
| ai_shell/plugins/init.py | Exposes plugin APIs and triggers discovery on import. |
| ai_shell/plugins/metasploit.py | Adds Metasploit assistant plugin definition and availability check. |
| ai_shell/plugins/wapiti.py | Adds Wapiti assistant plugin definition and availability check. |
| ai_shell/plugins/nmap.py | Adds Nmap assistant plugin definition and availability check. |
| ai_shell/plugins/docker.py | Adds Docker assistant plugin definition and availability check. |
| ai_shell/plugins/podman.py | Adds Podman assistant plugin definition and availability check. |
| ai_shell/plugins/kubectl.py | Adds kubectl assistant plugin definition and availability check. |
| ai_shell/plugins/helm.py | Adds Helm assistant plugin definition and availability check. |
| ai_shell/plugins/git.py | Adds Git assistant plugin definition and availability check. |
| ai_shell/plugins/ansible.py | Adds Ansible assistant plugin definition and availability check. |
| ai_shell/plugins/terraform.py | Adds Terraform/OpenTofu assistant plugin definition and availability check. |
| ai_shell/plugins/aws.py | Adds AWS CLI assistant plugin definition and availability check. |
| ai_shell/plugins/trivy.py | Adds Trivy assistant plugin definition and availability check. |
| ai_shell/plugins/systemd.py | Adds systemd assistant plugin definition and availability check. |
| ai_shell/plugins/network.py | Adds network diagnostics assistant plugin definition and availability check. |
| ai_shell/plugins/pulumi.py | Adds Pulumi assistant plugin definition and availability check. |
| ai_shell/plugins/postgres.py | Adds Postgres/psql assistant plugin definition and availability check. |
| ai_shell/init.py | Bumps package version from 0.2.0 to 0.2.3. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: str = "" # human name shown in menus | ||
| description: str = "" # one-line description | ||
| system_prompt: str = "" # LLM system prompt for this tool | ||
| start_command: List[str] = field(default_factory=lambda: ["bash"]) # command to exec in PTY |
Comment on lines
+8
to
+18
| METASPLOIT_SYSTEM_PROMPT = ( | ||
| "You are a world-class cybersecurity expert and penetration testing assistant. " | ||
| "The user is currently inside the Metasploit Framework console (`msfconsole`). " | ||
| "Your primary goal is to help the user conduct their penetration test effectively and safely. " | ||
| "Provide guidance, explain concepts, and suggest the exact `msfconsole` commands to achieve their goals. " | ||
| "When you provide a command for the user to execute, you MUST enclose it in a ```bash ... ``` markdown block. " | ||
| "Example commands include `search cve:2021 type:exploit`, `use exploit/windows/smb/ms17_010_eternalblue`, " | ||
| "`set RHOSTS 10.10.1.5`, `run`, etc. " | ||
| "Always prioritize ethical considerations and user safety. Be conversational and act as a senior " | ||
| "penetration tester mentoring a junior." | ||
| ) |
Comment on lines
+8
to
+21
| WAPITI_SYSTEM_PROMPT = ( | ||
| "You are a world-class web application security expert. The user is in a shell environment " | ||
| "with the `wapiti` tool available. " | ||
| "Your primary goal is to help the user scan web applications for vulnerabilities effectively. " | ||
| "Provide guidance, explain web vulnerabilities (like XSS, SQLi, LFI), and suggest the exact " | ||
| "`wapiti` commands to perform scans. " | ||
| "When you provide a command for the user to execute, you MUST enclose it in a ```bash ... ``` " | ||
| "markdown block. " | ||
| "Example commands include `wapiti -u http://example.com`, " | ||
| "`wapiti -u http://test.com -m xss,sqli --scope domain`, " | ||
| "`wapiti -u http://vulnerable.site -x http://vulnerable.site/logout`. " | ||
| "Always remind the user to only scan applications they have explicit permission to test. " | ||
| "Be conversational and act as a senior security analyst." | ||
| ) |
Comment on lines
+18
to
+22
| | `terraform` | Terraform Assistant | `terraform` or `tofu` | | ||
| | `aws` | AWS Assistant | `aws` | | ||
| | `trivy` | Trivy Assistant | `trivy` | | ||
| | `systemd` | Systemd Assistant | `systemctl` | | ||
| | `network` | Network Assistant | `ip` / `ss` / `ifconfig` | |
Comment on lines
+145
to
+149
| def discover_plugins() -> None: | ||
| """ | ||
| Auto-discover and import all modules under ai_shell.plugins | ||
| (except base and __init__). Modules should register themselves | ||
| via the @register_plugin_class decorator or by calling register_plugin(). |
| """AI Shell Suite — An intelligent multi-modal command-line assistant.""" | ||
|
|
||
| __version__ = "0.2.0" | ||
| __version__ = "0.2.3" |
Comment on lines
+26
to
+31
| ```bash | ||
| ai-shell --mode kubectl | ||
| ai-shell -m git -p local | ||
| ais -m terraform | ||
| ais -m ansible --dry-run | ||
| ``` |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Briefly describe the changes in this PR.
Type of Change
Please delete options that are not relevant.
Related Issues
Closes #(issue number)
Changes Made
Testing
python -m pytest tests/)black ai_shell/ tests/)flake8 ai_shell/ tests/)Security Considerations
Documentation
Screenshots (if applicable)
Add screenshots to help explain your changes.
Checklist
Additional Notes
Add any other notes about the PR here.