Simplify your AWS & Kubernetes workflow

A powerful, plugin-based CLI tool designed for cloud engineers.

$ pip install toast-cli
$ toast --help
$ 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  # Set AWS region

Overview

Toast-cli is a Python-based CLI tool that provides various utility commands for AWS and Kubernetes management. The architecture follows a plugin-based design pattern, allowing for easy extension of functionality through the addition of new plugins.

🔌

Plugin-based Architecture

Easily extend functionality by adding new plugins without modifying core code.

☁️

AWS Integration

Seamlessly manage AWS regions and identity.

Kubernetes Management

Quickly switch between Kubernetes contexts and manage clusters.

🔄

Git Workflow

Simplify Git operations within your workspace structure.

Installation

Install from PyPI

pip install toast-cli

View on PyPI

Install 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 .

Dependencies

  • Python 3.6+
  • Click - Command-line interface creation
  • External tools:
    • fzf - Interactive selection in terminal
    • jq - JSON processing for formatted output
    • aws-cli - AWS command line interface
    • kubectl - Kubernetes command line tool

Plugins

Toast-cli features a modular plugin architecture. Here are the available plugins:

am

AWS

Show AWS caller identity information

toast am

cdw

Workspace

Navigate to workspace directories

toast cdw

ctx

Kubernetes

Manage Kubernetes contexts

toast ctx

dot

Environment

Manage .env.local files with AWS SSM integration

toast dot ls toast dot up toast dot down

env

AWS

Manage AWS profiles

toast env

git

Git

Manage Git repositories

toast git repo_name clone toast git repo_name rm

region

AWS

Set AWS region

toast region

Architecture

Toast-cli follows a plugin-based architecture that makes it easy to extend and maintain.

Toast-cli Architecture Diagram

Toast-cli Plugin Architecture

Package Structure

toast-cli/
  ├── setup.py            # Package setup script
  ├── setup.cfg           # Package configuration
  ├── pyproject.toml      # Build system requirements
  ├── MANIFEST.in         # Additional files to include
  ├── VERSION             # Version information
  ├── README.md           # Project documentation
  ├── ARCHITECTURE.md     # Architecture documentation
  ├── LICENSE             # License information
  └── toast/              # Main package
      ├── __init__.py     # Package initialization and CLI entry point
      ├── __main__.py     # Entry point for running as a module
      ├── helpers.py      # Helper functions and custom UI elements
      └── plugins/        # Plugin modules
          ├── __init__.py
          ├── base_plugin.py
          ├── am_plugin.py
          ├── cdw_plugin.py
          ├── ctx_plugin.py
          ├── dot_plugin.py
          ├── env_plugin.py
          ├── git_plugin.py
          ├── region_plugin.py
          └── utils.py

Adding New Plugins

To add a new plugin:

  1. Create a new Python file in the plugins directory
  2. Define a class that extends BasePlugin
  3. Implement the required methods (execute and optionally get_arguments)
  4. Set the name and help class variables

The plugin will be automatically discovered and loaded when the application starts.

Benefits of the Plugin Architecture

  • Modularity: Each command is isolated in its own module
  • Extensibility: New commands can be added without modifying existing code
  • Maintainability: Code is organized into logical components
  • Testability: Plugins can be tested independently