aa3cccead5
Implements Phase 1 of v0.1 Foundation:
- go.mod with Go 1.25
- cmd/orca/main.go entry point
- internal/cli/root.go with global --json flag
- internal/cli/version.go (orca version)
- internal/cli/init.go (orca init - creates ~/.orca/)
- internal/cli/status.go (orca status - shows daemon info)
- internal/cli/node.go (orca node {join,leave,list} - stubs)
- internal/cli/job.go (orca job {run,list,stop,logs} - stubs)
- Makefile (build, test, lint, fmt, release)
- LICENSE (MIT)
- README.md with quickstart
- .gitignore
- .githooks/pre-push + scripts/trigger_coreci.sh (CoreCI trigger)
- Smoke tests in internal/cli/root_test.go
Verified: go build, go test, go vet, gofmt all pass.
---ci---
project: orca
phase: 1
milestone: v0.1
status: execute
req_covered:
- REQ-001
- REQ-002
- REQ-013
- REQ-015
- REQ-016
- REQ-019
- REQ-024
---/ci---
37 lines
966 B
Go
37 lines
966 B
Go
package cli
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var statusCmd = &cobra.Command{
|
|
Use: "status",
|
|
Short: "Show orca daemon status",
|
|
Long: "Display the current status of the local orca daemon, including version, uptime, and connection info.",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
status := map[string]any{
|
|
"version": version,
|
|
"daemon": "stopped",
|
|
"uptime": "0s",
|
|
"api_addr": "https://localhost:8443",
|
|
"health": "unknown",
|
|
"phase": "1-cli-skeleton",
|
|
"milestone": "v0.1",
|
|
}
|
|
if jsonOutput {
|
|
return printJSON(status)
|
|
}
|
|
printText("orca daemon status\n")
|
|
printText(" version: %s\n", version)
|
|
printText(" daemon: %s\n", "stopped (daemon not yet implemented in Phase 1)")
|
|
printText(" api_addr: %s\n", "https://localhost:8443")
|
|
printText(" phase: %s\n", "1-cli-skeleton")
|
|
printText(" milestone: %s\n", "v0.1")
|
|
return nil
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(statusCmd)
|
|
}
|