Documentation
¶
Overview ¶
Package cli provides the Spartan Scraper command-line interface router.
Responsibilities: - Route top-level commands to their respective handlers. - Handle signal interrupts (SIGINT, SIGTERM) for graceful shutdown. - Provide basic global flag parsing (e.g., version, help).
Does NOT handle: - Implementation of specific command logic (subcommands). - Complex argument parsing (delegated to subcommands).
Invariants/Assumptions: - Assumes os.Args is available and has at least one element (program name). - Expects a valid context and configuration for command routing.
Package cli provides the top-level help text and documentation for Spartan Scraper.
Purpose: - Present the canonical top-level command help for terminal operators.
Responsibilities: - Print top-level help text to stdout. - List available commands and representative usage examples. - Keep operator-facing examples aligned with the currently supported command surface.
Scope: - Static top-level help text only; command routing and subcommand-specific help live elsewhere.
Usage: - Called when users run `spartan help`, `spartan --help`, or provide invalid top-level arguments.
Invariants/Assumptions: - Help text is static and intended for terminal output. - Examples should highlight meaningful operator workflows before lower-priority maintenance tasks.
Package cli implements the command-line interface for Spartan. This file specifically handles the 'version' command.
Responsibilities: - Print formatted version information to stdout. - Include build metadata (Commit, Date) and runtime environment (Go version, OS/Arch).
Does NOT handle: - Checking for updates or contacting remote servers. - Machine-readable version output (e.g., JSON).
Invariants/Assumptions: - Relies on the buildinfo package being populated (either by default or via linker flags).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ai implements the Spartan CLI subcommands for bounded AI authoring workflows.
|
Package ai implements the Spartan CLI subcommands for bounded AI authoring workflows. |
|
Package batch provides CLI commands for batch job operations.
|
Package batch provides CLI commands for batch job operations. |
|
Package common provides shared CLI helpers used across command modules.
|
Package common provides shared CLI helpers used across command modules. |
|
Package manage contains CLI commands for configuration/data management (auth/export/templates/states/jobs/schedule).
|
Package manage contains CLI commands for configuration/data management (auth/export/templates/states/jobs/schedule). |
|
Package scrape contains crawl CLI command wiring.
|
Package scrape contains crawl CLI command wiring. |
|
Package server contains health CLI command wiring.
|
Package server contains health CLI command wiring. |