cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: MIT Imports: 19 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 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
}

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
}

DmenuOption represents a selectable option in dmenu mode

Jump to

Keyboard shortcuts

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