_ _ _ _
| |_ ___ __ _ ___| |_ ___| (_)
| __/ _ \ / _` / __| __|__ / __| | |
| || (_) | (_| \__ \ ||___| (__| | |
\__\___/ \__,_|___/\__| \___|_|_|
Toast is a Python-based CLI utility with a plugin architecture that simplifies the use of CLI tools for AWS, Kubernetes, Git, and more.
- Plugin-based architecture for easy extensibility
- Dynamic command discovery and loading
- AWS Features
- IAM Identity Checking (
toast am
) - AWS Profile Management (
toast env
) - AWS Region Management (
toast region
)
- IAM Identity Checking (
- Workspace Features
- Directory Navigation (
toast cdw
)
- Directory Navigation (
- Environment Management
- .env.local file management with AWS SSM integration (
toast dot
)
- .env.local file management with AWS SSM integration (
- Kubernetes Features
- Context Switching (
toast ctx
)
- Context Switching (
- Git Features
- Git Repository Management (
toast git
)
- Git Repository Management (
Toast uses a plugin-based architecture powered by Python's importlib and pkgutil modules:
- Each command is implemented as a separate plugin
- Plugins are automatically discovered and loaded at runtime
- New functionality can be added without modifying existing code
See ARCHITECTURE.md for detailed information about the design.
- Python 3.6+
- Click package
- External tools used by various plugins:
- fzf: Interactive selection in terminal
- jq: JSON processing for formatted output
- aws-cli: AWS command line interface
- kubectl: Kubernetes command line tool
# Install from PyPI
pip install toast-cli
# Update to latest version
pip install --upgrade toast-cli
# Install specific version
pip install toast-cli==3.0.0
# Install development version from GitHub
pip install git+https://github.com/opspresso/toast-cli.git
# Install in development mode from local clone
git clone https://github.com/opspresso/toast-cli.git
cd toast-cli
pip install -e .
If toast command is not available in your PATH after installation:
# Create a symbolic link to make it available system-wide
sudo ln -sf $(which toast) /usr/local/bin/toast
# View available commands
toast --help
# Run a specific command
toast am # Show AWS identity
toast cdw # Navigate workspace directories
toast ctx # Manage Kubernetes contexts
toast dot # Manage .env.local files
toast env # Manage AWS profiles
toast git # Manage Git repositories
toast region # Manage AWS region
To add a new plugin:
- Create a new Python file in the
plugins
directory - Define a class that extends
BasePlugin
- Implement the required methods (execute and optionally get_arguments)
- Set the name and help class variables
Example plugin:
from plugins.base_plugin import BasePlugin
import click
class MyPlugin(BasePlugin):
name = "mycommand"
help = "Description of my command"
@classmethod
def execute(cls, **kwargs):
click.echo("My custom command execution")
alias t='toast'
# Navigate workspace directories
c() {
cd "$(toast cdw)"
}
# Common Command Aliases
alias m='toast am' # Show AWS identity
alias x='toast ctx' # Manage Kubernetes contexts
alias d='toast dot' # Manage .env.local files
alias e='toast env' # Manage AWS profiles
alias g='toast git' # Manage Git repositories
alias r='toast region' # Manage AWS region
This project is licensed under the GNU General Public License v3.0.
Bug reports, feature requests, and pull requests are welcome through the GitHub repository.