Choose how the desktop app runs commands on Windows — asking first or inside WSL — set up WSL, and see what else differs on Windows.

On this page

On Windows, the desktop app runs commands one of two ways: asking before each one (the default), or contained inside WSL. Everything else in these pages applies on Windows too, with Ctrl wherever they show Cmd. This page is for Windows users: it covers how commands run and the other differences; installing is in Install the desktop app.

The rule#

On macOS and Linux every command is contained to the folder. On Windows it is only when you choose WSL; otherwise each command asks first, and anything that deletes or overwrites doesn’t run at all.

How commands run#

Choose in Settings → General, under Commands:

Choice Settings shows What happens
Ask before each command (the default) Commands: need your OK (not contained) “Each command asks first, because it isn’t contained. Ysra never runs a delete command, but a script you OK (tests, builds, package scripts) can change or delete files anywhere your account can, and undo only covers this folder.”
Run inside WSL Commands: contained (WSL) “Commands run contained inside WSL: only in the folder you opened, without asking before each one.”

Run inside WSL is greyed out until WSL is set up; its set-up steps are below the choices.

Contained commands are paused

Contained commands, under Ysra’s own Windows account, are off for now: setting them up could make the app stop responding. If you chose them before, commands ask before each one again. If you set them up, Settings → General still shows Contained commands with Remove, to take Ysra’s Windows account away. Choose Run inside WSL to run commands without asking each one.

When commands ask first#

With Ask before each command, three rules decide.

The command What happens Marked in the timeline
Only reads, inside the folder, such as dir, git status or node --version Runs without asking Ran git status without asking (safe read)
Deletes or overwrites Doesn’t run: On Windows I don’t run commands that delete or overwrite, yet: do it yourself if you want it. Didn’t run …
Anything else A Run this command? card Waits for your OK: …

A read that could do more than read, or that reaches outside the folder or into a secret file, asks like any other command.

The card#

Run this command? shows the command and the folder, and says “This command isn’t contained: it can reach the network and anything your account can.”

Answer What it does
Run once Runs this command, this time
Allow npm for this session Runs it, and every later npm command in this thread’s session, without asking. It covers the whole program
Don’t run Ysra doesn’t run it, and doesn’t try it again
Exceptions
Never offered for the session A shell or inline code (cmd, powershell, pwsh, bash, node -e, python -c …), because that could run anything
Asks even for an allowed program Pushing, publishing, deploying, signing in or handling tokens, changing Git remotes
A red line and Run it anyway A command that names a path outside the folder. See The command card
No answer within 15 minutes Counts as Don’t run

Stopping ends everything a command started.

Let commands run without asking#

The message box has a chip for this, Auto: run reads without asking. It is separate from the message box’s Auto access (auto mode).

With the chip on
Run without asking Reads, listings and version checks in this folder
Still ask Anything that runs your project’s code (scripts, tests, builds, installs, node, python), works outside the folder, or pushes, publishes or deploys
How long This thread’s session only. It is never remembered

Click the chip, or Turn on auto for this session on a command card; Ysra asks Run commands without asking? first. While it’s on, one click turns it off. To run project code without a card, contain it: choose WSL.

Set up WSL#

What WSL is, and why it helps#

WSL (Windows Subsystem for Linux) is a feature of Windows that runs a real Linux system beside Windows on the same computer. Your Windows files stay where they are, and Linux can read them.

On Linux, Ysra can contain every command to the folder you opened: a command can't change anything outside it. Windows itself has no equivalent, which is why Ysra asks before each command there. Inside WSL, Ysra contains commands the Linux way, so they run without a card for each one, as on a Mac or a Linux computer.

Without WSL (the default) With Run inside WSL
Each command Asks first, unless it is a safe read Runs, contained to your folder
Commands that delete or overwrite Don't run Ask, as on Linux
Your project's tools The Windows ones The ones installed inside WSL
Best for Trying Ysra, small changes Everyday work on a project

The tip in the message box#

While commands ask one by one, the message box shows a tip: “On Windows, Ysra asks before each command. For a faster setup, run commands inside WSL: they stay contained to your folder without asking each time.” Set up WSL opens the steps below in Settings, How it works opens this page, and Not now hides the tip for good. It isn't shown for a folder that is already inside WSL.

The steps#

  1. Install WSL yourself if you don’t have it: in PowerShell as administrator, wsl --install, then restart. Ysra never installs it for you. This also installs a Linux system (Ubuntu, unless you choose another).
  2. Open WSL: choose Ubuntu in the Start menu, or type wsl in PowerShell. You are now in a Linux terminal. Install what Ysra needs:

    sudo apt install bubblewrap socat ripgrep
    
  3. In Settings → General, under WSL, choose Set up to add Ysra’s helper inside WSL (a small download, checked against its published checksum). After an app update it may ask to Update it.

  4. Choose Run inside WSL.

Your project’s tools then have to exist inside WSL too: Node.js, Python and so on are the WSL ones, not the Windows ones. The first time a command card appears and WSL is ready, Ysra offers once to switch (Use WSL).

Small screens and zoom#

The window always opens inside the screen, above the taskbar, and fits again when you change screens or the display scaling. On a small laptop screen the side panel scrolls its sections, while the top and the foot of the panel (notices, Help and your account) stay in reach, so your account and Settings are always one click away.

To Press
Zoom in Ctrl++ (or Ctrl+=)
Zoom out Ctrl+-
Back to normal size Ctrl+0

The zoom works with any keyboard layout and the number pad, and is kept for next time.

Other differences#

On Windows
Installer Not signed yet: SmartScreen shows “Windows protected your PC”. Choose More info → Run anyway
Shortcuts Ctrl wherever these pages show Cmd
Closing the window Ysra keeps running in the tray; Quit Ysra from the tray stops it
Opening a folder Right-click it and choose Open in Ysra
Line endings Kept: a CRLF file stays CRLF, an LF file stays LF
Names Windows treats specially Refused, such as CON.txt or a name ending in a dot
Folders refused A drive root such as C:\, a network share’s top folder such as \\server\share, and C:\Users itself. Pick the project folder
Git Not needed: if Windows has no Git, Ysra uses its own. A folder without Git still opens, without undo: each change is asked
Big folders Open without freezing. One too big to snapshot opens without undo, and each change is asked
The app’s log Show log file in Settings → General shows it in File Explorer. See Troubleshooting
YsraDocs