Categorygithub.com/haaag/gm
modulepackage
0.1.3
Repository: https://github.com/haaag/gm.git
Documentation: pkg.go.dev

# README

🔖 GoMarks

Simple cli tool for manage your bookmarks 🚧 WIP

GitHub go.mod Go version Linux SQLite

[!WARNING] This repo is a work in progress! Needing both cleaning up and documenting.

✨ Features

  • Support multiple databases
  • Restore deleted bookmarks
  • Import bookmarks from firefox based browsers priority
  • Import bookmarks from chromium based browsers priority
  • Fetch title and description from added URL
  • Check bookmark status (http status)
  • Support for NO_COLOR env variable.
  • Configure keybinds in menu mode with yaml file.
  • Migrate items from one database to another
  • Encrypt database priority
  • Add docker|podman support priority
  • ...

📦 Installation

git clone "https://github.com/haaag/gm" && cd gm

# build using make
make

# or build using `go build`
go build -o ./bin

This will create a ./bin/gm binary in your current directory.

📖 Usage (🚧WIP)

This must be simplified a bit.

$ gm --help

Simple yet powerful bookmark manager for your terminal

Usage:
  gm [flags]
  gm [command]

Available Commands:
  add         add a new bookmark
  bk          backup management
  db          database management
  help        Help about any command
  import      import bookmarks from browser
  restore     restore deleted bookmarks
  version     print version information

Flags:
      --color string   output with pretty colors [always|never] (default "always")
  -c, --copy           copy bookmark to clipboard
  -e, --edit           edit with preferred text editor
  -f, --field string   output by field [id|url|title|tags]
      --force          force action | don't ask confirmation
  -H, --head int       the <int> first part of bookmarks
  -h, --help           help for gm
      --json           output in JSON format
  -m, --menu           menu mode (fzf)
  -M, --multiline      output in formatted multiline (fzf)
  -n, --name string    database name (default "bookmarks.db")
  -O, --oneline        output in formatted oneline (fzf)
  -o, --open           open bookmark in default browser
  -q, --qr             generate qr-code
  -r, --remove         remove a bookmarks by query or id
  -s, --status         check bookmarks status
  -t, --tag strings    list by tag
  -T, --tail int       the <int> last part of bookmarks
  -v, --verbose        verbose mode

Use "gm [command] --help" for more information about a command.

🔑 Supported Env Vars

NametypeDescriptionStatus
GOMARKS_HOMEstrPath to database/yamldone
GOMARKS_EDITORstrPreferred text editordone
GOMARKS_BACKUP_MAXintMaximum number of backups (def: 3)done
NO_COLORintDisable all colorsdone
📜 Menu support

Single/multiple selection for open, copy, edit, delete, check status.

https://github.com/user-attachments/assets/b8d8f0fa-e453-421b-b27d-eebb3da7f51f

➕ Add a bookmark

https://github.com/user-attachments/assets/436b7553-b130-4114-8638-2e8a9b3ea2ce

📝 Edit a bookmark

https://github.com/user-attachments/assets/059dd578-2257-4db4-b7b1-1267d0375470

🔳 Create QR-Code

https://github.com/user-attachments/assets/f531fdc9-067b-4747-9f31-4afd5252e3cb

☑️ Check status

https://github.com/user-attachments/assets/a3fbc64a-87c1-49d6-af48-5c679b1046b1

⚙️ Configuration
  • $GOMARKS_HOME/menu.yml file

YAML file structure

prompt: " Gomarks> "
header: true
preview: true
keymaps:
  edit:
    bind: ctrl-e
    description: edit
    enabled: true
    hidden: false
  open:
    bind: ctrl-o
    description: open
    enabled: true
    hidden: false
  preview:
    bind: ctrl-/
    description: toggle-preview
    enabled: true
    hidden: false
  qr:
    bind: ctrl-k
    description: QRcode
    enabled: true
    hidden: false
  toggle_all:
    bind: ctrl-a
    description: toggle-all
    enabled: true
    hidden: true
  yank:
    bind: ctrl-y
    description: yank
    enabled: true
    hidden: false
⏳ TODO

TODO

❗ Priority

  • Use a ORM
    • Add multiple databases option (default.db, work.db, client.db)
  • Add Sync to remote repo???

XDG

  • Store db in XDG_DATA_HOME
  • Store menu config in XDG_CONFIG_HOME (WIP: for now in XDG_DATA_HOME)

📦 Packages

  • terminal package
  • color package
  • files package

🟨 Redo

  • Backups
  • Databases

⛓️ Import

  • From firefox
  • From chrome chromium

♻️ Misc

  • Add a logging library
  • Support NO_COLOR env var. no-color

# Packages

No description provided by the author