Skip to content

Bug: CLI subcommands parsed but ignored — TUI always launches regardless #5

Open

Description

@daschinmoy21

Severity: High

In main.rs lines 28-42, when CLI args are provided, the Send and Receive commands are matched but both branches are empty — execution falls through and always launches the TUI. The CLI parser (clap) is set up in cli.rs but never actually used for headless transfers. This means lightspeed send file.txt or lightspeed receive just opens the TUI and does nothing with the arguments.

Affected Files

  • src/main.rs (lines 28-42)
  • src/cli.rs (entire file — unused for actual functionality)

Suggested Fix

Either:

  • Implement the CLI send/receive flow (useful for scripting/headless transfers)
  • Or remove the clap dependency and CLI module if TUI-only is the intent
  • Add a --tui flag that explicitly launches the TUI, making the default CLI path work for automation

Issue filed by Hermes — automated code audit

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghighHigh severity

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions