SysAgent CLI is a secure, intelligent command-line assistant for OS automation and control. This guide covers all installation methods and setup instructions.
- Python: 3.8 or higher (3.13 recommended)
- Platform: macOS, Linux, or Windows
- Permissions: Administrative access may be required for certain features
Clone the repository and install in development mode:
# Clone the repository
git clone https://github.com/your-org/sysagent-cli.git
cd sysagent-cli
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e .
# Verify installation
sysagent --helpBuild and install from source:
# Clone and setup
git clone https://github.com/your-org/sysagent-cli.git
cd sysagent-cli
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install build dependencies
pip install build
# Build the package
python -m build
# Install from wheel
pip install dist/sysagent_cli-0.1.0-py3-none-any.whlOnce published to PyPI:
# Install from PyPI
pip install sysagent-cli
# Or with pipx for isolated installation
pipx install sysagent-cliFor system-wide installation:
# Install globally (requires admin privileges)
sudo pip install sysagent-cli
# Or use pipx for isolated global installation
pipx install sysagent-cliAfter installation, SysAgent will create its configuration directory automatically:
# Check configuration
sysagent config --show
# View permissions
sysagent permissions --show
# List available tools
sysagent toolsSet these environment variables for LLM integration:
# OpenAI (recommended)
export OPENAI_API_KEY="your-openai-api-key"
# Ollama (local)
export OLLAMA_BASE_URL="http://localhost:11434"
# Configuration directory
export SYSAGENT_CONFIG_DIR="$HOME/.sysagent"The configuration is stored in ~/.sysagent/config.json:
{
"agent": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.1,
"max_tokens": 2000,
"api_key": null,
"base_url": null,
"timeout": 30
},
"security": {
"dry_run": false,
"confirm_destructive": true,
"log_encryption": false,
"audit_logging": true,
"guardrails_enabled": true
},
"tools": [...],
"plugins": [],
"verbose": false,
"debug": false
}# Show help
sysagent --help
# Check version
sysagent version
# List tools
sysagent tools
# Show configuration
sysagent config --show
# Show permissions
sysagent permissions --show# Run commands with natural language
sysagent run "show system info"
sysagent run "list files in current directory"
sysagent run "clean up temp files"
# Dry run mode
sysagent run "delete old logs" --dry-run
# With confirmation
sysagent run "restart services" --confirm# Start interactive REPL
sysagent repl
# In REPL mode:
# help - Show help
# tools - List tools
# config - Show configuration
# permissions - Show permissions
# exit - Exit REPL- Permissions: Uses AppleScript for permission requests
- Features: Full support for all features
- Installation: Works with all installation methods
- Permissions: Uses
sudo/pkexec/PolicyKit - Features: Full support for all features
- Dependencies: May require additional system packages
- Permissions: Uses UAC for permission requests
- Features: Full support for all features
- Installation: Works with all installation methods
-
Permission Denied
# Grant permissions for specific tools sysagent permissions --show # Follow the prompts to grant permissions
-
Configuration Errors
# Reset configuration sysagent config --reset -
Import Errors
# Reinstall in development mode pip install -e . --force-reinstall
-
LLM Connection Issues
# Check API key echo $OPENAI_API_KEY # Test connection sysagent run "test connection" --debug
Enable debug mode for detailed logging:
# Run with debug
sysagent --debug run "your command"
# Or set globally
export SYSAGENT_DEBUG=trueLogs are stored in ~/.sysagent/logs/:
# View logs
tail -f ~/.sysagent/logs/sysagent.log
# Clear logs
rm ~/.sysagent/logs/*# Install development dependencies
pip install -e ".[dev]"
# Install testing tools
pip install pytest pytest-cov
# Install linting tools
pip install black isort mypy# Run all tests
python -m pytest tests/ -v
# Run with coverage
python -m pytest tests/ --cov=sysagent --cov-report=html
# Run specific test
python -m pytest tests/test_basic.py::test_config_manager# Format code
black src/ tests/
# Sort imports
isort src/ tests/
# Type checking
mypy src/# Install docs dependencies
pip install sphinx sphinx-rtd-theme
# Build docs
cd docs
make html- SysAgent requests permissions only when needed
- Permissions are stored securely
- Users can revoke permissions at any time
- Store API keys in environment variables
- Never commit API keys to version control
- Use keyring for secure storage
- All operations are logged
- Logs can be encrypted
- Audit trail is maintained
# Show help
sysagent --help
# Command-specific help
sysagent run --help
sysagent config --help- Check existing issues on GitHub
- Enable debug mode and collect logs
- Create detailed issue report
- Fork the repository
- Create feature branch
- Make changes with tests
- Submit pull request
SysAgent CLI is licensed under the MIT License. See LICENSE file for details.