Skip to content

manudiv16/eaws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

EAWS - Simple AWS CLI

A simple AWS CLI tool built with Go and Cobra that provides easy access to AWS services like ECS, CloudWatch Logs, and CodePipeline.

Features

  • πŸš€ Interactive CLI - Uses interactive prompts for easy navigation
  • 🎨 Colorized Output - Beautiful colored output for better readability
  • 🐳 ECS Support - List and connect to ECS containers
  • πŸ“Š CloudWatch Logs - Query and view CloudWatch logs
  • πŸ”„ CodePipeline - Monitor pipeline status and details
  • πŸ” AWS Profile Support - Works with AWS profiles and granted tool

Installation

Prerequisites

  • AWS CLI configured
  • granted (optional, for profile management)

Quick Install (Recommended)

For macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/manudiv16/eaws/main/install.sh | bash

This script will:

  • Detect your OS and architecture
  • Download the latest release
  • Install to /usr/local/bin
  • Verify the installation

Homebrew (macOS/Linux)

# Add the tap
brew tap manudiv16/eaws

# Install
brew install eaws

# Update
brew upgrade eaws

Manual Installation

  1. Download the binary from the releases page
  2. Extract (if needed) and move to your PATH:
    # Example for Linux
    tar -xzf eaws-linux-amd64.tar.gz
    sudo mv eaws-linux-amd64 /usr/local/bin/eaws
    chmod +x /usr/local/bin/eaws

Build from Source

# Clone the repository
git clone https://github.com/manudiv16/eaws.git
cd eaws

# Build and install
make install-local

# Or for development (creates symlink)
make install-local-dev

Uninstall

# Using the uninstall script
curl -fsSL https://raw.githubusercontent.com/manudiv16/eaws/main/uninstall.sh | bash

# Or manually
sudo rm /usr/local/bin/eaws

# Or with Homebrew
brew uninstall eaws

Usage

Basic Commands

# Show help
eaws --help

# Use with specific AWS profile
eaws --profile my-profile [command]

# Enable verbose output
eaws --verbose [command]

Container Management

# List all containers in clusters
eaws container list
# or
eaws c l

# Connect to a container
eaws container connect  
# or
eaws c c

CloudWatch Logs

# Query logs using CloudWatch Insights
eaws logs query
# or
eaws l q

# View log streams
eaws logs view
# or
eaws l v

CodePipeline

# Show pipeline status
eaws pipeline

# Show detailed pipeline information
eaws pipeline --debug
# or
eaws p -d

Configuration

AWS Profile

The tool supports AWS profiles in several ways:

  1. Command line flag: --profile my-profile
  2. Environment variable: AWS_PROFILE=my-profile
  3. Granted tool: If available, will use assume command

Environment Variables

  • AWS_PROFILE: Set the AWS profile to use
  • NO_COLOR: Disable colored output

Examples

List ECS Containers

$ eaws container list
βœ“ Selected cluster: my-cluster

Services in cluster:
  β€’ web-service
  β€’ api-service
  β€’ worker-service

Connect to ECS Container

$ eaws container connect
βœ“ Selected cluster: my-cluster
βœ“ Selected service: web-service
βœ“ Using task: arn:aws:ecs:...
βœ“ Container: web-app
βœ“ EC2 Instance: i-1234567890abcdef0
βœ“ Starting session with command: sudo docker exec -ti abc123 sh

View Pipeline Status

$ eaws pipeline
βœ“ Selected pipeline: my-app-pipeline

Pipeline Status Summary:

Source - Succeeded
  Source - Succeeded 2024-01-15T10:30:00Z

Build - InProgress  
  Build - InProgress 2024-01-15T10:35:00Z

Deploy - NotStarted
  Deploy - NotStarted

Migration from Bash Script

This Go version provides the same functionality as the original bash script with these improvements:

  • Better Error Handling: Proper error messages and handling
  • Interactive Prompts: Replaces fzf with built-in prompt library
  • Cross-platform: Works on macOS, Linux, and Windows
  • No External Dependencies: No need for jq, fzf, or other tools
  • Faster Execution: Compiled binary vs interpreted script
  • Better AWS Integration: Native AWS SDK instead of CLI calls

Dependencies

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors