== hook - CLI interface for Hook.app (macOS)
Hook.app is a productivity tool for macOS .
This gem includes a `hook` binary that allows interaction with the features of Hook.app.
v2.0.9
=== Global Options
=== --help
Show this message
=== --version
Display the program version
=== Commands
==== Command: clip|cp FILE_OR_URL
Copy Hook URL for file/url to clipboard
Creates a bookmark for the specified file or URL and copies its Hook URL to the clipboard.
The copied Hook URL can be used to link to other files (use `hook link --paste FILE/URL`,
or to paste into another app as a link. Use the -m flag to copy a full Markdown link.
===== Options
===== -a|--app APP_NAME
Copy from application
[Default Value] None
===== -m|--markdown
Copy as Markdown
==== Command: clone SOURCE TARGET
Clone all hooks from one file or url onto another
Copy all the files and urls that the first file is hooked to onto another file.
Exactly two arguments (SOURCE, TARGET) required.
==== Command: find|search [SEARCH_STRING]
Search bookmarks
Search bookmark urls and names for a string and output in specified format (default "paths").
Run `hook find` with no search argument to list all bookmarks.
===== Options
===== -o|--output_format FORMAT
Output format [(h)ooks, (p)aths, (m)arkdown, (v)erbose]
[Default Value] paths
===== -f|--files_only
Output only bookmarks with file paths (exclude e.g. emails)
===== -n|--names_only
Search only bookmark names
===== --null
Separate results with NULL separator, only applies with "paths" output for single file argument
==== Command: from APPLICATION_NAME
Get a Hook URL for the frontmost window of an app
Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark
for the active document, note, task, etc., returning a Hook URL.
Use -m to get the response as Markdown, and/or -c to copy the result directly to the clipboard.
===== Options
===== -c|--copy
Copy to clipboard
===== -m|--markdown
Output as Markdown
==== Command: help command
Shows a list of commands or help for one command
Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function
===== Options
===== -c
List commands one per line, to assist with shell completion
==== Command: link|ln SOURCE... TARGET
Create bidirectional hooks between two or more files/urls
If two files/urls are provided, links will be bi-directional.
If three or more are provided, `link` defaults to creating bi-directional
links between each file and the last file in the list. Use `-a` to create
bi-directional links between every file in the list.
If using `--paste`, the URL/hook link in the clipboard will be used as one argument,
to be combined with one or more file/url arguments.
===== Options
===== -a|--all
Link every listed file or url to every other
===== -p|--paste
Paste URL from clipboard
==== Command: list|ls [FILE_OR_URL]...
List hooks on a file or url
Output a list of all hooks attached to given url(s) or file(s) in the specified format (default "paths").
Run `hook list` with no file/url argument to list all bookmarks.
===== Options
===== -o|--output_format FORMAT
Output format [(h)ooks, (p)aths, (m)arkdown, (v)erbose]
[Default Value] paths
===== -f|--files_only
Output only bookmarks with file paths (exclude e.g. emails)
===== --null
Separate results with NULL separator, only applies with "paths" output for single file argument
===== -s|--[no-]select
Generate a menu to select hook(s) for opening
This option is a shortcut to `hook select` and overrides any other arguments.
==== Command: open|gui FILE_OR_URL
Open the specified file or url in Hook GUI
Opens Hook.app on the specified file/URL for browsing and performing actions.
Exactly one argument (File/URL) required.
==== Command: percent STRING
Percent encode/decode a string
Use encode or decode to apply Hook's url encoding to a string argument. Use '-' to read input from STDIN.
===== Commands
====== Command: decode STRING
decode a percent-encoded string
====== Command: encode STRING
percent encode a string
==== Command: remove|rm FILE_OR_URL...
Remove a hook between two files/urls
Remove a hook between two files or URLs. If you use --all, all hooks on a given file will be removed.
If --all isn't specified, exactly two arguments (Files/URLs) are required.
===== Options
===== -a|--all
Remove ALL links on files, requires confirmation
===== -f|--force
==== Command: scripts SHELL
Shell completion examples
Output completion script example for the specified shell (bash, zsh, fish)
==== Command: select FILE_OR_URL
Select from hooks on a file/url and open in default application
If the target file/URL has hooked items, a menu will be provided. Selecting one or more files
from this menu will open the item(s) using the default application assigned to the
filetype by macOS. Allows multiple selections with tab key, and type-ahead fuzzy filtering of results.
[Default Command] help