Haruno Knowledge base

Running commands

In the sandbox, Haruno runs commands in a simpler built-in shell. Most everyday commands work. Some advanced shell tricks do not, and Haruno is told about it.

  • Mac appAvailableThe Mac's isolated space is a Linux machine with a full bash shell, so Windows's shell limits do not apply.
  • Windows appAvailable

Haruno sometimes runs commands to do its work: listing files, searching text, converting a document. In the sandbox it runs them in a simpler built-in command shell that ships with Haruno.

What the customer sees

A command appears in the chat as a card or a step, for example run a command. Under Details the exact command is shown. Whether it asks first depends on the permission mode. See Approvals and permission modes.

Most commands behave as expected. Because the built-in shell is simpler than the full one, a few advanced tricks do not work. Haruno is told which shell it has and what it cannot do, so it normally writes a command that works.

What does not work

These are the main gaps, in plain terms:

  • lists stored in a variable, and ranges such as {1..3};
  • the compact counting loop used in many scripts;
  • changing text to upper or lower case inside a variable;
  • some test expressions with [[ ... ]], which can give a wrong answer instead of an error;
  • programs you installed yourself. The commands only find the tools that come with Haruno.

Git is a special case. See Git inside the sandbox.

Where files go

  • Temporary files go to a scratch area that belongs to that chat. Haruno can write there without asking.
  • The folder of the chat is your real folder. A command that changes files there changes them for real.
What to tell a customer

If Haruno says a command failed because of its syntax, nothing is wrong with the PC. The sandbox shell is simpler than the one engineers use. Ask Haruno to try again in a different way.

No network from a command

A command cannot open an internet connection by itself. Downloading with a command does not work. Haruno opens web pages in a controlled way instead. See Web access.

Last updated · PR #2944 · View this version on GitHub

History (1 version)
  1. Internal knowledge base for staff: site, reader keys, assistant, 197 pages and the PR rule (#2944)
    What changed
    @@ -0,0 +1,41 @@
    +---
    +title: Running commands
    +summary: In the sandbox, Haruno runs commands in a simpler built-in shell. Most everyday commands work. Some advanced shell tricks do not, and Haruno is told about it.
    +feature: sandbox-shell
    +covers:
    +  - windows-client/docs/sandbox-shell.md
    +  - windows-client/Haruno.Desktop.Interop/SandboxShellLocator.cs
    +---
    +
    +Haruno sometimes runs commands to do its work: listing files, searching text, converting a document. In the sandbox it runs them in a simpler built-in command shell that ships with Haruno.
    +
    +## What the customer sees
    +
    +A command appears in the chat as a card or a step, for example **run a command**. Under **Details** the exact command is shown. Whether it asks first depends on the permission mode. See [Approvals and permission modes](/windows/safety/approvals-and-permission-modes/).
    +
    +Most commands behave as expected. Because the built-in shell is simpler than the full one, a few advanced tricks do not work. Haruno is told which shell it has and what it cannot do, so it normally writes a command that works.
    +
    +## What does not work
    +
    +These are the main gaps, in plain terms:
    +
    +- lists stored in a variable, and ranges such as `{1..3}`;
    +- the compact counting loop used in many scripts;
    +- changing text to upper or lower case inside a variable;
    +- some test expressions with `[[ ... ]]`, which can give a wrong answer instead of an error;
    +- programs you installed yourself. The commands only find the tools that come with Haruno.
    +
    +Git is a special case. See [Git inside the sandbox](/windows/safety/git-in-the-sandbox/).
    +
    +## Where files go
    +
    +- Temporary files go to a scratch area that belongs to that chat. Haruno can write there without asking.
    +- The folder of the chat is your real folder. A command that changes files there changes them for real.
    +
    +<Callout variant="tip" title="What to tell a customer">
    +If Haruno says a command failed because of its syntax, nothing is wrong with the PC. The sandbox shell is simpler than the one engineers use. Ask Haruno to try again in a different way.
    +</Callout>
    +
    +<Callout variant="info" title="No network from a command">
    +A command cannot open an internet connection by itself. Downloading with a command does not work. Haruno opens web pages in a controlled way instead. See [Web access](/windows/safety/web-access/).
    +</Callout>