Tree


.gitignorecommits | blame
LICENSEcommits | blame
Makefilecommits | blame
README.mdcommits | blame
bin/
config/
doc/
src/
test/
tools/

README.md

# pisol

Run a command in a Landrun sandbox for the current directory.

```sh
pisol COMMAND [ARG...]
pisol -- COMMAND [ARG...]
```

Run `pisol` with no arguments to edit `.isolate`.

## Requirements

- Bash
- [Landrun](https://github.com/Zouuup/landrun)
- Chez Scheme 10.4 or later
- Make

## Build and use

```sh
make build
make tui
pisol COMMAND [ARG...]
```

`make tui` opens the editor. Add writable directories and outbound TCP ports,
then save with `x`.

The sandbox allows read, write and execute access to the current directory.
It allows writable temporary storage and read access to system runtime files.
Outbound TCP is denied unless configuration allows it.

## Configuration

`.isolate` is trusted Bash. pisol loads it after the optional global init file.

```bash
args+=(
  --rwx "/path/to/shared"
  --connect-tcp 443
)
```

Set `ISOLATE_EXTRA_CONFIG` to use a different local file. Set
`PISOL_INIT_CONFIG` to use a different global init file. The default global
path is `~/.config/pisol/init`.

Saving creates a static argument list. It removes comments and dynamic shell
code from the local file.

`NO_COLOR=1` disables editor colour. `ISOLATE_ENV` prevents nested sandboxes.

## Install

```sh
make test
make install
```

`make install` uses `/usr/local`. Set `PREFIX`, `DESTDIR`, `BINDIR`,
`LIBEXECDIR`, `MANDIR` or `SCHEME` to change build or install paths.