cmd

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	Color   string `help:"Color output: auto, always, never." enum:"auto,always,never" default:"auto"`
	JSON    bool   `help:"JSON output to stdout; disables colors."`
	Plain   bool   `help:"TSV output to stdout; disables colors."`
	Verbose bool   `help:"Enable debug logging."`

	VersionFlag kong.VersionFlag `help:"Print version."`

	Version      VersionCmd `cmd:"" help:"Print version."`
	Config       ConfigCmd  `cmd:"" help:"Manage configuration."`
	Search       SearchCmd  `cmd:"" help:"Search job listings."`
	LinkedIn     SiteCmd    `cmd:"" name:"linkedin" help:"Search LinkedIn."`
	Indeed       SiteCmd    `cmd:"" name:"indeed" help:"Search Indeed."`
	Glassdoor    SiteCmd    `cmd:"" name:"glassdoor" help:"Search Glassdoor."`
	ZipRecruiter SiteCmd    `cmd:"" name:"ziprecruiter" help:"Search ZipRecruiter."`
	Stepstone    SiteCmd    `cmd:"" name:"stepstone" help:"Search Stepstone."`
	Seen         SeenCmd    `cmd:"" help:"Seen jobs utilities."`
	Proxies      ProxiesCmd `cmd:"" help:"Proxy utilities."`
}

func NewCLI

func NewCLI() *CLI

type ConfigCmd

type ConfigCmd struct {
	Init InitConfigCmd `cmd:"" help:"Write default config and proxies files."`
	Path PathConfigCmd `cmd:"" help:"Print config directory."`
}

type Context

type Context struct {
	Out        io.Writer
	Err        io.Writer
	UI         *ui.UI
	Config     config.Config
	ConfigDir  string
	Logger     zerolog.Logger
	Verbose    bool
	JSONOutput bool
	PlainText  bool
	Version    string
	ColorMode  ui.ColorMode
}

type InitConfigCmd

type InitConfigCmd struct{}

func (*InitConfigCmd) Run

func (c *InitConfigCmd) Run(ctx *Context) error

type PathConfigCmd

type PathConfigCmd struct{}

func (*PathConfigCmd) Run

func (c *PathConfigCmd) Run(ctx *Context) error

type ProxiesCmd

type ProxiesCmd struct {
	Check ProxyCheckCmd `cmd:"" help:"Validate proxies against a target URL."`
}

type ProxyCheckCmd

type ProxyCheckCmd struct {
	Target  string `help:"Target URL." default:"https://www.google.com"`
	Timeout int    `help:"Timeout in seconds." default:"15"`
}

func (*ProxyCheckCmd) Run

func (p *ProxyCheckCmd) Run(ctx *Context) error

type ProxyCheckResult

type ProxyCheckResult struct {
	Proxy     string `json:"proxy"`
	Status    string `json:"status"`
	LatencyMS int64  `json:"latency_ms"`
	Error     string `json:"error,omitempty"`
}

type SearchCmd

type SearchCmd struct {
	Query string `arg:"" optional:"" help:"Search query (comma-separated). Optional when --query-file is provided."`
	Sites string `help:"Comma-separated list of sites (default: all)." default:"all"`
	SearchOptions
}

func (*SearchCmd) Run

func (s *SearchCmd) Run(ctx *Context) error

type SearchOptions

type SearchOptions struct {
	Location   string `help:"Job location." env:"JOBCLI_DEFAULT_LOCATION"`
	Country    string `help:"Country code (Indeed/Glassdoor)." env:"JOBCLI_DEFAULT_COUNTRY"`
	Limit      int    `help:"Maximum results per query." env:"JOBCLI_DEFAULT_LIMIT"`
	Offset     int    `help:"Offset for pagination."`
	Remote     bool   `help:"Remote-only roles."`
	JobType    string `help:"Job type filter (fulltime, parttime, contract, internship)." enum:",fulltime,parttime,contract,internship" default:""`
	Hours      int    `help:"Jobs posted in the last N hours."`
	Format     string `help:"Output format: csv, json, md." enum:",csv,json,md" default:""`
	Links      string `help:"Table link display: short or full." enum:"short,full" default:"full"`
	Output     string `name:"output" short:"o" help:"Write output to a file."`
	Out        string `name:"out" help:"Alias for --output."`
	File       string `name:"file" help:"Alias for --output."`
	Proxies    string `help:"Comma-separated proxy URLs." env:"JOBCLI_PROXIES"`
	QueryFile  string `help:"Path to JSON file with queries or a full search profile."`
	Seen       string `help:"Path to seen jobs JSON file."`
	NewOnly    bool   `help:"Output only unseen jobs (requires --seen)."`
	NewOut     string `help:"Write unseen jobs JSON to a file (requires --seen)."`
	SeenUpdate bool   `help:"Update --seen history file by merging in newly discovered unseen jobs after search completes (requires --seen)."`
}

type SeenCmd added in v0.1.2

type SeenCmd struct {
	Diff   SeenDiffCmd   `cmd:"" help:"Write unseen jobs (A-B) to JSON."`
	Update SeenUpdateCmd `cmd:"" help:"Merge new jobs into seen history JSON."`
}

type SeenDiffCmd added in v0.1.2

type SeenDiffCmd struct {
	New   string `name:"new" required:"" help:"Path to new jobs JSON file (A)."`
	Seen  string `name:"seen" required:"" help:"Path to seen jobs JSON file (B). Missing file is treated as empty."`
	Out   string `name:"out" required:"" help:"Output path for unseen jobs JSON file (C)."`
	Stats bool   `name:"stats" help:"Print comparison stats."`
}

func (*SeenDiffCmd) Run added in v0.1.2

func (c *SeenDiffCmd) Run(ctx *Context) error

type SeenUpdateCmd added in v0.1.2

type SeenUpdateCmd struct {
	Seen  string `name:"seen" required:"" help:"Path to seen jobs JSON file (B). Missing file is treated as empty."`
	Input string `name:"input" required:"" help:"Path to input jobs JSON file to merge into seen history."`
	Out   string `name:"out" required:"" help:"Output path for updated seen jobs JSON."`
	Stats bool   `name:"stats" help:"Print merge stats."`
}

func (*SeenUpdateCmd) Run added in v0.1.2

func (c *SeenUpdateCmd) Run(ctx *Context) error

type SiteCmd

type SiteCmd struct {
	Query string `arg:"" optional:"" help:"Search query (comma-separated). Optional when --query-file is provided."`
	SearchOptions
	Site string `kong:"-"`
}

func (*SiteCmd) Run

func (s *SiteCmd) Run(ctx *Context) error

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (v *VersionCmd) Run(ctx *Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL