Skip to content

360ammar/urlhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

urlhook

Execute x-callback-urls from the command line on macOS.

Install

npm install -g urlhook

Usage

urlhook "bear://x-callback-url/tags?token=YOUR_TOKEN"
urlhook "bear://x-callback-url/open-note?title=My%20Note" --timeout 20

Options

urlhook <url> [options]

--timeout, -t    Timeout in seconds (default: 10)
--help, -h       Show help
--version, -v    Show version

Response

Success (stdout, exit 0):

{"success": true, "params": {"tags": "cooking,recipes"}}

Error (stderr, exit 1):

{"success": false, "params": {"errorCode": "-1", "errorMessage": "Not found"}}

Build from Source

Requires Xcode Command Line Tools.

git clone https://github.com/360ammar/cback.git
cd cback
make build

The app bundle is built to macos/urlhook.app/. Run directly with ./bin/urlhook.

How it Works

urlhook registers a urlhook:// URL scheme via a background macOS app bundle. When you call an x-callback-url, urlhook injects its own callback URLs, launches the target app, and waits for the response over a Unix domain socket.

Each invocation is isolated — concurrent calls are safe.

Requirements

  • macOS 13 (Ventura) or later

License

MIT

About

Execute x-callback-urls from the command line on macOS

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors