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.
- 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.
- Ensure you have Go (>= 1.20) installed on your system.
- Clone the repository:
git clone https://github.com/yourusername/workman.git cd workman
- Build the binary:
go build -o workman
- Move the binary to a directory in your PATH:
mv workman /usr/local/bin/
- Ensure you have AWS credentials configured. You can use the AWS CLI to set them up:
aws configure
- Run the
workman
CLI to initialize the configuration:workman configure
- Follow the interactive prompts to add your EC2 instance details.
workman start <instance-id>
workman stop <instance-id>
workman ssh <instance-id>
workman list
workman configure
workman remove <instance-id>
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature-name"
- Push to your fork:
git push origin feature-name
- Open a pull request on the main repository.
This project is licensed under the MIT License. See the LICENSE file for details.