List of All Links in Outline (via bike command line tool)

A flat list of all the links in the active outline.

Using the bike command line tool:

(Bike 2.0 Preview (284+) > Install Command Line Tool...)

with a jq filter, interpolating into markdown [label](url) strings:

.root | recurse(.children[]?) |
    .text[]? | select(.attrs.a) | 
    "[\(.string)](\(.attrs.a))"

So piping straight from bike get outline

(with the jq -r switch for raw text – rather than json – output)

bike get outline | jq -r '.root | recurse(.children[]?) |
    .text[]? | select(.attrs.a) |
    "[\(.string)](\(.attrs.a))"'

Assumes that you have installed jq
for example via brew