---
title: The sashmark command
slug: sashmark-command
summary: How the planned sashmark terminal command is meant to open Markdown files in Sashmark on Mac, Windows and Linux.
---

# The sashmark command

Sashmark is in development. Nothing has been released yet, and there is no public build. This page describes the development build. Planned items: https://www.sashmark.com/roadmap.

Sashmark is in development. This page describes how the planned `sashmark` terminal command is meant to work. The command is planned to be `sashmark`, in lowercase, on Mac, Windows and Linux. It is planned to open Markdown files in the running Sashmark window, or start Sashmark if it is not running.

## How installing is planned to work

1. Open the menu:
   - **Mac:** the **Sashmark** app menu.
   - **Linux** and **Windows:** the **Help** menu.
2. Mac and Linux: choose **Install 'sashmark' Command…**. Windows: choose **Add 'sashmark' to PATH…**.
3. Mac and Linux: if your computer asks for an admin password, enter it. Sashmark is planned to ask only when the install folder needs it. Windows will not ask.

A bar at the top of the window is planned to say `Installed sashmark at <path>.` On Windows it will say `Installed sashmark. Open a new terminal to use it.` Terminals that were already open will not see the change, so open a new one.

Where it is planned to go:

- **Mac:** `/usr/local/bin/sashmark`
- **Linux:** `~/.local/bin/sashmark` if `~/.local/bin` is on your `PATH`, otherwise `/usr/local/bin/sashmark`
- **Windows:** the folder that holds the installed `sashmark.exe`, added once to your user `PATH`. No extra command file is planned.

On Mac and Linux, Sashmark is planned never to edit your shell settings or your `PATH`. On Windows it will add only its own app folder to your user `PATH`, without admin rights, and never change the system `PATH`.

## How using it is planned to work

| Type | What is planned to happen |
|---|---|
| `sashmark notes.md` | Opens the file in the running Sashmark window. Starts Sashmark first if it is not running. |
| `sashmark a.md ../b.md` | Opens each file as a tab in the last-used window. A file another window already has goes to that window. Relative paths start from the folder you are in. |
| `sashmark missing.md` | Shows `File not found: <path>` and brings Sashmark forward by default (see the background setting below). Nothing opens. |
| `sashmark` | Starts Sashmark, or brings the last-used window to the front. |

On Mac and Linux the command is planned to return right away, so your terminal stays free. On Windows the command is planned to run the Sashmark app itself, so whether the terminal waits will depend on the terminal or script that calls it.

On Windows, the same file typed with different capital letters (`Notes.md`, `NOTES.md`) is planned to be one file, so it opens in the same tab.

On Mac, a Finder double-click is planned to bring Sashmark forward, and the window that already has the file will come to the front, unless that window is still opening a file you chose inside it. A script will be able to use `open -g -a Sashmark /absolute/path/to/doe-notes.md` to open a file in the background: no window is raised and no tab changes. Starting Sashmark may still bring its window forward; background startup is not guaranteed.

### Background requests to a running app

Set `"open_files_in_background": true` in `settings.json` in the [app data folder](tabs.md#recent-documents). It is planned to be off by default. If the key is missing, add it to the existing JSON object, keeping its other keys and valid JSON. Save the file: the next forwarded request is planned to read it without a restart.

With this setting on, `sashmark notes.md` is planned to forward the file to the running instance without asking to raise or focus its window. Several files, an already-open file, and a missing file will follow the same rule; tab selection and error notices still update in Sashmark. Bare `sashmark` will still raise the window, and starting Sashmark when it is not running will still show and focus it. OS activation stays outside this setting; desktop focus checks are still pending. See [Opening a file](opening-files.md#open-files-in-the-background).

## The old skimmark name

Sashmark was renamed during development. The command is planned to be `sashmark` only, with no `skimmark` alias.

- On Mac and Linux, **Install 'sashmark' Command…** is planned to remove an older `skimmark` command that Sashmark wrote itself. It will never write a new one.
- A `skimmark` file or shortcut that some other program made will be left alone.
- Windows will not create a `skimmark` command.

## If something goes wrong

These messages are planned.

- `Could not install sashmark: <path> already exists and was not installed by this app.` (Mac and Linux) Another program already uses that name, and Sashmark will leave it alone. Remove or rename that file yourself if you want Sashmark's command there.
- `sashmark: app not found at <path>; reinstall the sashmark command` (Mac and Linux) Sashmark moved or was deleted after you installed the command. Open Sashmark from its new place and install the command again.
- `Could not install sashmark (<code>): <reason>` The install did not finish, for example because the password prompt was cancelled. Try again.
- An install that asks for your password and then does not finish (Mac and Linux): Sashmark is planned to install with admin rights only into a folder that only the system can change. It will stop if the folder, or any folder above it, is a symlink, is not owned by the system (root), or can be changed by other users. Fix the folder, or install the command into a folder you own.
- `Could not install sashmark (path-update-failed): ...` (Windows) Sashmark could not finish registering its folder on your user `PATH`. Try again, or add the folder named in the message to your user `PATH` yourself.
- `'sashmark' is not recognized` (Windows) The terminal was opened before the install. Open a new one.
- `Could not install sashmark (path-too-long): ...` (Windows) Adding the folder would make your `PATH` longer than Windows terminals accept (8191 characters). Nothing is registered; remove `PATH` entries you no longer use, then try again.
- A file name with spaces or characters like `&`: put the name in quotes, such as `sashmark "Doe & Co.md"`.
- An app folder whose name has `%`, `;`, quotes or control characters cannot be registered safely on `PATH` (Windows). Use an ordinary folder and add the command again.
- Duplicate matching PATH entries (Windows) make it unclear which one Sashmark added. The uninstall message is planned to name the folder. Keep one copy of that exact folder entry in `PATH`, then retry the uninstall; leave similarly named folders alone.

## Windows uninstall and moved apps

Uninstall is planned to remove only the full folder entry recorded when Sashmark added it. A folder that was already on your `PATH` will be left alone, along with similarly named folders and all other entries. An uninstall followed by a new install will need **Add 'sashmark' to PATH…** again.

If the app moves, add the command again from its new location. Sashmark is planned to replace only its previously recorded registration.
