summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohaiminus Sakib <3596793+rode093@users.noreply.github.com>2025-10-27 19:37:07 +0100
committerGitHub <noreply@github.com>2025-10-27 11:37:07 -0700
commit136298e11073c7b34e5a977595c7ba5345ca910e (patch)
treefad0836d82779d2bc2b802cf5bb782b6338f5ca1
parent829b8fdea441208c08c9d231079f46215344cc46 (diff)
downloadzsh-136298e11073c7b34e5a977595c7ba5345ca910e.tar.gz
zsh-136298e11073c7b34e5a977595c7ba5345ca910e.tar.bz2
zsh-136298e11073c7b34e5a977595c7ba5345ca910e.zip
feat(nestjs) Adding NestJS plugin (#13104)
* Adding NestJS command aliases * Removed installation instructions from the README file of NestJS plugin
-rw-r--r--plugins/nestjs/README.md52
-rw-r--r--plugins/nestjs/nestjs.plugin.zsh41
2 files changed, 93 insertions, 0 deletions
diff --git a/plugins/nestjs/README.md b/plugins/nestjs/README.md
new file mode 100644
index 000000000..295618214
--- /dev/null
+++ b/plugins/nestjs/README.md
@@ -0,0 +1,52 @@
+# NestJS Plugin for Oh My Zsh
+
+This plugin provides aliases for common [NestJS CLI](https://docs.nestjs.com/cli/overview) commands.
+
+## Requirements
+
+- [NestJS CLI](https://docs.nestjs.com/cli/overview#installation) installed globally:
+ `npm install -g @nestjs/cli`
+
+## Aliases
+
+| Alias | Command | Description |
+| :------ | :--------------------------- | :------------------------------------------ |
+| `nnew` | `nest new` | Create a new NestJS project |
+| `nb` | `nest build` | Build the NestJS application |
+| `ns` | `nest start` | Start the application |
+| `nsw` | `nest start --watch` | Start the application in watch mode |
+| `nsd` | `nest start --dev` | Start the application in dev mode |
+| `nsdbg` | `nest start --debug --watch` | Start the application in debug & watch mode |
+| `ng` | `nest generate` | Generate a NestJS element |
+| `ngm` | `nest generate module` | Generate a module |
+| `ngc` | `nest generate controller` | Generate a controller |
+| `ngs` | `nest generate service` | Generate a service |
+| `ngg` | `nest generate guard` | Generate a guard |
+| `ngp` | `nest generate pipe` | Generate a pipe |
+| `ngf` | `nest generate filter` | Generate a filter |
+| `ngr` | `nest generate resolver` | Generate a GraphQL resolver |
+| `ngcl` | `nest generate class` | Generate a class |
+| `ngi` | `nest generate interface` | Generate an interface |
+| `ngit` | `nest generate interceptor` | Generate an interceptor |
+| `ngmi` | `nest generate middleware` | Generate a middleware |
+| `ngd` | `nest generate decorator` | Generate a custom decorator |
+| `ngres` | `nest generate resource` | Generate a CRUD resource |
+| `nglib` | `nest generate library` | Generate a new library |
+| `ngsub` | `nest generate sub-app` | Generate a new sub-application (monorepo) |
+| `na` | `nest add` | Add a library to the project |
+| `ni` | `nest info` | Display NestJS project information |
+| `nu` | `nest update` | Update NestJS dependencies |
+
+## Usage
+
+1. Add `nestjs` to the `plugins` array in your `~/.zshrc` file:
+
+```zsh
+plugins=(... nestjs)
+```
+
+2. Restart your terminal or source your `~/.zshrc` file:
+
+```zsh
+source ~/.zshrc
+```
diff --git a/plugins/nestjs/nestjs.plugin.zsh b/plugins/nestjs/nestjs.plugin.zsh
new file mode 100644
index 000000000..9496abdeb
--- /dev/null
+++ b/plugins/nestjs/nestjs.plugin.zsh
@@ -0,0 +1,41 @@
+# Oh My Zsh plugin for NestJS CLI
+
+# Check if nest command exists
+if ! command -v nest &>/dev/null; then
+ return
+fi
+
+# Project creation
+alias nnew='nest new'
+
+# Basic development
+alias nb='nest build'
+alias ns='nest start'
+alias nsw='nest start --watch'
+alias nsd='nest start --dev' # Alias for start --watch
+alias nsdbg='nest start --debug --watch'
+
+# Code generation (short aliases)
+alias ng='nest generate'
+alias ngm='nest generate module'
+alias ngc='nest generate controller'
+alias ngs='nest generate service'
+alias ngg='nest generate guard'
+alias ngp='nest generate pipe'
+alias ngf='nest generate filter'
+alias ngr='nest generate resolver'
+alias ngcl='nest generate class'
+alias ngi='nest generate interface'
+alias ngit='nest generate interceptor'
+alias ngmi='nest generate middleware'
+alias ngd='nest generate decorator'
+alias ngres='nest generate resource'
+alias nglib='nest generate library'
+alias ngsub='nest generate sub-app'
+
+# Other commands
+alias na='nest add'
+alias ni='nest info'
+alias nu='nest update'
+
+# You can add more aliases or functions here as needed.