CLI · remove
cem remove
Safely delete env keys, custom middlewares and feature modules — with confirmation prompts, batch support, and automatic unwiring.
Remove env variables
bash
# Single
cem remove env RESEND_API_KEY
# Batch
cem remove env CORS_ORIGIN BCRYPT_ROUNDS PASSWORD_RESET_SECRET
# alias
cem rm env CORS_ORIGIN BCRYPT_ROUNDSScrubs each key from .env, .env.example and src/app/config/index.ts in a single unified confirmation prompt.
Remove custom middlewares
bash
cem remove middleware requestLogger
cem remove middleware requestLogger errorLogger
cem rm middleware requestLogger errorLoggerPrompts for confirmation, then permanently deletes each middleware file.
Remove modules
bash
cem remove module Task
cem remove module Task Category Review
cem rm module Task CategoryFor each module, CEM will:
- Prompt for confirmation (the operation is destructive).
- Delete
src/app/modules/<Name>/. - Unwire the import and router registration from
src/app/routes/index.ts. - Skip missing modules with a warning.
Safety net
Always commit your work first. CEM prompts before destructive operations but there is no undo — clean git state is your safety net.