cmd

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package cmd provides command-line interface functionality for Omnom.

This package implements the CLI using the Cobra library and provides various subcommands for managing the Omnom application:

  • listen: Start the web server
  • create-user: Create a new user account
  • create-token: Generate login or addon tokens
  • set-token: Set a specific token value
  • show-user: Display user information
  • create-bookmark: Add a bookmark from the command line
  • create-config: Generate a default configuration file
  • update-feeds: Manually update all RSS/Atom feeds
  • generate-api-docs-md: Generate Markdown API documentation

The package handles configuration loading, database initialization, and command-line argument parsing. It also sets up logging with configurable levels and pretty-printed output.

Example usage:

// In main.go
cmd.Execute(embeddedFS)

Command examples:

omnom listen --address :8080
omnom create-user alice alice@example.com
omnom create-bookmark alice "Example" https://example.com
omnom update-feeds

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(f embed.FS)

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

This section is empty.

Jump to

Keyboard shortcuts

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