An unofficial, community-driven shell plugin for Eaze Editor that gives AI agents direct, secure access to your system's shell.
Features β’ MCP Tools β’ Installation β’ Configuration β’ Security β’ Building β’ Contributing
The Autonomous Shell Plugin empowers AI agents inside Eaze Editor with the ability to create persistent shell sessions, execute commands synchronously or asynchronously, interact with programs that prompt for user input, and monitor long-running processes β all governed by a robust security layer.
It exposes its capabilities as MCP (Model Context Protocol) tools using the @Tool annotation, making them automatically discoverable by any AI model connected to the editor.
| Problem | Solution |
|---|---|
| AI agents can't run shell commands | Provides execute_command_sync and execute_command_async tools |
| No way to interact with prompts | send_shell_input sends keystrokes to interactive sessions |
| Long-running processes block the AI | Async execution + get_command_result polling pattern |
| Repeated output wastes tokens | Token Optimization returns only new (delta) output |
| Dangerous commands could be run | Configurable Blacklist / Whitelist safety filter |
| AI doesn't know system specs | get_system_info reports real RAM, CPU, GPU, and OS details |
- Persistent Shell Sessions β Create isolated shell environments that maintain state (environment variables, working directory) across multiple commands.
- Synchronous Execution β Run short-lived commands and get the result immediately, with configurable timeout (hours / minutes / seconds).
- Asynchronous Execution β Launch long-running tasks (servers, builds, scripts) in the background and poll for output.
- Interactive Input β Send text input to interactive programs (e.g., answering
y/nprompts, typing into a REPL). - Token Optimization β When enabled,
get_command_resultonly returns new output since the last call, dramatically reducing token consumption for log-heavy processes. - Command Safety Filter β Blacklist or whitelist mode to prevent dangerous commands from being executed.
- System Information β Reports accurate physical RAM, CPU count, GPU name + VRAM (via
nvidia-smi), JVM memory, and OS details. - Settings UI β A beautiful, tabbed settings page (General / Security / Advanced) served directly inside the editor.
The plugin registers the following tools that are automatically discoverable by AI models:
| Tool | Description |
|---|---|
create_shell_session |
Creates a new persistent shell session. Returns a unique sessionId required by all other tools. |
list_shell_sessions |
Lists all active sessions with their IDs and creation timestamps. |
terminate_shell_session |
Terminates and cleans up a specific session by ID. Always call this when done. |
clear_all_shell_sessions |
Force-terminates all active sessions. Use with caution. |
| Tool | Parameters | Description |
|---|---|---|
execute_command_sync |
sessionId, command |
Runs a command and blocks until completion or timeout. Best for quick commands like ls, pwd, cat. |
execute_command_async |
sessionId, command, interactive |
Starts a background command. Set interactive=true for programs requiring user input. Returns a commandId. |
get_command_result |
sessionId, commandId |
Retrieves output from an async command. Supports Token Optimization (delta-only output). |
send_shell_input |
sessionId, input |
Sends text input to an interactive command. Append \n to simulate pressing Enter. |
| Tool | Description |
|---|---|
get_system_info |
Returns OS name/version/arch, physical RAM, GPU info, CPU count, JVM memory, and working directory. |
1. create_shell_session β sessionId = "sess-abc123"
2. execute_command_sync β "ls -la" (quick)
3. execute_command_async β "npm start" β commandId = "cmd-xyz"
4. get_command_result (poll) β new output since last call
5. send_shell_input β "y\n" (respond to prompt)
6. terminate_shell_session β clean up
- Download the latest
autonomous-shell-eaze-editor-plugin-1.0.0.jarfrom the Releases page. - Place the JAR in your Eaze Editor's plugin directory.
- Restart the editor β the plugin registers itself automatically via annotations.
See Building from Source below.
The plugin provides a built-in settings UI accessible from the editor's plugin settings panel. Settings are organized into three tabs:
| Setting | Default | Description |
|---|---|---|
| Command Safety Filter | Off |
Master toggle for command filtering. |
| Global Timeout | 0h 1m 0s |
Maximum execution time for synchronous commands. Configurable in hours, minutes, and seconds. |
| Setting | Default | Description |
|---|---|---|
| Filter Mode | Blacklist |
Blacklist β block listed commands; Whitelist β allow only listed commands. |
| Command List | (empty) | Comma-separated base commands to filter (e.g., rm, mkfs, dd, shutdown). |
if mode == "whitelist":
command is ALLOWED only if it is IN the list
elif mode == "blacklist":
command is BLOCKED only if it is IN the list
# If the list is empty:
# Blacklist β all commands allowed
# Whitelist β all commands blocked
| Setting | Default | Description |
|---|---|---|
| Token Optimization | On |
When enabled, get_command_result returns only new output since the last query (delta mode). When disabled, returns the complete accumulated output every time. |
Call 1: full output = "line 1\nline 2" β returns "line 1\nline 2"
Call 2: full output = "line 1\nline 2\nline 3" β returns "line 3" (delta only)
Call 3: (command finished) β tracking data is cleaned up
This significantly reduces token consumption when polling long-running server logs or build output.
β οΈ This plugin grants AI agents direct access to your system's shell.
- Never run the editor as root/admin unless absolutely necessary.
- Enable the Safety Filter and use
Whitelistmode in production or shared environments. - Review the command list β pre-populate it with dangerous commands like
rm -rf,mkfs,dd,format,shutdown,reboot. - Monitor session activity β use
list_shell_sessionsto audit active environments. - Terminate sessions when done to prevent orphaned processes consuming system resources.
The filter extracts the base command (first word) from the input and checks it against the configured list:
Input: "rm -rf /important/data" β Base command: "rm"
Input: "sudo apt install foo" β Base command: "sudo"
For detailed security information, see SECURITY.md.
- Java 25 (JDK)
- Gradle 9.3.1+ (or use the included Gradle wrapper)
# Clone the repository
git clone https://github.com/nurujjamanpollob/autonomous-shell-eaze-editor-plugin.git
cd autonomous-shell-eaze-editor-plugin
# Build the plugin JAR
./gradlew jar # Linux / macOS
gradlew.bat jar # WindowsThe output JAR is generated at:
build/libs/autonomous-shell-eaze-editor-plugin-1.0.0.jar
./gradlew testautonomous-shell-eaze-editor-plugin/
βββ build.gradle # Build configuration
βββ sdks/ # Compile-time & runtime SDK dependencies
β βββ eaze_editor_code_sdk.jar # Host SDK (compile-only, provided at runtime)
β βββ autonomous-shell-executor-1.0.0.jar # Shell execution engine (bundled)
β βββ plugin_library-1.0-SNAPSHOT.jar # Plugin framework library (bundled)
βββ src/
β βββ main/
β β βββ java/com/pollob/eazeeditor/plugin/shell/
β β β βββ Main.java # Entry point
β β β βββ mcp/
β β β β βββ ShellMCP.java # MCP tool definitions (AI tools)
β β β βββ pluginlifecycle/
β β β β βββ PlugInLifeCycleObserver.java # Plugin lifecycle hooks
β β β βββ setting/
β β β β βββ ShellSettingDiscovery.java # Annotation-based settings registration
β β β β βββ ShellSettingsHandler.java # Settings HTTP handler & API
β β β βββ util/
β β β βββ Vars.java # Constants, setting keys, defaults
β β βββ resources/autonomous-shell-plugin/
β β βββ settings.html # Settings UI (tabbed, Tailwind CSS)
β β βββ about.html # Documentation / About page
β β βββ script.js # Settings frontend logic
β β βββ tailwind.cdn.js # Tailwind CSS (offline CDN)
β βββ test/
β βββ java/.../InteractiveMCPTest.java # Interactive integration test
| Dependency | Scope | Bundled? | Purpose |
|---|---|---|---|
eaze_editor_code_sdk.jar |
compileOnly |
No β provided by host | Editor core APIs, Plugin APIs, Settings SDK |
autonomous-shell-executor-1.0.0.jar |
implementation |
Yes | Shell process management engine |
plugin_library-1.0-SNAPSHOT.jar |
implementation |
Yes | Plugin framework utilities |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Eaze Editor Host β
β βββββββββββββββ ββββββββββββββββ ββββββββββββββββββ β
β β AI Model β β Plugin API β β Settings API β β
β ββββββββ¬βββββββ ββββββββ¬ββββββββ βββββββββ¬βββββββββ β
β β β β β
βββββββββββΌβββββββββββββββββΌββββββββββββββββββββΌβββββββββββ
β β β
βββββββββββΌβββββββββββββββββΌββββββββββββββββββββΌβββββββββββ
β βΌ βΌ βΌ β
β βββββββββββββββ ββββββββββββββββ ββββββββββββββββββ β
β β ShellMCP β β Lifecycle β β Settings β β
β β (@Tool) β β Observer β β Handler β β
β ββββββββ¬βββββββ ββββββββββββββββ ββββββββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββ β
β β ShellExecutor β Autonomous Shell Plugin β
β β (Session Mgmt, β β
β β Process I/O) β β
β ββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Component | Class | Responsibility |
|---|---|---|
| MCP Tools | ShellMCP |
Annotated with @EazeAiComponent and @Tool β exposes shell capabilities to AI models. |
| Lifecycle | PlugInLifeCycleObserver |
Handles ON_LOAD, ON_CLOSE, ON_ERROR lifecycle phases. Initializes the settings handler on load. |
| Settings Discovery | ShellSettingDiscovery |
Annotation-based (@PluginSettingsDiscovery) auto-registration with the editor's settings system. |
| Settings Handler | ShellSettingsHandler |
Extends BaseSettingsHandler to serve the settings UI and handle GET/POST API routes. |
| Constants | Vars |
Centralized plugin name, setting keys, and default values. |
The project includes an interactive integration test (InteractiveMCPTest.java) that exercises the full tool chain:
- Retrieves system information
- Creates a shell session
- Executes a synchronous command (
java -version) - Compiles and runs an interactive Java program asynchronously
- Polls output and sends user input via
sendShellInput - Verifies the complete output and cleans up
Run it directly:
./gradlew test
# Or run the main method in InteractiveMCPTest for the full interactive demoContributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
./gradlew test - Submit a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
Nurujjaman Pollob
- GitHub: @nurujjamanpollob
- Eaze Editor for the plugin SDK and platform
- Tailwind CSS for the settings UI styling
Made with β€οΈ for the Eaze Editor community