To upload use directly aws-upload without any other command.
As arguments use <proj> which is a label for a project and <env> which is a label for an environment.
Usage
# Upload according the setting file blog.dev.json
# proj: blog
# env: dev
$ aws-upload blog dev
Available commands
# diff
Syntax
diff
The diff command prints all the files in local that are not yet in sync with the remote host.
As argument, it accepts a key <proj>.<env>.
Usage
# See all the files not synced yet
# proj: blog
# env: dev
$ aws-upload diff blog.dev
# keys
Syntax
keys
The keys command prints all the projects' keys which represent all the setting files you have.
Each Key is a combination of a label for a <project> and a label for a <environment>.
A key has the format <proj>.<env>.
Some possibles examples are: blog.dev, blog.prod, api.dev.
You can use a key to directly use a setting file in combination with an action.
Usage
# See all the keys
$ aws-upload keys
# projs
Syntax
projs
The projs command prints all the projects available.
You can use than the project label to edit, copy or envs.
Usage
# See all the projects labels
$ aws-upload projs
# envs
Syntax
envs <proj>
The envs command prints all the environments for a specific project.
As argument, it accepts a project label proj.
Usage
# Assuming you have as a keys: blog.dev blog.prod
$ aws-upload envs blog
# Echos: dev prod
# new
Syntax
new <key>
The new command creates a new setting file which is used to store al the settings relative to a proj and env.
As argument, it accepts a new key <proj>.<env>.
Usage
# Create a new setting file blog.qa.json
# proj: blog
# env: qa
$ aws-upload new blog.qa
# edit
Syntax
edit <key>
The edit command edits a setting file.
It is a shortcut, it will be used your default $EDITOR for editing.
As argument, it accepts an existing key <proj>.<env>.
# To setup $EDITOR
# Add this line to ~/.zshrc
export EDITOR="/usr/bin/vim"
Usage
# Edit an existing setting file blog.dev.json
# proj: blog
# env: dev
$ aws-upload edit blog.dev
# copy
Syntax
copy <src> <dest>
The copy command is a shortcut to help you copy a setting file.
As argument it accepts two keys: <src> which is an exisiting key <proj>.<env> and
<dest> which is a new key.
It is useful when you want to create a similar setting file, maybe just changing the environment.
Usage
# Copy blog.dev.json to blog.staging.json
# src: blog.dev
# dest: blog.staging
$ aws-upload copy blog.dev blog.staging
# delete
Syntax
delete <key>
The delete command is a shortcut to help you delete a setting file.
As argument, it accepts an existing key <proj>.<env>.
Usage
# delete blog.dev.json
$ aws-upload delete blog.dev
# import
Syntax
import <src>
The import command to help you import a setting file.
As argument, it accepts a <src> path which is the path of an existing json file.
Usage
# import setting file ~/Desktop/blog.dev.json
$ aws-upload import ~/Desktop/blog.dev.json
# export
Syntax
export <key> [<dest>]
The export command to help you export a setting file.
As argument, it accepts an existing key <key> and an optional value <dest> path which is the path of an existing folder.
The basic behavior is that aws-upload will create a copy of the specified setting file in the current working directory.
If the <dest> path is specified the setting file will be copied in there.
Usage
# export blog.dev in current working directory
$ cd ~/
$ aws-upload export blog.dev
# create ~/blog.dev.json
# export blog.dev in specific folder
$ cd ~/
$ aws-upload export blog.dev ~/Desktop
# create ~/Desktop/blog.dev.json
# check
Syntax
check <key>
The check command checks a setting file for debugging and provide useful information.
It is used in debugging. It checks if your pem file has the right permissions, if the folders you put in the setting file are ready to use or if there is any issue with the json syntax in the setting file.
As argument, it accepts an existing key <proj>.<env>.
Usage
# Assuming you want to chek blog.dev.json
$ aws-upload check blog.dev
# selfupdate
Syntax
(self-update | selfupdate)
The selfupdate command allows you to updates aws-upload to the latest version.
It's a shortcut for composer.
Usage
# Run a self update
$ aws-upload selfupdate
# autocomplete
Syntax
autocomplete
The autocomplete command enable the autocomplete plugin for oh-my-zsh.
If you want to install the plugin manually, you can follow the instruction in the guide.
Usage
# Run the autocomplete
$ aws-upload autocomplete
Output Options
# verbose
Syntax
-v | --verbose
The verbose option helps you when you need more information displayed.
It is commonly used in a debug situation.
To use it, append -v or --verbose at the end of a command.
Usage
# To get more info on upload
# Eg: see excluded files and stats
$ aws-upload blog dev -v
# quiet
Syntax
-q | --quiet
The quiet option helps you to reduce the amount of information displayed.
It is commonly used when you want to use aws-upload in a bash script.
To use it, append -q or --quiet at the end of a command.
Usage
# Suppress hints on no projects
$ aws-upload projs -q
Miscellaneous Options
# help
Syntax
-h | --help
The help option prints the usage help information page.
Usage
# Print the help page
$ aws-upload -h
# version
Syntax
-V | --version
The version option prints the application version.
Usage
# Print the application version
$ aws-upload -V
# simulate
Syntax
--simulate
The simulate option helps in debugging the rsync command.
It displays the rsync command without upload anything.
It is commonly used in a debug situation.
To use it, append --simulate at the end of a command.