{"id":14984393,"url":"https://github.com/unforswearing/lnks","last_synced_at":"2025-10-03T22:26:55.579Z","repository":{"id":62354802,"uuid":"47234031","full_name":"unforswearing/lnks","owner":"unforswearing","description":"Print and / or save your Google Chrome links from the terminal on MacOS","archived":false,"fork":false,"pushed_at":"2025-03-27T21:10:02.000Z","size":1853,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T01:01:37.458Z","etag":null,"topics":["bash","google-chrome","instapaper","lnks","macos","pinboard"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unforswearing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-02T03:15:02.000Z","updated_at":"2025-03-27T21:10:06.000Z","dependencies_parsed_at":"2024-09-25T00:30:16.903Z","dependency_job_id":null,"html_url":"https://github.com/unforswearing/lnks","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":"0.19999999999999996","last_synced_commit":"e13f054563d1444effd4f61a3c5bd544d79c1dda"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unforswearing%2Flnks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unforswearing%2Flnks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unforswearing%2Flnks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unforswearing%2Flnks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unforswearing","download_url":"https://codeload.github.com/unforswearing/lnks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288350,"owners_count":21078903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","google-chrome","instapaper","lnks","macos","pinboard"],"created_at":"2024-09-24T14:08:58.455Z","updated_at":"2025-10-03T22:26:55.573Z","avatar_url":"https://github.com/unforswearing.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lnks\n\nTriage your Google Chrome / Safari links from the terminal on MacOS.\n\n## Installation\n\n\u003e [!NOTE]\n\u003e `lnks` source code can be found in [`src/main.sh`](src/main.sh).\n\n### Git Clone\n\nClone this repository, cd into the cloned directory, make the `lnks` binary file executable, and move it to your preferred location.\n\n```command\n$ git clone https://github.com/unforswearing/lnks.git lnks\n$ cd lnks\n$ chmod +x lnks\n$ sudo cp lnks /usr/local/bin\n```\n\n\n#### Adding `lnks` to Your Dotfiles\n\nInstead of using the `lnks` binary, you may create an alias or function that calls `src/main.sh` and add it to your shell startup files (like `.zshrc`).\n\n```bash\nalias lnks='bash $filepath/lnks/src/main.sh'\n\nfunction lnks() {\n    bash \"$filepath/lnks/src/main.sh\" \"${@}\"\n}\n```\n\n### Eget\n\nYou can also install the `v2` release using [eget](https://github.com/zyedidia/eget):\n\n```command\n$ eget unforswearing/lnks\n$ sudo cp lnks /usr/local/bin\n```\n\n\u003c!--\n\n### NPM\n\n5/19/2025: Despite this option being hidden, you can also install `lnks`  via `npm`:\n\n```command\n$ npm install -g lnks\n```\n\n--\u003e\n\n## Dependencies\n\nStandard command line utilities: `awk`, `curl`, `grep`, `sed`, etc.\n\n\u003e [!NOTE]\n\u003e These are the default BSD-based tools installed with MacOS, and **not** the equivalent Linux / GNU tools.\n\n## Usage\n\n```txt\nUsage: lnks [query] \u003coptions\u003e\n\nOptions\n  -h, --help  prints this help message\n  --safari    search for urls in Safari instead of Google Chrome\n  --print     print urls to stdout\n  --stdin     read new-line-separated urls from stdin for use with other options\n  --markdown  print markdown formatted urls to stdout\n  --html      print html formatted list of urls to stdout\n  --csv       print csv formatted urls to stdout\n```\n\n## Examples\n\n\u003e [!NOTE]\n\u003e Queries use `awk` and will accept keywords and regular expressions as input.\n\n\u003e [!IMPORTANT]\n\u003e Queries are currently **case-sensitive**. Case sensitivity will be removed in future versions of `lnks`.\n\n### Print urls matching \u003cquery\u003e from Google Chrome\n\n```\nlnks [query]\nlnks [query] --print\n```\n\n### Use Safari instead of Google Chrome:\n\nIf the `--safari` flag follows query, search Safari URLs instead of Chrome. This option can be set permanently in settings.\n\n```\nlnks [query] --safari --csv\n```\n\n### Read urls from files or other commands\n\nUse the `--stdin` flag to read urls from standard input.\n\n```\ncat urls.txt | lnks --stdin --csv\n```\n\n### Processing options\n\n```\nlnks [query] --markdown\nlnks [query] --html\nlnks [query] --csv\n\nlnks [query] --stdin [ --markdown | --html | --csv ]\n```\n\n## Configuration File\n\n`lnks` stores default values for some options and other behind-the-scenes details in the [`lnks.rc`](lnks.rc) configuration file located at `\"$HOME\"/.config/lnks/lnks.rc`.\n\nCurrent options:\n\n- **Default Browser**\n  - **Options**: Chrome | Safari\n  - **Default**: Chrome\n\nMore options to come in the future.\n\n## To Do / Roadmap\n\nAfter some years of neglect, `lnks` has been rewritten for version 2. This version is a stripped-down iteration of the script that removes redundant options (`--copy`, `--save`) and external (web/API-based) services (`--instapaper`, `--pinboard`). The `--pdf` option was also removed as `wkhtmltopdf` is currently unmaintained, and `lnks` is best at reformatting urls not pdf generation. You may find an older (possibly non-functional) version of `lnks` with these features in the [v1 directory](https://github.com/unforswearing/lnks/tree/main/v1).\n\nPlease see [todo.md](todo.md) for a full list of changes for version 2, and a list of features for version 3.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funforswearing%2Flnks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funforswearing%2Flnks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funforswearing%2Flnks/lists"}