A Python-based CLI utility with a plugin architecture for AWS, Kubernetes, Git, and more
Project description
toast-cli
_ _ _ _
| |_ ___ __ _ ___| |_ ___| (_)
| __/ _ \ / _` / __| __|__ / __| | |
| || (_) | (_| \__ \ ||___| (__| | |
\__\___/ \__,_|___/\__| \___|_|_|
Python-based CLI utility with plugin architecture for AWS, Kubernetes, and Git operations.
Features
- Plugin Architecture: Modular design with dynamic command discovery
- AWS Integration: Identity checking, profile management, region selection, SSM integration
- Kubernetes: Context switching, EKS integration
- Git: Repository management, branch creation, pull operations
- Workspace: Directory navigation, environment file management
- Interface: FZF-powered menus, formatted output with Rich
Architecture
- Commands implemented as plugins extending BasePlugin
- Automatic plugin discovery and loading
- Click integration for CLI behavior
- See ARCHITECTURE.md for details
Installation
Requirements
- Python 3.6+
- External tools: fzf, aws-cli, kubectl
- Python packages: click, rich
Install
# From PyPI
pip install toast-cli
# From GitHub
pip install git+https://github.com/opspresso/toast-cli.git
# Development mode
git clone https://github.com/opspresso/toast-cli.git
cd toast-cli
pip install -e .
Usage
toast --help # View available commands
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
toast version # Display version
Examples
# AWS
toast am # Show identity
toast env # Switch profiles
toast region # Switch regions
# Kubernetes
toast ctx # Switch contexts
# Environment Files
toast dot up # Upload to SSM
toast dot down # Download from SSM
toast dot ls # List in SSM
# Git
toast git repo-name clone # Clone repository
toast git repo-name branch -b branch-name # Create branch
toast git repo-name pull -r # Pull with rebase
Creating Plugins
- Create a file in
toast/plugins/ - Extend
BasePlugin - Implement required methods
- Set name and help variables
from toast.plugins.base_plugin import BasePlugin
import click
class MyPlugin(BasePlugin):
name = "mycommand"
help = "Command description"
@classmethod
def get_arguments(cls, func):
func = click.option("--option", "-o", help="Option description")(func)
return func
@classmethod
def execute(cls, **kwargs):
option = kwargs.get("option")
click.echo(f"Executing with option: {option}")
Aliases
alias t='toast'
c() { cd "$(toast cdw)" }
alias m='toast am' # AWS identity
alias x='toast ctx' # Kubernetes contexts
alias d='toast dot' # Environment files
alias e='toast env' # AWS profiles
alias g='toast git' # Git repositories
alias r='toast region' # AWS region
Resources
- Development: See CLAUDE.md for guidelines
- License: GNU GPL v3.0
- Contributing: Via GitHub repository
- Documentation: ARCHITECTURE.md and toast.sh
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
toast_cli-3.2.15.tar.gz
(27.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toast_cli-3.2.15.tar.gz.
File metadata
- Download URL: toast_cli-3.2.15.tar.gz
- Upload date:
- Size: 27.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99d6376ce08f0fac074037a5d021a3b9a9c3629ff85a7832443d73f3fa3ef4dd
|
|
| MD5 |
f9697e8256b074e9eaeba7cd5c9fd7bd
|
|
| BLAKE2b-256 |
421b2e2709506b135c240a96b26e7f0bec583a92ecf0b6a667e366f24317896d
|
File details
Details for the file toast_cli-3.2.15-py3-none-any.whl.
File metadata
- Download URL: toast_cli-3.2.15-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1390493913c985ded4bfc971593ed45accf0b87554d83f96f7c639d5c51233d0
|
|
| MD5 |
8d933f268979e207a7c780ef25ed5e00
|
|
| BLAKE2b-256 |
ed45320c01517d7c508f91192ab20411e8e57591890ca788e3c05b32d185d8ff
|