diff --git a/internal/cli/root.go b/internal/cli/root.go index 52dba4c..711df09 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -54,11 +54,52 @@ var logoutCmd = &cobra.Command{ Run: runLogout, } +var inboxCmd = &cobra.Command{ + Use: "inbox", + Short: "View your termail inbox", + Long: "View, search, and manage your termail inbox.", + Run: runInbox, +} + +var inboxReadCmd = &cobra.Command{ + Use: "read [termail_id]", + Short: "Mark termail as read", + Long: "Mark a specific termail as read by ID.", + Args: cobra.ExactArgs(1), + Run: runInboxRead, +} + +var inboxDeleteCmd = &cobra.Command{ + Use: "delete [termail_id]", + Short: "Delete termail", + Long: "Delete a specific termail by ID.", + Args: cobra.ExactArgs(1), + Run: runInboxDelete, +} + +var sendCmd = &cobra.Command{ + Use: "send [username]", + Short: "Send termail to a user", + Long: "Send termail to a specific user by username.", + Args: cobra.ExactArgs(1), + Run: runSend, +} + func init() { + inboxCmd.Flags().StringP("search", "s", "", "Search termails by content, subject, or sender") + inboxCmd.Flags().IntP("limit", "l", 10, "Number of termails to show") + inboxCmd.Flags().IntP("offset", "o", 0, "Number of termails to skip") + inboxCmd.Flags().Bool("unread", false, "Show only unread termails") + + inboxCmd.AddCommand(inboxReadCmd) + inboxCmd.AddCommand(inboxDeleteCmd) + authCmd.AddCommand(registerCmd) authCmd.AddCommand(loginCmd) authCmd.AddCommand(logoutCmd) rootCmd.AddCommand(authCmd) + rootCmd.AddCommand(inboxCmd) + rootCmd.AddCommand(sendCmd) } func Execute() error {