A tool to register custom URI handlers on Linux, Windows and macOS.
Cf. demo project
-
Native-opener saves in your OS config file that it should call a Go wrapper when it receives
myapp://myfile.pdf -
This wrapper handles extracting arguments like
myfile.pdfand passes them to the application you specified during URI registration
# Install both required binaries
go install github.com/Minizilla/Native-opener/cmd/nopn@master
go install github.com/Minizilla/Native-opener/cmd/uri-wrapper@masterThis will install:
nopn- The main command to register URI handlersuri-wrapper- The wrapper that handles URI calls (automatically found bynopn)
# Clone the repository
git clone https://github.com/Minizilla/Native-opener.git
cd native-opener
# Build the tools
go build -o native-opener ./cmd/nopn
go build -o uri-wrapper ./cmd/uri-wrapper# Check that both commands are available
nopn
uri-wrapperBoth commands will show their usage information when called without arguments.
nopn myapp /path/to/your/program/to/executeWhen someone clicks on myapp://myfile.pdf, your program will be launched with myfile.pdf as an argument.