Skip to content

The halcyon command

halcyon opens a folder or a file from wherever you already are. A folder opens as a vault, a file opens in a window of its own, exactly as it would from Finder.

bash
halcyon .            # this directory, as a vault
halcyon ~/notes      # a folder, as a vault
halcyon README.md    # one file, in a window of its own
halcyon              # bring Halcyon to the front

open is optional and exists so the command reads as a sentence, so halcyon open ~/notes does the same thing as the second line. The one place it matters: a directory actually named open has to be given as ./open.

halcyon --help prints the same summary.

Several paths at once work, and each is routed on its own:

bash
halcyon ~/notes ~/work/spec.md

Installing it

Halcyon → Install Command Line Tool…

That puts the command in ~/.local/bin. It needs no admin rights, and app updates carry through without you reinstalling anything.

Note

~/.local/bin has to be on your PATH, and Halcyon can't tell whether it is: a GUI app inherits the system PATH, not your shell's. If halcyon comes back "command not found", that's what happened.

bash
export PATH="$HOME/.local/bin:$PATH"

Put that in your ~/.zshrc and open a new terminal.

Moving, renaming or reinstalling Halcyon doesn't break the command.

To remove it: rm ~/.local/bin/halcyon.

What it can't do

It can't be your $EDITOR. The command returns the moment Halcyon accepts the file rather than waiting for you to close it, so there's nothing for git to wait on. There's no --wait, and a commit message opened this way would be committed empty.

It can't report an error from the app. A file Halcyon refuses says so in a dialog rather than in your terminal.

A path that doesn't exist is the one error it catches itself:

halcyon: no such file or directory: notes.md

Every path is checked before any of them opens, so a typo in the second of three doesn't open the other two.

Halcyon is a markdown notes app for macOS.