The nxtrm command
nxtrm opens folders and files in Next Term from any terminal: a project with nxtrm ., a file at a line with nxtrm src/app.ts:42.
nxtrm . # this folder as a projectnxtrm ~/Code/api # a folder as a projectnxtrm src/app.ts:42:7 # a file, at line 42, column 7nxtrm notes.md # a file that does not exist yet is created emptynxtrm -n ~/Code/api # in a new window| Option | Does |
|---|---|
-n, --new-window | Open in a new window |
-h, --help | Show the help |
-v, --version | Show the version |
-- | Treat everything after it as a path, even if it starts with - |
nxtrm mcp is different: it is Next Term’s MCP server, which agents start themselves. See Orchestrate agents (MCP).
What it opens where
Section titled “What it opens where”- A folder opens as a project: in its own window if that project is already open, in an unused window if there is one, or in a new window.
- A file opens in the window whose project contains it, or the front window. With
-n, or when no window is open, it opens in a new window on the file’s project (its git root, or its folder). path:lineandpath:line:column, the form compilers, linters and agents print, open the file at that spot. A folder has no lines, sonxtrm src:12is an error.- A new file in an existing folder is created empty and opened, so you can write it.
If Next Term is not running, nxtrm starts it with your request instead of reopening your last session. If it is running, the request goes to it and the app comes to the front.
Installing it
Section titled “Installing it”In Next Term tabs, nxtrm works from the first launch: it is on the PATH of every tab.
For other terminals, Next Term adds it at launch when it can do so without a password. It reads your PATH from your login shell, as your other terminals get it, and links nxtrm to the copy inside the app in the first of these folders on it that you can write:
~/.local/binor~/bin, when your shell puts them onPATH/opt/homebrew/bin, Homebrew’s folder on Apple silicon/usr/local/bin, when Homebrew has made it yours
Your PATH order decides between them. Next Term never adds a folder to PATH or edits your shell’s startup files, and never adds a link to any other folder on PATH, such as a version manager’s. If your shell takes more than 5 seconds to start, that launch does nothing, and a later one decides.
A PATH entry that starts with ~ doesn’t count, because zsh never looks there: the quotes in export PATH="~/.local/bin:$PATH" keep the ~, so write $HOME/.local/bin instead.
When none of them will do, as on a Mac without Homebrew, where /usr/local/bin belongs to the system, the first launch asks Install the “nxtrm” command? on the first project window, once you are past the folder chooser, Import or the Welcome window.
- Install… links
/usr/local/bin/nxtrmand asks for your administrator password once, as other editors do for their commands. If yourPATHleaves out/usr/local/bin, it says so. - Not Now asks again after the next update.
- Don’t Ask Again stops asking.
Next Term › Install Command Line Tool (nxtrm)… does the same at any time. It also uses a folder that needs no password when there is one.
The one-line installer links it the same way, right after it installs the app, and says where. If no folder qualifies, it tells you that Next Term will offer it.
- Next Term only ever replaces a link it made itself. It never touches someone else’s
nxtrm, and when anothernxtrmcomes first on yourPATH, it adds none of its own. - It links only a copy in a permanent place such as Applications. A copy running from the disk image would leave the link pointing at nothing once the image is ejected, so Next Term asks you to move it first.
- If you move the app, or open another copy, that launch points
nxtrmat it. When Next Term’s link still opens the other copy and needs a password to change, it asks, as above, rather than add a link later onPATHthat the shell would never reach. - The link is the only file it adds. Delete it to remove the command from your other terminals: Next Term leaves it out from then on, and Next Term › Install Command Line Tool (nxtrm)… puts it back.
