Simple bookmark manager written in go
  • Go 85.8%
  • Nix 14.2%
Find a file
2026-03-03 15:52:52 +01:00
.gitignore package 2025-07-24 15:33:20 +02:00
default.nix package 2025-07-24 15:33:20 +02:00
flake.lock par 2026-03-03 15:50:36 +01:00
flake.nix b 2026-03-03 15:52:52 +01:00
go.mod idk what this means 2024-11-08 13:17:34 +01:00
go.sum tidy code 2025-01-18 23:00:49 +01:00
LICENSE Initial commit 2024-10-25 09:41:59 +02:00
loadVariables.go add show all 2025-01-07 11:49:53 +01:00
main.go fix parser 2025-01-27 16:43:29 +01:00
package.nix package 2025-07-24 15:33:20 +02:00
parse.go par 2026-03-03 15:50:36 +01:00
README.md add further config instructions 2025-01-07 13:06:03 +01:00
types.go add show all 2025-01-07 11:49:53 +01:00
utils.go done! 2024-11-07 22:57:51 +01:00

📚 book

Simple bookmark manager written in go

https://github.com/user-attachments/assets/150bcd63-2e35-4703-8e04-ea6dda61cbe9

Index

Instalation

Packaging status

Arch Linux

You can install the program from the AUR:

paru -S book-git

Manual

You can also build the project yourself, you will need go installed:

[!IMPORTANT] Make sure you have go installed, your $GOPATH is set and added to your $PATH

git clone https://github.com/m4rti21/book.git
cd book
go install

Dependencies

The only "dependency" is a menu program:

  • Linux: dmenu, rofi, tofi, wofi, etc...
  • MacOS: dmenu-mac, choose-gui, etc...
  • Windows: literally no clue, this probram should be able to work on windows but i have not tested it, no idea if rofi-like programs exist for windows.

make sure to specify this in the menu option on the config.toml (explained in the Configuration section)

[!NOTE] The default run command is xdg-open to open the url on linux, if you are using MacOS you should change the run option to open in the config.toml (explained in the Configuration section)

Configuration

The default config directory is $XDG_CONFIG_HOME/book, if the variable is not set then it will fallback to ~/.config/book.

Settings

The program will look for a file called config.toml in the config directory. The allowed options are:

name type default flag description
folderIcon string "" -f icon used for folders
menu string "dmenu" -m program for displaying the options (has to accept stdin for the entires)
run string "xdg-open" -r program for opening the selected url
showUrl boolean true -u weather to show the url if a name is provided
showAll boolean true -a weather to show all urls at once
Example:
# config.toml
menu = "tofi"
showUrl = false

Note

The next options only exist as flags, they will be ignored if present in the config file

name type default flag description
config string "$XDG_CONFIG_HOME"/book/config.conf -c location of the base config file
directory string "$XDG_CONFIG_HOME"/book -d location of the directory where .conf will be searched for

Bookmarks

Inside the config directory create file called <collection-name>.conf where your bookmarks will be stored, for example personal.conf. You can have as many collections as you want. The file is divided in two sections: [config] and [bookmarks].

Important

Indentation in this file SHOULD be 4 spaces, somehow it seems to work with other amounts of spaces but it is not guaranteed to work.

The [config] section can be used to override the global settings defined at the config.toml file (for example, there might be a collection of bookmarks you might want to show on a different menu or launch them with a different browser).

Note

The showUrl option is not available in the [config] section of the .conf files, it can only be set in the config.toml file or as a flag.

Example:
# personal.conf
[config]
    menu = "tofi"
    run = "xdg-open"

The [bookmarks] section is where all the bookmarks will be defined, the syntax goes as follows:

After the [bookmarks] tag we will define all the base level bookmarks, meaning this are the bookmarks you will first see when running the program. Each bookmark line can have 1 or 2 arguments, if only 1 is provided that must be the URL, if instead you have 2 the first one will be the Label/Name of the url and the second one will then be the URL. Each argument must start and end with double quotes " and cannot contain a double quote, they must be separated by at least one space.

Example:
# personal.conf
[bookmarks]
    "Example"                   "https://example.com"   # This is a comment
    "Another Example"           "https://someotherurl.com/i/dont/know"
    "https://unnamedurl.com"    # This url doesnt have a name

You can also define sub-folders, to define one the line must start with the star * symbol, anything following will be the folder name

Example:
# personal.conf
[config]
    menu = "tofi"
    run = "xdg-open"

[bookmarks]
    "Example"                   "https://example.com"   # This is a comment
    "Another Example"           "https://someotherurl.com/i/dont/know"
    "https://unnamedurl.com"    # This url doesnt have a name

    * This is a folder
        "Woah how cool"         "https://how.cool"
        "Woah how cool"         "https://how.cool"
        "Woah how cool"         "https://how.cool"

        * More???           # You can add as many sub-sub folders as you want
            "You get the point"     "https://i.am.runnign/out/of/url/ideas
            #...
            #...
            #...

    * This is another folder
        "I am in your walls"         "https://wake.up/wake/up/wake/up"
        "I am in your walls"         "https://wake.up/wake/up/wake/up"
        "I am in your walls"         "https://wake.up/wake/up/wake/up"

Usage

book [OPTIONS] [COLLECTION-NAME]

Once configured its as simple as running book <collection-name> where <collection-name> is the name of one of the collections in your config directory, for example book personal will open personal.conf. You can pass flags to the program before the <collection-name> is specified:

Example:
book personal
book -m "tofi" -d "~/.work/book" work