Skip to main content
ooneex spa:remove deletes a spa module you created earlier. It finds the module by name, removes it from the rest of your app, and deletes its directory — so you are left with a clean project, not a half-removed module that breaks the build. It only touches modules that are actually spas: a module whose <name>.yml declares type: "spa". Anything else is left alone. The core app and shared modules are protected and can never be removed, and asking to remove a module that does not exist is reported as an error.

How it works

Removing a spa is more than deleting a folder — references to it live across the project, and leaving them behind would break compilation. The command unwinds them in order, then deletes the directory:
StepWhat happens
ValidateConfirms the named module exists and is type: "spa". The app and shared modules are rejected.
UnregisterCleans up any leftover references in AppModule and SharedModule.
Path aliasRemoves the module’s path alias from the root tsconfig.json.
CommitlintRemoves the module’s scope from the commitlint config.
DeleteDeletes the modules/<kebab-name>/ directory.

CLI command

ooneex spa:remove [options]

Examples

# Interactive: prompts for the module name, then asks you to confirm
ooneex spa:remove
# Remove a specific spa by name
ooneex spa:remove --name=admin
The name is normalized to PascalCase with a trailing Module stripped, and the folder it deletes uses the kebab-case form (so Admin, admin, and AdminModule all resolve to modules/admin/).

Options

OptionDescriptionDefault
--nameName of the spa module to remove.Prompted if omitted
--cwdWorking directory the command runs in.Current directory
--silentSkip prompts, confirmation, and log output.false
This is destructive. The command deletes the entire modules/<name>/ directory and everything in it — commit your work or branch first so you can recover it.
  • Only modules marked type: "spa" can be removed; a non-spa module is rejected.
  • The core app and shared modules are protected and cannot be removed.
  • You will be asked to confirm before anything is deleted — unless you pass --silent, which skips the prompt and removes the module without asking.

What gets cleaned up

When the command finishes, every trace of the module is gone:
  • References to the module in AppModule and SharedModule.
  • The module’s path alias in the root tsconfig.json.
  • The module’s scope in the commitlint config.
  • The modules/<kebab-name>/ directory and all of its files.
Removing a spa does not remove the design module it used. Designs are separate modules — if you no longer need the design, remove it on its own with design:remove.

Use with Claude and Codex

The spa:remove generator ships a matching skill, so you can remove a spa by asking your AI agent in natural language instead of remembering the flags. Initialize the skills once for your agent:
ooneex claude:init
Then ask Claude in plain language — it maps the request to the command and runs it:
Prompt
Remove the admin spa module from this project.
The prompt above maps to ooneex spa:remove --name=admin, then walks through the confirmation before deleting the module.