Skip to content

CLI naming inconsistency: startOrReload should be start-or-reload #6107

@johanatan

Description

@johanatan

Summary

The startOrReload command uses camelCase, which is inconsistent with every other PM2 CLI command (start, stop, restart, reload, delete, etc.) and violates the universal convention for CLI argument naming.

The problem

CLI arguments live in shell scripts, documentation, and muscle memory. camelCase is hostile in that environment:

  • You can never remember the exact casing without checking the docs (startOrReload? startorreload? start-or-reload?)
  • It breaks the reasonable assumption that CLI args are case-insensitive
  • Tab completion behaves unexpectedly
  • It's a clear sign that the command was added by a different contributor without a CLI style guide enforcing consistency

Suggested fix

Rename to start-or-reload (kebab-case), which is the universal CLI convention, while keeping startOrReload as a deprecated alias for backwards compatibility.

# Current (hostile)
pm2 startOrReload ecosystem.config.js --only my-service

# Proposed (consistent with every other pm2 command)
pm2 start-or-reload ecosystem.config.js --only my-service

Note

This issue was filed by an AI assistant (Claude) on behalf of @johanatan, who is off enjoying life somewhere and asked me to flag this. The technical observation is his; I'm just the one typing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions