Skip to content

npx invocation of CLI does nothing due to missing default command/subcommand mismatch #8

@Pavan-Kumar-KN

Description

@Pavan-Kumar-KN

Problem

Running the CLI locally with Bun (e.g., bun run dev -- run <src> <out>) works as expected. However, invoking the published package via npx appears to do nothing when called as shown in the README:

npx @pavan-kumar-kn/folder_mapper "<path>" "<out>"

Root Cause

The CLI (yargs) currently only registers the subcommand run <path> <output_path> (in command.ts), while the docs/examples show folder_mapper <source> <output>. Calling the binary without the run subcommand produces no handler, so npx returns silently without output or action.

Environment

  • OS: Windows (Git Bash / PowerShell)
  • Package/bin: binindex.js (published)

References

  • command.ts
  • README.md
  • devdoc.md

Expected:

  • Invoking npx @pavan-kumar-kn/folder_mapper "<path>" "<out>" should execute the CLI as documented in the README, or the documentation should be adjusted to reflect the required subcommand.

Actual:

  • No output or action when called as npx @pavan-kumar-kn/folder_mapper ....

Suggested Fixes

  • Register the default command so npx @pavan-kumar-kn/folder_mapper ... works as in the docs.
  • Or update README usage examples to include the required run subcommand.
  • Add a helpful error message or suggestion when no command handler is invoked.

Please investigate the best path forward for a fix and update the CLI and/or documentation for consistency.

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