first commit

This commit is contained in:
Tomas Dvorak
2026-02-22 10:42:17 +01:00
commit 55885a0e8f
239 changed files with 103690 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
package cmd
import (
"fmt"
"time"
"github.com/spf13/cobra"
"github.com/yourorg/devour/internal/ui"
)
var statusCmd = &cobra.Command{
Use: "status",
Short: "Show index status and statistics",
Long: `Display the current status of the Devour index.
Shows:
- Index health
- Document count
- Last update time
- Source status
- Storage usage`,
RunE: runStatus,
}
func runStatus(cmd *cobra.Command, args []string) error {
// Print the small character mascot
ui.PrintCharacterSmall()
fmt.Println()
ui.PrintHeader("Devour Status")
// TODO: Implement actual status check
// Check:
// - Index existence and health
// - Document count
// - Vector count
// - Last sync time
// - Source status
// Placeholder status
ui.PrintKeyValue("Index Health", "⚠️ Not initialized")
ui.PrintKeyValue("Documents", "0 indexed")
ui.PrintKeyValue("Chunks", "0 total")
ui.PrintKeyValue("Vector Dimension", "1536")
ui.PrintKeyValue("Last Updated", "Never")
ui.PrintKeyValue("Storage Used", "0 MB")
fmt.Println()
ui.PrintSection("Sources")
ui.PrintInfo(" None configured")
fmt.Println()
ui.PrintSection("Next Steps")
fmt.Println(" 1. Run 'devour init' to initialize")
fmt.Println(" 2. Run 'devour scrape <source>' to index documents")
// Show when check happened
fmt.Printf("\nStatus as of: %s\n", time.Now().Format(time.RFC3339))
return nil
}