Perske CLI streamlines the deployment process for JavaScript applications, including React, Angular, Svelte, and more. It simplifies the deployment of static sites on AWS, handling everything from file uploads to domain configuration.
Install Perske CLI globally using npm:
npm install -g perske
Before using Perske CLI, ensure the following requirements are met:
Create an AWS IAM user with these permissions for full functionality:
AmazonS3FullAccessCloudFrontFullAccessAmazonRoute53FullAccessAWSCertificateManagerFullAccessThese permissions enable the CLI to perform essential tasks on AWS, such as S3 bucket operations and domain configuration.
Obtain your AWS Access Key ID and Secret Access Key, then set them in an .env file at your project root:
AWS_ACCESS_KEY_ID='YourAccessKeyId'
AWS_SECRET_KEY='YourSecretAccessKey'
REGION='YourAWSRegion'
Replace YourAccessKeyId, YourSecretAccessKey, and YourAWSRegion with your actual AWS credentials and preferred region.
Perske CLI provides two primary commands:
startInitializes your deployment setup. It gathers necessary information about your application and AWS S3 bucket and performs a build and upload of your application. It can also assist with domain configuration.
perske start
deployIdeal for CI/CD pipelines, this command deploys your application using pre-specified parameters, streamlining updates to your AWS S3 bucket.
perske deploy --bucketName 'your-bucket-name' --buildFolder 'your-build-folder' --cloudFrontId 'your-cloud-front-id'
Replace your-bucket-name, your-build-folder and your-cloud-front-id with your specific details.
Note: The cloudFrontId flag can be left out if you don't have a cloud front distribution for your s3 bucket.
Contributions are welcome! To contribute:
Perske CLI is MIT licensed.