Introducing taco: linktaco from your terminal

4 min read Original article ↗

If you’re the kind of person who lives in a terminal, you’ve probably wished you could manage your bookmarks without reaching for a browser. Now you can.

taco is a command-line interface for linktaco.com. Everything you do on the web - saving links, creating short URLs, building listings - you can now do from your shell. It’s fast, scriptable, and fits right into your workflow.

Getting started

Setup takes about a minute:

$ taco init

The init wizard walks you through generating an OAuth2 token and picking your default organization. Your config lands in ~/.config/taco/config, and if you’re working with multiple linktaco instances, it handles that too.

This is the core of it. Save a bookmark:

$ taco links add https://go.dev/doc/go1.22 --tags golang,release --starred

List your bookmarks with filters:

$ taco links list --count 3 --tags golang

  PUBLIC    Go 1.22 Release Notes
            https://go.dev/doc/go1.22
            golang, release
            2024-03-15  a1b2c3

  PUBLIC    How I write HTTP services in Go
            https://grafana.com/blog/2024/02/09/how-i-write-http-services-after-13-years-of-go/
            golang, architecture, http
            2024-02-10  d4e5f6

  PRIVATE   ★ Internal Go style guide
            https://wiki.example.com/go-style
            golang, internal
            2024-01-20  g7h8i9

You can search (--search), filter by starred or unread (--filter starred), and sort in either direction (--order asc). Need to edit a link? taco links edit a1b2c3 drops you into your $EDITOR with a YAML frontmatter template - change what you want, save, and you get a diff to confirm before it’s applied.

Don’t remember the hash? Use --search instead:

$ taco links open --search "go style"

It’ll show you matching results and let you pick one to open in your browser.

Shorts

Create short links right from the terminal:

$ taco shorts add https://example.com/very/long/blog/post --short-code mypost

Custom domains are supported, and you can manage tags and titles just like regular links. But the fun part is analytics - check how your short link is performing without leaving the terminal:

$ taco shorts analytics mypost --start 2024-03-01 --end 2024-03-31

  Clicks Over Time
  2024-03-01  ████████████████████  42
  2024-03-08  ████████████████████████████  58
  2024-03-15  ███████████████  31
  2024-03-22  ██████████████████████████████████  70
  2024-03-29  █████████████████████████  52

  Top Countries
  United States   ████████████████████████████████████  145
  Germany         ██████████████  56
  United Kingdom  █████████  38
  Canada          ██████  25

  Top Referrers
  twitter.com     ████████████████████████████  98
  reddit.com      ████████████████  55
  news.ycombinator.com  ████████  30

Bar charts. In your terminal. Country breakdowns, device stats, referrers - all there.

Listings

Listings are curated link collections - think “awesome lists” or resource pages. Taco gives you the full workflow: create a listing, add links to it, reorder them, and publish. You can attach custom domains, generate QR codes, and track analytics, all from the command line.

$ taco listings show my-go-resources
$ taco listings add-link my-go-resources

And there’s more

Taco covers pretty much everything linktaco offers:

  • Notes - save text content alongside your bookmarks
  • Tags - list, rename, and delete tags across all services
  • Feed - follow organizations and browse their public links
  • Popular & Recent - discover what’s trending across linktaco
  • Domains - manage custom domains for shorts and listings
  • QR Codes - generate and track QR codes for shorts and listings
  • Audit Logs - see who did what and when

Little things that matter

A few details that make taco feel like a proper CLI tool:

  • Terminal-aware formatting - colors and styling when you’re in a terminal, clean text when piped or redirected
  • Automatic paging - long output goes through $PAGER (defaults to less)
  • Interactive editing - edit items in your $EDITOR with YAML frontmatter, review diffs before saving
  • Browser integration - taco links open, taco shorts open, etc. open items directly in your browser
  • Scriptable - every command works non-interactively with the right flags, so you can wire it into scripts

Get it

You can grab taco, and the install instructions, from the repository.

We’d love to hear what you think - if you run into issues or have ideas for improvements, let us know.