Skip to content

Subcommand flag is --json (boolean) instead of --format (markdown|json|csv) #22

Description

@DTTerastar

Severity

major

Summary

Every export subcommand exposes a boolean --json flag rather than the contract's --format markdown|json|csv. As a result:

  • Users can't request markdown at all (it's not the default and there's no flag for it).
  • The documented behaviour in prime / README — --format json, --format csv — does not work on the shipped binary.
  • Cross-CLI shell scripts that pass --format json to every quantcli tool fail here.

Reproduce

$ withings-export activity --help
Flags:
  --json           Output as JSON instead of CSV
  --since string   ...
$ withings-export activity --format json
Error: unknown flag: --format
$ withings-export activity --format markdown
Error: unknown flag: --format

Same on sleep, workouts, measurements, intraday.

Expected

Per the contract and the source's own validateFormat helper in cmd/shared.go:

--format markdown   (default)
--format json       (pretty-printed JSON array; epoch seconds for timestamps)
--format csv        (spreadsheet-friendly columnar output)

Implemented on main (PR #7) — missing from v0.2.1 (see #14). If --json needs to live on for backwards compat, alias it to --format json and mark it deprecated.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions