https://github.com/marco-ippolito/safe-start
https://github.com/marco-ippolito/safe-start
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/marco-ippolito/safe-start
- Owner: marco-ippolito
- License: mit
- Created: 2025-01-02T16:28:17.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-01-27T08:24:21.000Z (9 months ago)
- Last Synced: 2025-03-02T01:40:27.565Z (7 months ago)
- Language: TypeScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Safe-Start Command
The `safe-start` command-line tool provides a simpler yet secure way to utilize the Node.js permission model.
It supports loading a configuration file and processing its contents, all while ensuring that permissions are handled in an easy-to-use manner.## Installation
You can run the tool directly without installing it globally by using `npx`:
```sh
npx safe-start [options] [main]
```It requires a configuration file, by default `safe-start.json` in the current working directory.
You can specify a different file using the `--config` option.
The `safe-start.json` file should be in the following format:```json
{
"permission": {
"allow-addons": true,
// All flags related to permission model
},
"flags": { // Optional
"experimental-strip-types": true,
// All other flags
}
}
```Values can be either a string or an array of strings.
Possible options are:- `allow-addons`,
- `allow-child`,
- `allow-fs-read`,
- `allow-fs-write`,
- `allow-wasi`,
- `allow-worker`,```json
{
"permission": {
"allow-addons": true,
"allow-fs-write": "/foo/*",
"allow-fs-read": ["./bar/*", "./baz/*"],
}
}
```