Skip to content

mateconpizza/gm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‘ GoMarks

GitHub go.mod Go version Linux SQLite

Writing gopher logo
πŸ’™ Gopher image by Maria Letta

Simple CLI tool for manage your bookmarks 🚧 WIP

Warning

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

gm-menu.mp4

Features

  • Powered by Fzf
  • Track bookmarks with git wip
    • Sync bookmarks as JSON files
    • Encrypt bookmarks with GPG and push to remote
  • Encrypt local database with AES-GCM
  • Support multiple databases
  • Import bookmarks from firefox based browsers
  • Import bookmarks from chromium based browsers
  • Import bookmarks from git wip
  • Fetch title and description from new bookmark
  • Check bookmark status (http status)
  • Support for NO_COLOR env variable.
  • Configure menu keybinds, prompt, header, preview (fzf) using a YAML file.
  • Migrate items from one database to another
  • Add docker|podman support priority

Installation

go install github.com/mateconpizza/gm@latest

To uninstall the program remove the binary in your go env GOPATH

Usage (🚧WIP)

$ gm --help
Simple yet powerful bookmark manager for your terminal

Usage:
  gm [flags]
  gm [command]

Available Commands:
  new         New bookmark, database, backup
  rec         Records management
  tags        Tags management
  health      Bookmark health
  db          Database management
  git         Git commands
  io          Export/Import bookmarks
  conf        Configuration management
  help        Help about any command

Flags:
  -o, --open            open bookmark in default browser
  -e, --edit            edit bookmark with preferred text editor
  -r, --remove          remove bookmark by query or ID
  -c, --copy            copy bookmark URL to clipboard
  -q, --qr              generate QR code for bookmark URL
  -N, --notes           display bookmark notes
  -m, --menu            interactive menu mode using fzf
      --multiline       output in multiline format (fzf)
  -f, --format string   output format [oneline|json|id|url|title|tags|desc|notes]
  -t, --tag strings     filter bookmarks by tag(s)
  -H, --head int        show first N bookmarks
  -T, --tail int        show last N bookmarks
  -n, --name string     database name (default "main.db")
      --color string    output with pretty colors [always|never] (default "always")
      --force           force action
  -y, --yes             assume "yes" on most questions
  -v, --verbose count   increase verbosity (-v, -vv, -vvv)
  -h, --help            help for gm
      --version         version for gm

Supported Env Vars

Name type Description Status
GOMARKS_HOME str Path to database/yaml done
GOMARKS_EDITOR str Preferred text editor done
NO_COLOR int Disable all colors done
πŸ“œ Menu support

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

gm-menu.mp4
βž• Add a bookmark
gm-add.mp4
πŸ“ Edit a bookmark
gm-edit.mp4
πŸ”³ Create QR-Code
gm-qr.mp4
β˜‘οΈ Check status
gm-status.mp4
βš™οΈ Configuration
  • $GOMARKS_HOME/config.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 discontinued
    • Add multiple databases option (default.db, work.db, client.db)

Refactor

  • [~] Add Sync to remote repo??? (WIP)
  • Drop ErrActionAborted in package terminal (use sys.ErrActionAborted)
  • Move config/menu to package menu
    • Drop global Fzf

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
    • If database is locked (SQLITE_BUSY), ask user confirmation to copy file to tmp directory and read from there.
  • From chrome chromium

♻️ Misc

  • Add a logging library
  • Support NO_COLOR env var. no-color
  • Create a rm subcommand
    • Add rm database, backup
    • Add rm records
    • Add rm misc...
    • Remove db rm

About

πŸ”– Simple tool for manage your bookmarks

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •