Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions cmd/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ import (
)

var authCmd = &cobra.Command{
Use: "auth",
Short: "Authentication commands",
Use: "auth",
Short: "Authentication commands",
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
cmd.SetOut(cmd.ErrOrStderr())
_ = cmd.Help()
return fmt.Errorf("subcommand required")
},
}

var loginCmd = &cobra.Command{
Expand Down
11 changes: 9 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
package cmd

import (
"fmt"
"os"

"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Use: "withings-export",
Short: "CLI to export health data from Withings",
Use: "withings-export",
Short: "CLI to export health data from Withings",
SilenceUsage: true,
Long: `withings-export reads your personal Withings health data — activity,
sleep, workouts, body measurements, intraday samples — and prints it on
stdout. Default output is narrow, fitdown-style markdown; pass
--format json or --format csv for structured output.

LLM agents: run 'withings-export prime' for a one-screen orientation
(I/O contract, subcommands, date flags, jq recipes).`,
RunE: func(cmd *cobra.Command, args []string) error {
cmd.SetOut(cmd.ErrOrStderr())
_ = cmd.Help()
return fmt.Errorf("subcommand required")
},
}

func Execute() {
Expand Down
Loading