This release is a pre-release and may not be stable for production use.
elizaOS Shell Plugin (Python)
A secure shell command execution plugin for elizaOS that allows agents to run terminal commands within a restricted directory with command history tracking.
Installation
pip install elizaos-plugin-shell
Features
- Cross-platform support: Works on Linux, macOS, and Windows
- Directory restriction: Commands are restricted to a specified directory for safety
- Command filtering: Configurable list of forbidden commands
- Timeout protection: Automatic termination of long-running commands
- Command history: Tracks command execution history per conversation
- File operation tracking: Monitors file creation, modification, and deletion
- Type safe: Full type annotations with Pydantic models
Configuration
Set the following environment variables:
# Set the allowed directory (commands can only run here)
SHELL_ALLOWED_DIRECTORY=/path/to/safe/directory
# Optional: Set custom timeout in milliseconds (default: 30000)
SHELL_TIMEOUT=60000
# Optional: Add additional forbidden commands (comma-separated)
SHELL_FORBIDDEN_COMMANDS=rm,mv,cp,chmod,chown,shutdown,reboot
Usage
from elizaos_plugin_shell import ShellService, ShellConfig
# Load configuration
config = ShellConfig.from_env()
# Create service
service = ShellService(config)
# Execute a command
result = await service.execute_command("ls -la", conversation_id="conv-123")
if result.success:
print(f"Output: {result.stdout}")
else:
print(f"Error: {result.stderr}")
# Get command history
history = service.get_command_history("conv-123", limit=10)
# Clear history
service.clear_command_history("conv-123")
Security
The plugin enforces several security measures:
- Directory Restriction: All commands execute within
SHELL_ALLOWED_DIRECTORY - Forbidden Commands: Dangerous commands are blocked by default
- Path Traversal Protection: Blocks
../and similar patterns - No Shell Expansion: Commands execute without dangerous shell interpretation
- Timeout Protection: Commands auto-terminate after timeout
License
MIT
Metadata
Release files for elizaos-plugin-shell 2.0.0a5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| elizaos_plugin_shell-2.0.0a5.tar.gz | 14.9 kB | Without provenance | Details for elizaos_plugin_shell-2.0.0a5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| elizaos_plugin_shell-2.0.0a5-py3-none-any.whl | Python 3 | none | any | Details for elizaos_plugin_shell-2.0.0a5-py3-none-any.whl |
Total release size: 31.4 kB
Release files / elizaos_plugin_shell-2.0.0a5.tar.gz
| Download URL | elizaos_plugin_shell-2.0.0a5.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a95a3fafd22cfa409b3783784e8c4cebe83558baff007609b42bce2dc033b43d
|
|
BLAKE2b-256 checksum How to use checksums |
3c1828d0c5c9d58e979826944e3273cb9a0f8f6ad74193065b0a522cf92ae92c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / elizaos_plugin_shell-2.0.0a5-py3-none-any.whl
| Download URL | elizaos_plugin_shell-2.0.0a5-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bd062903b2c63d416e80f3c2d11b6130d40e6e949894d3743a38ca6d7a0965e
|
|
BLAKE2b-256 checksum How to use checksums |
d5de31dacf99fcfe950a7d6d05a3458df4208a5bd27723de6f3f53240e8380e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for elizaos-plugin-shell 2.0.0a5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.