Command line
The tyrn command opens files and folders from a terminal. In Tyrn, choose Install CLI from the app menu to add it. See macOS if that fails.
Usage
tyrn [options] [paths...]| Command | What it does |
|---|---|
tyrn |
Open Tyrn. |
tyrn path/to/project |
Open a folder in Tyrn. |
tyrn path/to/file |
Open a file. |
tyrn path/to/file:20:5 |
Open a file at line 20, column 5. |
tyrn -n path |
Open the file or folder in a new window. |
tyrn -a path |
Add the path to the window you already have open. |
tyrn -e path |
Open in an existing Tyrn window. |
tyrn -w path |
Wait until the file is closed, or the window for a folder is closed. Useful as $EDITOR. |
ps axf | tyrn - |
Read from standard input. |
tyrn --diff old new |
Show the difference between two files or folders. Folders open as a single multi-file diff. |
Options
| Option | What it does |
|---|---|
-w, --wait |
Wait for the given paths to be closed before exiting. |
-a, --add |
Add files to the currently open workspace. |
-n, --new |
Create a new workspace. |
-e, --existing |
Open in an existing Tyrn window. |
--diff <OLD> <NEW> |
Compare two paths. Can be given more than once. |
--foreground |
Run Tyrn in the foreground and show its logs. Useful for debugging. |
--user-data-dir <DIR> |
Use a different directory for all user data. |
--app <PATH> |
Use a specific Tyrn.app. |
--completions <SHELL> |
Print shell completions. |
-v, --version |
Print the version and the app path. |
Use Tyrn as your editor
export EDITOR="tyrn --wait"Git and other tools then wait until you close the file.