Metadata-Version: 2.1
Name: holy-cli
Version: 1.0.2
Summary: Holy is a CLI tool that makes it effortless to create, manage and connect to servers in your AWS account
Author-email: Holy <holy.cli.email@gmail.com>
License: MIT License
        
        Copyright (c) 2023 Jason M
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/holy-cli/cli
Project-URL: Bug Tracker, https://github.com/holy-cli/cli/issues
Keywords: aws,cloud,server,cli,holy,development,instance,ec2
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: click>=8.1
Requires-Dist: boto3>=1.28
Requires-Dist: boto3-stubs[ec2,iam,ssm]>=1.28
Requires-Dist: yaspin>=2.5
Requires-Dist: tabulate>=0.9
Provides-Extra: tests
Requires-Dist: pytest; extra == "tests"

# Holy

Holy is a CLI tool that makes it effortless to create, manage and connect to servers in your AWS account.

If you need to quickly create EC2 instances for development and testing, this tool is for you. It abstracts away all of the configuration for VPC, IAM, security group, key pair etc into one command (`holy server create`).

[Demo video →](https://github.com/holy-cli/cli/assets/501743/0ef07eb5-f816-47d1-bce1-ac8c41c689dd)

## Installation

Please make sure you have Python 3.9 or newer (`python --version`):

```bash
pip install holy-cli
holy --help
```
Problems? [Visit the wiki →](https://github.com/holy-cli/cli/wiki)

## Upgrade

```bash
pip install --upgrade holy-cli
```

## Configuration

[Watch our AWS setup guide →](https://youtu.be/5fGvWRDhGTM)

To run Holy commands, you will need to have credentials to your AWS account set. Holy will look for credentials the same way as the AWS CLI or SDK does (e.g. inside [~/.aws/credentials file](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) or as [environment variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)).

Ensure the IAM user for those credentials has the `AdministratorAccess` permission policy attached.

## Usage

Create a server:

```bash
# No options, create with a random name using amazon-linux OS on a micro instance (within the free tier):

holy server create

# Create with a specific name, using ubuntu on a large compute optimized instance with 30GB disk space:

holy server create my_server --os=ubuntu:22 --type=c4.large --disk-size=30

# Create with a specific Amazon machine image:

holy server create my_server --image-id="ami-00d5053dee71cee04"

# Create and open ports 22 and 3000 to the world:

holy server create my_server --ports="22,3000"

# Create and allow the server to list all S3 buckets:

holy server create my_server --actions="s3:ListAllMyBuckets"

# Create and run a script once launched:

holy server create my_server --script=/path/to/install_software.sh
```

SSH into a server:

```bash
# SSH straight in:

holy server ssh my_server

# Save SSH config for use later (VS Code, ssh command etc):

holy server ssh my_server --save

# SSH in with a particular username:

holy server ssh my_server --username=root
```

Manage inbound server ports:

```bash
# Open port 80 to the world:

holy server port my_server --action=open --port=80

# Close port 80 to the world:

holy server port my_server --action=close --port=80

# Open port 80 to a specific IP address:

holy server port my_server --action=open --port=80 --ip=1.2.3.4
```

List all servers:

```bash
holy server list

# Filter to just servers running
holy server list --running
```

Specific server actions:

```bash
# View info about a server
holy server info my_server

# Start a server
holy server start my_server

# Stop a server
holy server stop my_server

# Delete a server
holy server delete my_server
```

Remove all infrastructure created by holy:

```bash
holy teardown
```

## Support
* Visit the [wiki](https://github.com/holy-cli/cli/wiki) for more details and FAQ's
* Create a [new discussion](https://github.com/holy-cli/cli/discussions) for any questions
* Create an [issue](https://github.com/holy-cli/cli/issues) for bug reports and feature requests

## Development

Clone this repo and pip install:

```bash
pip install -e .[tests]
pytest # run unit tests
```
