{"modulePath":"github.com/maximilien/weave-cli","version":"v0.15.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stack\n\n## Variables\n\n```go\nvar BackupCmd = \u0026cobra.Command{\n\tUse:   \"backup \u003ccollection\u003e --output \u003cfile\u003e\",\n\tShort: \"Backup a collection from the stack's vector database\",\n\tLong: `Backup a collection from the weave stack's Milvus instance to a portable .weavebak file.\n\nThis command connects to the stack's Milvus instance via port-forwarding and exports\nall documents from the specified collection.\n\nThe backup includes:\n  • All document embeddings (vectors)\n  • All document content and metadata\n  • Images and external storage references\n\nUse case: Create snapshots of your stack collections for disaster recovery or migration.`,\n\tExample: `  # Backup a stack collection\n  weave stack backup Documents --output backups/docs.weavebak\n\n  # Backup without compression\n  weave stack backup Images --output backups/images.weavebak --no-compress\n\n  # Backup all collections\n  weave stack backup --all --output backups/\n\n  # Backup with custom batch size\n  weave stack backup Documents --output backup.weavebak --batch-size 500`,\n\tArgs: func(cmd *cobra.Command, args []string) error {\n\t\tif backupAllCollections {\n\t\t\treturn nil\n\t\t}\n\t\treturn cobra.ExactArgs(1)(cmd, args)\n\t},\n\tRunE: runStackBackup,\n}\n```\nBackupCmd represents the stack backup command\n\n```go\nvar CollectionsCmd = \u0026cobra.Command{\n\tUse:   \"collections\",\n\tShort: \"Manage stack collections\",\n\tLong: `Manage collections in the deployed stack.\n\nCommands:\n  reset   Delete all collections without tearing down infrastructure`,\n}\n```\nCollectionsCmd represents the collections command\n\n```go\nvar DashboardCmd = \u0026cobra.Command{\n\tUse:   \"dashboard\",\n\tShort: \"Manage stack dashboard\",\n\tLong: `Start, stop, and manage the weave stack dashboard.\n\nThe dashboard provides a web interface for interacting with your RAG stack.\nIt can be managed using PM2 (local/VM) or Kubernetes (cloud).\n\nExamples:\n  weave stack dashboard start     # Start dashboard with PM2\n  weave stack dashboard stop      # Stop dashboard\n  weave stack dashboard status    # Show dashboard status\n  weave stack dashboard logs      # Stream dashboard logs`,\n}\n```\nDashboardCmd represents the dashboard command\n\n```go\nvar DownCmd = \u0026cobra.Command{\n\tUse:   \"down\",\n\tShort: \"Stop and remove the stack\",\n\tLong: `Stop all stack services and remove the Kubernetes cluster.\n\nThis command:\n1. Uninstalls Helm releases\n2. Deletes the K8s cluster\n3. Cleans up state files\n\nExample:\n  weave stack down`,\n\tRunE: runDown,\n}\n```\nDownCmd represents the stack down command\n\n```go\nvar IngestCmd = \u0026cobra.Command{\n\tUse:   \"ingest [collection-name] [data-path]\",\n\tShort: \"Ingest data into stack collection(s)\",\n\tLong: `Ingest data into a collection in the deployed stack.\n\nThis command automatically connects to the Milvus instance running in your\nstack and ingests documents using the existing weave ingestion pipeline.\n\nThe command will:\n  1. Detect active stack from .weave-state/\n  2. Port-forward to Milvus (if needed)\n  3. Create collection (if doesn't exist)\n  4. Ingest documents with progress tracking\n  5. Show ingestion summary\n\nExamples:\n  # Ingest PDFs into Documents collection\n  weave stack ingest Documents data/pdfs/\n\n  # Ingest images with custom embedding\n  weave stack ingest Images data/images/ \\\n    --type image \\\n    --embedding text-embedding-3-small\n\n  # Parallel ingestion with custom chunk size\n  weave stack ingest Docs data/ \\\n    --chunk-size 1000 \\\n    --parallel-workers 4 \\\n    --batch-size 20\n\n  # Ingest all collections from weave-stack.yaml\n  weave stack ingest --all\n\n  # Ingest all with restart protection\n  weave stack ingest --all --restart-every 3`,\n\tArgs: cobra.RangeArgs(0, 2),\n\tRunE: runIngest,\n}\n```\nIngestCmd represents the ingest command\n\n```go\nvar InitCmd = \u0026cobra.Command{\n\tUse:   \"init\",\n\tShort: \"Initialize a new weave stack\",\n\tLong: `Initialize a new weave stack by generating weave-stack.yaml.\n\nThis command creates a new stack configuration file with sensible defaults\nfor your chosen runtime environment (Kind, Minikube, EKS, GKE).\n\nTemplates:\n  quickstart  - Minimal stack (1 collection, Milvus, local K8s)\n  production  - Full stack (collections, evals, dashboard)\n  multimodal  - Text + image collections\n  oss         - Ollama + sentence-transformers (no API keys)\n\nExamples:\n  # Initialize with quickstart template for Kind\n  weave stack init --template quickstart --runtime kind\n\n  # Initialize for AWS EKS production\n  weave stack init --template production --runtime eks\n\n  # Initialize with defaults (quickstart + kind)\n  weave stack init`,\n\tRunE: runInit,\n}\n```\nInitCmd represents the stack init command\n\n```go\nvar KubectlCmd = \u0026cobra.Command{\n\tUse:   \"kubectl -- \u003ckubectl-args\u003e\",\n\tShort: \"Run kubectl commands with stack context\",\n\tLong: `Run kubectl commands with the stack's Kubernetes context automatically set.\n\nThis command is a convenience wrapper that automatically adds the --context flag\npointing to your stack's Kubernetes cluster, so you don't have to specify it manually.\n\nExamples:\n  weave stack kubectl -- get pods\n  weave stack kubectl -- describe pod weave-stack-milvus-xyz\n  weave stack kubectl -- get services\n  weave stack kubectl -- logs weave-stack-milvus-xyz --follow\n\nNote: The \"--\" separator is required to separate stack flags from kubectl flags.`,\n\tRunE:                  runKubectl,\n\tDisableFlagParsing:    true,\n\tDisableFlagsInUseLine: true,\n}\n```\nKubectlCmd represents the kubectl passthrough command\n\n```go\nvar LogsCmd = \u0026cobra.Command{\n\tUse:   \"logs [service]\",\n\tShort: \"Stream logs from stack services\",\n\tLong: `Stream logs from services running in the stack.\n\nFor Kubernetes deployments, this streams logs from pods.\nFor PM2 dashboard, use 'weave stack dashboard logs'.\n\nExamples:\n  weave stack logs milvus              # Show last 100 lines from Milvus\n  weave stack logs milvus --follow     # Follow Milvus logs in real-time\n  weave stack logs milvus --tail 50    # Show last 50 lines\n  weave stack logs vectordb -f         # Follow vectordb logs`,\n\tArgs: cobra.MaximumNArgs(1),\n\tRunE: runLogs,\n}\n```\nLogsCmd represents the logs command\n\n```go\nvar PortForwardCmd = \u0026cobra.Command{\n\tUse:   \"port-forward \u003cservice\u003e \u003cport-mapping\u003e\",\n\tShort: \"Forward local port to service\",\n\tLong: `Forward a local port to a service in the stack.\n\nThis command sets up port forwarding from your local machine to a Kubernetes\nservice in the stack, allowing you to access the service as if it were running locally.\n\nThe port mapping format is: LOCAL_PORT:REMOTE_PORT\n\nExamples:\n  weave stack port-forward milvus 19530:19530\n  weave stack port-forward milvus 8080:19530\n  weave stack port-forward vectordb 19530:19530\n\nAfter running this command:\n  - Access Milvus at: localhost:19530\n  - Press Ctrl+C to stop port forwarding\n\nCommon Services:\n  milvus:     19530 (gRPC), 9091 (metrics)\n  dashboard:  3000 (HTTP)`,\n\tArgs: cobra.ExactArgs(2),\n\tRunE: runPortForward,\n}\n```\nPortForwardCmd represents the port-forward command\n\n```go\nvar StatusCmd = \u0026cobra.Command{\n\tUse:   \"status\",\n\tShort: \"Show stack status\",\n\tLong: `Show the status of the stack and its components.\n\nExample:\n  weave stack status`,\n\tRunE: runStatus,\n}\n```\nStatusCmd represents the stack status command\n\n```go\nvar UpCmd = \u0026cobra.Command{\n\tUse:   \"up\",\n\tShort: \"Deploy the stack to Kubernetes\",\n\tLong: `Deploy the complete RAG stack to Kubernetes.\n\nThis command:\n1. Creates a K8s cluster (if needed)\n2. Generates Helm charts from weave-stack.yaml\n3. Deploys infrastructure (VectorDB, etc.)\n4. Waits for services to be ready\n\nExample:\n  weave stack up --runtime kind\n  weave stack up --runtime minikube\n  weave stack up --skip-cluster-creation  # Use existing cluster`,\n\tRunE: runUp,\n}\n```\nUpCmd represents the stack up command\n\n```go\nvar ValidateCmd = \u0026cobra.Command{\n\tUse:   \"validate\",\n\tShort: \"Validate weave-stack.yaml configuration\",\n\tLong: `Validate weave-stack.yaml for correctness.\n\nThis command checks:\n- YAML syntax\n- Required fields\n- Valid values for runtime, vectordb type, etc.\n- Resource specifications\n- Collection schemas\n\nExample:\n  weave stack validate`,\n\tRunE: runValidate,\n}\n```\nValidateCmd represents the stack validate command\n\n","path":"github.com/maximilien/weave-cli/src/cmd/stack","name":"stack","synopsis":"","isRedistributable":true}
