LinuxCommandLibrary

buku

Manage bookmarks from the command line

TLDR

Display all bookmarks matching "keyword" and with "privacy" tag

$ buku [keyword] [[-t|--stag]] [privacy]
copy

Add bookmark with tags "search engine" and "privacy"
$ buku [[-a|--add]] [https://example.com] [search engine], [privacy]
copy

Delete a bookmark
$ buku [[-d|--delete]] [bookmark_id]
copy

Open editor to edit a bookmark
$ buku [[-w|--write]] [bookmark_id]
copy

Remove "search engine" tag from a bookmark
$ buku [[-u|--update]] [bookmark_id] --tag - [search engine]
copy

SYNOPSIS

buku [OPTIONS] [bookmark_url] [bookmark_title]

PARAMETERS

-a, --add
    Add a new bookmark. Requires the bookmark URL and optionally a title.

-d, --delete
    Delete a bookmark by its index number.

-e, --edit
    Edit an existing bookmark by its index number.

-f, --format
    Specify the output format (e.g., tsv, csv, json). Default is plain text.

-i, --import
    Import bookmarks from a file (HTML, Markdown, CSV, etc.).

-l, --list
    List all bookmarks.

-o, --output
    Output bookmarks to a file.

-p, --print
    Print the URL of a bookmark to stdout.

-q, --query
    Search for bookmarks matching the search term (supports regular expressions).

-s, --select
    Select a bookmark from a menu using fzf or dmenu.

-t, --tag
    Specify tags for a bookmark. Multiple tags can be separated by commas.

-u, --update
    Update database to the latest version.

-h, --help
    Show help message and exit.

-v, --version
    Show version information and exit.

DESCRIPTION

buku is a powerful, yet lightweight and versatile command-line bookmark manager. It stores bookmarks in a SQLite database for portability and speed. It offers features such as tagging, searching (using regular expressions), and importing/exporting bookmarks from various formats like HTML, Markdown, and CSV. buku is designed to be highly customizable and integrates seamlessly with your terminal workflow. It allows for quick access and management of your frequently used web resources, saving time and effort compared to using a web browser alone.

The tool is particularly useful for developers, system administrators, and anyone who frequently interacts with the command line and needs an efficient way to manage a large number of bookmarks. It is written in Python and is easily extensible through its plugin system. It emphasizes privacy and control over your data by storing everything locally.

CAVEATS

buku relies on external tools like fzf or dmenu for the interactive selection feature. These tools need to be installed separately to use that functionality. Backup of the database is important.

CONFIGURATION

buku's behavior can be extensively customized through a configuration file typically located at $HOME/.config/buku/config. Options include defining the editor to use for editing bookmarks, setting default output formats, and configuring integration with shell completion.

DATABASE LOCATION

By default, buku stores its database in $HOME/.local/share/buku/buku.db. You can specify a different database location using the --db option, which can be useful for managing multiple bookmark databases.

HISTORY

buku was created to provide a simple, terminal-based bookmark management solution. Development has focused on performance, flexibility, and privacy. It has gained popularity among command-line users who prefer a lightweight and efficient alternative to browser-based bookmarking.

SEE ALSO

grep(1), sed(1), awk(1), fzf(1)

Copied to clipboard