Skip to content
Development
Command

/apply

Path to an IacPlan JSON from a prior /nyann:plan run, to apply the exact previewed plan.

From plugin
nyann
741 skills41 commands3 hooks
> /plugin marketplace add thettwe/nyann
> /plugin install nyann@nyann-plugins

Command definition

apply.md
name: nyann:apply
description: >
  Apply an Infrastructure-as-Code change — the highest-stakes mutator in
  nyann; it can change real cloud infrastructure. Re-runs the plan,
  shows it, confirms, then applies. Unmistakably opt-in: apply is never
  the default and destructive applies require a second explicit confirm.
  For IaC apply intent only (not "apply a patch", "apply formatting", or
  DB migrations).
arguments:
  - name: unit
    description: Repo-relative path of a single module/stack/chart/overlay/playbook to apply. Default applies the whole target root.
    optional: true
  - name: apply
    description: Required to actually mutate. Without it the command previews and exits (preview-by-default).
    optional: true
  - name: confirm-destroy
    description: Required (with an explicit user confirmation) to apply a destructive plan that would destroy/replace resources.
    optional: true
  - name: dry-run
    description: Force preview only — wins over --apply. Nothing is mutated.
    optional: true
  - name: plan
    description: Path to an IacPlan JSON from a prior /nyann:plan run, to apply the exact previewed plan.
    optional: true

**Plugin root:** This is a Claude Code plugin, NOT a CLI tool. Do NOT search via `which`, `npm list`, `pip list`, or `brew list`. This file is at `<plugin_root>/commands/`. All scripts: `<plugin_root>/bin/`. Read the matching `skills/*/SKILL.md` for the full flow.

/nyann:apply

Wraps `bin/iac-apply.sh`. **Highest-stakes mutator — can change real cloud infrastructure.** Apply is NEVER the default. Flow:

1. Confirm IaC apply intent + an infra signal (not "apply a patch"). 2. Preview first: `bin/iac-apply.sh --target <cwd> [--unit <path>]` (no `--apply`) → `status:"preview"`, mutates nothing. Show the add/change/destroy summary. 3. Confirm with the user. **AskUserQuestion is MANDATORY on a destructive plan** (any `destroy > 0`, or any advisory plan). 4. Apply: add `--apply` (and `--confirm-destroy --confirmed` ONLY after the user confirms a destroy).

Gate ladder (enforced in the script): plan obtained first → Gate 1 preview-by-default (no `--apply` or any `--dry-run` → preview; `--dry-run` beats `--apply`) → Gate 2 destructive confirmation (destructive plan passes only with `--confirm-destroy true` AND `--confirmed true`, else `refused`) → Gate 3 CLI presence (absent → `skipped`) → execute (tool output goes to your terminal, never captured) → write an IacApplyRecord (metadata only — no secrets/state).

| `.status` | Meaning | |---|---| | `applied` | Apply ran — read `.exit_code`; see `.record_path`. | | `preview` | No `--apply` (or `--dry-run`) — nothing applied. | | `refused` | A gate blocked it (e.g. unconfirmed destroy). Exit 1. | | `skipped` | CLI/backend/creds absent. Exit 0. Nothing applied. |

See `skills/iac-apply/SKILL.md` for the full gate ladder and the DISAMBIGUATION that keeps `/nyann:apply` off the generic word "apply". To only preview → `/nyann:plan`.

Read more
@thettwe
Ships withnyann

ငြမ်း is Burmese for scaffolding. Nyann is the Claude Code plugin that picks expert git defaults for your stack — branching, working hooks (Husky / pre-commit.com / lefthook), commits, releases, CI, docs — then keeps the repo on those rails through every PR

Stars on GitHub

Momentum

stars in total
7
Star history of thettwe/nyann on GitHub, a chart by star-history.com

Other commands on nyann.

bootstrap

bootstrap

Command

Optional profile name to apply. If provided, skip stack detection's recommendation step and load this profile via…

@thettwe@thettweInstall Command
branch

branch

Command

The branch slug (feature/bugfix/hotfix) or version string (release).

@thettwe@thettweInstall Command
check-prereqs

check-prereqs

Command

If passed, emit the probe results as JSON instead of the human table.

@thettwe@thettweInstall Command
cleanup-branches

cleanup-branches

Command

Branch to use as the merge target. Defaults to the profile's primary base branch (auto-resolved through `origin/HEAD`, `main`, or…

@thettwe@thettweInstall Command
commit

commit

Command

Generate a Conventional Commits message from the staged diff and commit after confirmation. Same flow as the natural-language…

@thettwe@thettweInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command