Skip to content

Simplify remote development on AWS EC2 with workman in confidence.

Notifications You must be signed in to change notification settings

shresthaoshan/workman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workman: A CLI Tool to Manage EC2 Instances

Release Go Version License

Workman is a lightweight, open-source CLI tool designed to simplify the management of AWS EC2 instances. With Workman, you can start, stop, SSH into, configure, list, and remove EC2 instances from the command line. It is built using Go and integrates seamlessly with AWS SDK for Go.


Table of Contents

  1. Features
  2. Installation
  3. Configuration
  4. Usage
  5. Contributing
  6. License

Features

  • Start/Stop EC2 Instances: Start or stop instances with a single command.
  • SSH Integration: Seamlessly SSH into instances using their PEM files.
  • Interactive Configuration: Add new instance configurations interactively.
  • List Instances: View all configured instances along with metadata like LastAccessed.
  • Remove Configurations: Safely remove unused instance configurations.
  • Cross-Platform Support: Build binaries for Linux, macOS (including M-series CPUs), and Windows.
  • AWS Profile Support: Use different AWS profiles for managing multiple accounts.

Installation

  1. Ensure you have Go (>= 1.20) installed on your system.
  2. Clone the repository:
    git clone https://github.com/yourusername/workman.git
    cd workman
  3. Build the binary:
    go build -o workman
  4. Move the binary to a directory in your PATH:
    mv workman /usr/local/bin/

Configuration

  1. Ensure you have AWS credentials configured. You can use the AWS CLI to set them up:
    aws configure
  2. Run the workman CLI to initialize the configuration:
    workman configure
  3. Follow the interactive prompts to add your EC2 instance details.

Usage

Start an Instance

workman start <instance-id>

Stop an Instance

workman stop <instance-id>

SSH into an Instance

workman ssh <instance-id>

List Configured Instances

workman list

Configure a New Instance

workman configure

Remove an Instance Configuration

workman remove <instance-id>

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix:
    git checkout -b feature-name
  3. Commit your changes:
    git commit -m "Add feature-name"
  4. Push to your fork:
    git push origin feature-name
  5. Open a pull request on the main repository.

License

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