Documentation
¶
Overview ¶
Package cli implements the `gseer` command tree (SPEC-03).
M1 scope: the root command, the `version` command (fully working), and stub registrations for every other command listed in SPEC-03 §2 so the help tree is truthful (AC-5.1 stub) — no command is listed that is not registered, and the "Coming later" pointer line is honest about which commands are absent (update/scan/asset/export → exit 64, AC-5.7–5.8). The full command behavior lands in M11; the stubs here say so plainly.
The Search ≠ Scan seam (ADR-0010) is enforced from M1: no command in this package imports any collector/egress package (none exists in the v0.0.1 module; AC-3.1 import-graph test pins the invariant).
Index ¶
Constants ¶
const ( ExitSuccess = 0 // Success (including a zero-result search) ExitInvalidInput = 2 // Invalid query / invalid input ExitConfig = 3 // Configuration failure ExitAuth = 5 // Authentication failure ExitUsagePlanned = 64 // Usage error (wrong args; planned-command pointer) ExitInternal = 70 // Internal error (stack trace only with --verbose) )
Exit codes per SPEC-03 §9. These are stable across every command and surface; the CLI never returns ad-hoc codes.
Variables ¶
var RootCmd = &cobra.Command{ Use: "gseer", Short: "GSEER — Internet Asset Intelligence & Search Engine", Long: `GSEER — Internet Asset Intelligence & Search Engine Discover. Identify. Search. Quick start: gseer setup gseer doctor gseer search 'port==443 && title CONTAINS "login"' Coming later (not in this release — see docs/ROADMAP.md): scan (authorized observation), asset License: GNU AGPL-3.0 — https://github.com/Lutfifakee-Project/GSEER`, CompletionOptions: cobra.CompletionOptions{ DisableDefaultCmd: false, }, SilenceErrors: true, SilenceUsage: true, }
RootCmd is the top-level `gseer` command. Help text matches SPEC-03 §2 verbatim (the "Coming later" pointer line is normative; AC-5.1 parses it).
Functions ¶
func Execute ¶
func Execute() error
Execute runs the root command and returns the cobra error (if any). main.go translates a non-nil error into exit code 1 unless a command has already called os.Exit with a specific code (e.g. 64 for planned commands per AC-5.7–5.8). Command and flag registration happens in init() so Execute is just the dispatch call.
Types ¶
This section is empty.