Skip to content

Muhammad-Qasim-Munir/b0xctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

b0xctl

A command-line tool for managing AWS EC2 instances with friendly names and colorful output. Save time and money by efficiently managing your EC2 instances with simple commands. Perfect for developers who want to minimize AWS costs by easily starting and stopping instances when needed.

Benefits

  • 💰 Save AWS credits by quickly stopping instances when not in use
  • ⏱️ Reduce time spent managing EC2 instances through AWS Console
  • 🎨 Colorful terminal output for better readability
  • 🔤 Support for friendly instance names
  • 📋 List all instances and their states
  • 🚀 Start, stop, restart, and check status of instances

Prerequisites

  • Python 3.6 or higher
  • AWS CLI installed and configured
  • AWS credentials with EC2 permissions

Installation

  1. Clone the repository:
git clone https://github.com/Muhammad-Qasim-Munir/b0xctl.git
cd b0xctl
  1. Run the install script:
bash install.sh

This will:

  • Install required Python packages
  • Create a symlink to /usr/local/bin/b0xctl
  • Make the script globally executable

Configuration

Edit config.json to add your EC2 instances:

{
  "instances": {
    "b0x": {
      "instance_id": "i-xxxxxxxxxxxxxxxxx",
      "region": "us-east-2"
    },
    "dev": {
      "instance_id": "i-yyyyyyyyyyyyyyyyy",
      "region": "us-west-2"
    }
  },
  "default_instance": "b0x"
}
  • instances: Object containing your EC2 instances
    • Key: Friendly name for the instance
    • Value: Object containing instance_id and region
  • default_instance: Name of the instance to use when no instance is specified

Usage

List all instances

b0xctl list

Check instance status

# Check default instance
b0xctl status

# Check specific instance
b0xctl status b0x

Start an instance

# Start default instance
b0xctl start

# Start specific instance
b0xctl start b0x

Stop an instance

# Stop default instance
b0xctl stop

# Stop specific instance
b0xctl stop b0x

Restart an instance

# Restart default instance
b0xctl restart

# Restart specific instance
b0xctl restart b0x

License

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

About

A command-line tool for managing AWS EC2 instances with friendly names and colorful output. Save time and money by efficiently managing your EC2 instances with simple commands. Perfect for developers who want to minimize AWS costs by easily starting and stopping instances when needed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors