mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
feat(cdk): add AWS CDK plugin with aliases and autocompletion
This commit is contained in:
parent
df34d2b8d5
commit
d129155380
2 changed files with 59 additions and 0 deletions
33
plugins/cdk/README.md
Normal file
33
plugins/cdk/README.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# AWS CDK Plugin
|
||||
|
||||
This plugin provides aliases and autocompletion for the
|
||||
[AWS Cloud Development Kit (CDK)](https://aws.amazon.com/cdk/) CLI.
|
||||
|
||||
## Requirements
|
||||
|
||||
- [AWS CDK CLI](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) installed (`npm install -g aws-cdk`)
|
||||
|
||||
## Usage
|
||||
|
||||
Add `cdk` to the plugins array in your `.zshrc`:
|
||||
|
||||
```zsh
|
||||
plugins=(... cdk)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
| ------------ | ----------------- | ---------------------------------- |
|
||||
| `cdkl` | `cdk list` | List all stacks in the app |
|
||||
| `cdksynth` | `cdk synth` | Synthesize CloudFormation template |
|
||||
| `cdkdiff` | `cdk diff` | Compare deployed vs local stack |
|
||||
| `cdkdeploy` | `cdk deploy` | Deploy stack to AWS |
|
||||
| `cdkdestroy` | `cdk destroy` | Destroy deployed stack |
|
||||
| `cdkboot` | `cdk bootstrap` | Bootstrap CDK environment |
|
||||
| `cdkdoc` | `cdk docs` | Open CDK documentation |
|
||||
| `cdkinit` | `cdk init` | Initialize a new CDK project |
|
||||
| `cdkwatch` | `cdk watch` | Watch for changes and auto-deploy |
|
||||
| `cdkctx` | `cdk context` | Manage cached context values |
|
||||
| `cdkack` | `cdk acknowledge` | Acknowledge a notice |
|
||||
| `cdkver` | `cdk --version` | Print CDK version |
|
||||
26
plugins/cdk/cdk.plugin.zsh
Normal file
26
plugins/cdk/cdk.plugin.zsh
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# AWS CDK plugin for Oh My Zsh
|
||||
# Provides aliases and autocompletion for the AWS Cloud Development Kit (CDK) CLI
|
||||
|
||||
# Aliases
|
||||
alias cdkl='cdk list'
|
||||
alias cdksynth='cdk synth'
|
||||
alias cdkdiff='cdk diff'
|
||||
alias cdkdeploy='cdk deploy'
|
||||
alias cdkdestroy='cdk destroy'
|
||||
alias cdkboot='cdk bootstrap'
|
||||
alias cdkdoc='cdk docs'
|
||||
alias cdkinit='cdk init'
|
||||
alias cdkwatch='cdk watch'
|
||||
alias cdkctx='cdk context'
|
||||
alias cdkack='cdk acknowledge'
|
||||
alias cdkver='cdk --version'
|
||||
|
||||
# Autocompletion
|
||||
if command -v cdk &>/dev/null; then
|
||||
_cdk_completion() {
|
||||
local -a completions
|
||||
completions=($(cdk completion 2>/dev/null))
|
||||
compadd -a completions
|
||||
}
|
||||
compdef _cdk_completion cdk
|
||||
fi
|
||||
Loading…
Reference in a new issue