cmd

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = "unknown"
)
View Source
var BootstrapCmd = &cobra.Command{
	Use: "bootstrap",
	Aliases: []string{
		"bs",
	},
	Short: "Manage workstation bootstrap configuration",
	Long: `Manage workstation bootstrap configuration including directories, tools, SSH keys, and dotfiles.

Available subcommands:
  status - Check current bootstrap status
  install - Apply bootstrap configuration to setup this machine
  reset - Reset bootstrap configuration`,
	Run: func(cmd *cobra.Command, args []string) {
		_ = cmd.Help()
	},
}
View Source
var ContainersCmd = &cobra.Command{
	Use:   "containers",
	Short: "Display container and virtualization information",
	Long:  `Display information about containers (Docker, Podman) and virtualization status.`,
	Run: func(cmd *cobra.Command, args []string) {
		PrintContainersInfo()
	},
}
View Source
var DbCmd = &cobra.Command{
	Use:   "db [database]",
	Short: "Display detected databases and their information",
	Long: `Display detected database management systems (DBMS) and their information.

Shows database clients, versions, running status, and database files.

Examples:
  allbctl status db                  # Show all detected databases
  allbctl status db sqlite3          # Show only SQLite3 info
  allbctl status db postgres         # Show only PostgreSQL info
  allbctl status db --detail         # Show detailed info for all databases
  allbctl status db sqlite3 --detail # Show detailed SQLite3 info with .db files`,
	Run: func(cmd *cobra.Command, args []string) {
		if len(args) > 0 {

			dbName := args[0]
			showDatabaseInfo(dbName, dbDetailFlag)
		} else {

			showAllDatabases(dbDetailFlag)
		}
	},
}

DbCmd represents the db command

View Source
var GitConfigCmd = &cobra.Command{
	Use:   "git",
	Short: "Display git global configuration",
	Long:  `Display git global configuration including user name, email, and editor.`,
	Run: func(cmd *cobra.Command, args []string) {
		PrintGitConfigInfo()
	},
}
View Source
var ListPackagesCmd = &cobra.Command{
	Use:   "list-packages [package-manager]",
	Short: "Show package count summary from all detected package managers",
	Long: `Show package count summary from all detected package managers.

By default, shows the same summary as the 'Packages:' section in 'allbctl status'.
	
For system package managers (apt, yum, brew, chocolatey, etc.), only explicitly 
installed packages are counted, not their dependencies.

For programming runtime package managers (npm, pip, gem, etc.), only globally 
installed packages are counted.

If a package manager is not detected on the system, it will not be displayed.

Use --detail flag to see the full list of all installed packages.

You can also specify a specific package manager to list only its packages:
  allbctl list-packages apt
  allbctl list-packages npm
  allbctl list-packages flatpak`,
	Run: func(cmd *cobra.Command, args []string) {
		listInstalledPackages(args)
	},
}

ListPackagesCmd represents the list-packages command

View Source
var NetworkCmd = &cobra.Command{
	Use:   "network",
	Short: "Display network interface information",
	Long: `Display network interface information including IP addresses, router, connection type, VPN status, DNS, and connectivity.

This is the same output shown in the 'Network:' section of 'allbctl status'.`,
	Run: func(cmd *cobra.Command, args []string) {
		PrintNetworkInfo()
	},
}
View Source
var PortsCmd = &cobra.Command{
	Use:   "ports",
	Short: "Display listening ports",
	Long:  `Display count of listening TCP/UDP ports and details about what's listening.`,
	Run: func(cmd *cobra.Command, args []string) {
		PrintPortsInfo()
	},
}
View Source
var ProjectsCmd = &cobra.Command{
	Use:   "projects",
	Short: "Display git repositories in ~/src",
	Long: `Display a summary of git repositories found in ~/src directory.

By default, shows the same summary as the 'Projects:' section in 'allbctl status'.
Dirty repos are marked with an asterisk (*).

Examples:
  allbctl status projects           # Show summary (default, same as status)
  allbctl status projects --all     # Show all repos
  allbctl status projects --dirty   # Show only dirty repos
  allbctl status projects --clean   # Show only clean repos`,
	Run: func(cmd *cobra.Command, args []string) {
		if allFlag || dirtyFlag || cleanFlag {
			printProjectsSummary()
		} else {

			printProjectsInline()
		}
	},
}

ProjectsCmd represents the projects command

View Source
var RuntimesCmd = &cobra.Command{
	Use:   "runtimes",
	Short: "Display detected runtimes and their versions",
	Long: `Display detected programming language runtimes and their versions.

This is the same output shown in the 'Runtimes:' section of 'allbctl status'.`,
	Run: func(cmd *cobra.Command, args []string) {
		PrintRuntimes()
	},
}
View Source
var SecurityCmd = &cobra.Command{
	Use:   "security",
	Short: "Display security and authentication status",
	Long:  `Display information about SSH keys, GPG keys, and kernel keyring.`,
	Run: func(cmd *cobra.Command, args []string) {
		PrintSecurityInfo()
	},
}
View Source
var StatusCmd = &cobra.Command{
	Use:   "status",
	Short: "Display system information (like neofetch)",
	Run: func(cmd *cobra.Command, args []string) {
		printSystemInfo()
	},
}

StatusCmd represents status command

View Source
var SystemctlCmd = &cobra.Command{
	Use:   "systemctl",
	Short: "Display systemd service status",
	Long:  `Display count of running system and user services, and any failed services.`,
	Run: func(cmd *cobra.Command, args []string) {
		PrintSystemctlInfo()
	},
}

Functions

func Execute

func Execute()

Execute comment for execute

func PrintContainersInfo added in v0.0.26

func PrintContainersInfo()

func PrintDatabaseSummaryForStatus added in v0.0.22

func PrintDatabaseSummaryForStatus()

PrintDatabaseSummaryForStatus prints a one-line summary for the main status command

func PrintGitConfigInfo added in v0.0.26

func PrintGitConfigInfo()

func PrintNetworkInfo added in v0.0.25

func PrintNetworkInfo()

PrintNetworkInfo outputs comprehensive network information

func PrintPackageSummary added in v0.0.21

func PrintPackageSummary()

PrintPackageSummary prints package counts for all detected package managers (for status command)

func PrintPortsInfo added in v0.0.26

func PrintPortsInfo()

func PrintRuntimes added in v0.0.21

func PrintRuntimes()

PrintRuntimes outputs the runtimes in inline format (same as status command)

func PrintSecurityInfo added in v0.0.26

func PrintSecurityInfo()

func PrintSystemctlInfo added in v0.0.26

func PrintSystemctlInfo()

Types

type AIAgent added in v0.0.14

type AIAgent struct {
	Name    string
	Version string
}

AIAgent represents an AI coding assistant

type BrowserInfo added in v0.0.18

type BrowserInfo struct {
	Name    string
	Version string
}

BrowserInfo holds browser information

type CPUDetails added in v0.0.18

type CPUDetails struct {
	ModelName      string
	Architecture   string
	Cores          int
	ThreadsPerCore int
	CoresPerSocket int
	Sockets        int
	PhysicalCores  int
	LogicalCores   int
	BaseClock      string
	PCores         int
	ECores         int
	HasPECores     bool
}

CPUDetails holds detailed CPU information

type ContainerInfo added in v0.0.26

type ContainerInfo struct {
	Runtime     string
	Running     int
	Images      int
	ImagesList  []string
	Virtualized bool
	VirtType    string
}

type DatabaseInfo added in v0.0.22

type DatabaseInfo struct {
	Name          string
	ClientBinary  string
	ServerBinary  string
	ClientVersion string
	ServerVersion string
	IsRunning     bool
	DatabaseFiles []string
	EnvVars       map[string]string
	OtherBinaries []string
}

type GPUInfo added in v0.0.18

type GPUInfo struct {
	Name          string
	Vendor        string
	Memory        string
	Driver        string
	ComputeCap    string
	ClockGraphics string
	ClockMemory   string
}

GPUInfo holds detailed GPU information

type GitConfigInfo added in v0.0.26

type GitConfigInfo struct {
	UserName   string
	UserEmail  string
	CoreEditor string
}

type InterfaceInfo added in v0.0.25

type InterfaceInfo struct {
	Name    string
	IP      string
	Status  string
	IsVPN   bool
	Gateway string
}

InterfaceInfo holds interface details

type NetworkDetails added in v0.0.25

type NetworkDetails struct {
	Interfaces     []InterfaceInfo
	VPNActive      bool
	VPNInterface   *InterfaceInfo
	PrimaryIface   *InterfaceInfo
	DefaultGateway string
	DNSServers     []string
	VPNDNSServers  []string
	PublicIP       string
	InternetOK     bool
	WiFiDetails    *WiFiInfo
}

NetworkDetails holds comprehensive network information

type PortInfo added in v0.0.26

type PortInfo struct {
	TCPPorts int
	UDPPorts int
	Ports    []string
}

type RepoInfo added in v0.0.15

type RepoInfo struct {
	Path       string
	ModTime    time.Time
	Dirty      bool
	RemoteRepo string // e.g., "aallbrig/allbctl" or "godotengine/godot"
}

RepoInfo contains information about a git repository

type RuntimeCheck added in v0.0.13

type RuntimeCheck struct {
	Command  []string
	Category string
}

type RuntimeInfo added in v0.0.13

type RuntimeInfo struct {
	Name     string
	Version  string
	Category string
}

type SecurityInfo added in v0.0.26

type SecurityInfo struct {
	SSHKeys     []string
	GPGKeys     []string
	KeyringInfo string
}

type SystemctlInfo added in v0.0.26

type SystemctlInfo struct {
	SystemRunning int
	SystemFailed  int
	UserRunning   int
	UserFailed    int
}

type UpdateInfo added in v0.0.25

type UpdateInfo struct {
	Current   string
	Available string
	IsLTS     bool
}

UpdateInfo holds information about available updates

type WiFiInfo added in v0.0.25

type WiFiInfo struct {
	SSID      string
	Frequency string
	Standard  string
	Signal    string
	Quality   string
	Speed     string
}

WiFiInfo holds WiFi-specific details

Jump to

Keyboard shortcuts

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