A python port of the remote tool for controlling remote instances on AWS.
The package is pip installable and can be installed directly from github. We recommend using pipx:
pipx install git+https://github.com/ivyleavedtoadflax/remote.py.git
Add the name of your default instance to the config file
remote config add
Check that is was set
remote config show
Start the instance:
remote start
Connect to the instance with ssh
remote connect
Connect to the instance with ssh and port forwarding and verbosity
remote connect -p 1234:localhost:1234 -v
Stop the instance:
remote stop
Get the instance status:
remote status
To run commands on a different instance, pass the name as an argument:
remote status another_ec2_instance
RemotePy uses a simple configuration file to store your default instance and other settings.
The configuration is stored in ~/.config/remote.py/config.ini
# Add default instance interactively
remote config add
# Show current configuration
remote config show
That's it! The config file is the single source of truth for your settings.
This project uses uv for dependency management and requires Python 3.12+.
# Install dependencies
uv sync --dev
# Install pre-commit hooks (optional)
uv run pre-commit install
# Run tests
uv run pytest
# Code formatting and linting
uv run ruff format . # Format code
uv run ruff check . # Lint code
uv run ruff check . --fix # Fix linting issues
# Build package
uv build
The project includes comprehensive testing infrastructure:
# Run all tests
uv run pytest
# Run tests with verbose output
uv run pytest -v
# Run specific test file
uv run pytest tests/test_config.py
- No AWS credentials required - All AWS calls are mocked during testing
- Test isolation - Tests don't interfere with local configuration files
- Comprehensive coverage - Tests for configuration, AWS operations, and CLI commands
The project includes automated CI/CD:
- Tests run automatically on all pushes
- Code quality checks (ruff linting/formatting)
- Manual publishing workflow for PyPI releases