cli

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package cli provides the command-line interface for dumber.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBrowseCmd

func NewBrowseCmd() *cobra.Command

NewBrowseCmd creates the browse command

func NewDmenuCmd

func NewDmenuCmd() *cobra.Command

NewDmenuCmd creates the dmenu command for launcher integration

func NewHistoryCmd

func NewHistoryCmd() *cobra.Command

NewHistoryCmd creates the history command

func NewLogsCmd added in v0.5.0

func NewLogsCmd() *cobra.Command

NewLogsCmd creates the logs command and its subcommands

func NewPurgeCmd added in v0.4.0

func NewPurgeCmd() *cobra.Command

NewPurgeCmd creates the purge command

func NewRootCmd

func NewRootCmd(version, commit, buildDate string) *cobra.Command

NewRootCmd creates the root command for dumber

Types

type CLI

type CLI struct {
	DB            *sql.DB
	Queries       *db.Queries
	Config        *config.Config
	ParserService *services.ParserService
}

CLI holds the database connection, queries, and configuration for the CLI commands

func NewCLI

func NewCLI() (*CLI, error)

NewCLI creates a new CLI instance with database connection and configuration

func (*CLI) Close

func (c *CLI) Close() error

Close closes the database connection

type DmenuOption

type DmenuOption struct {
	Display     string
	Value       string
	Type        string // "input", "shortcut", "history"
	Description string
	FaviconURL  string // URL to favicon for this entry
}

DmenuOption represents a selectable option in dmenu mode

type PurgeFlags added in v0.4.0

type PurgeFlags struct {
	Database     bool
	HistoryCache bool
	BrowserCache bool
	BrowserData  bool
	State        bool
	Config       bool
	All          bool
	Force        bool
}

PurgeFlags holds all the purge command flags

Jump to

Keyboard shortcuts

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