Skip to content

Commit

Permalink
Document new --files-dir option
Browse files Browse the repository at this point in the history
  • Loading branch information
miralgj committed Apr 21, 2024
1 parent 6b94c3c commit ba3b070
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ Is this a bad idea? Si!
## Command-Line Options

* `--command`\
Command to expose (can be used multiple times). The command base name is used as the command name.
Command to expose (can be used multiple times). The command base name is used as the command name

* `--basic-auth-user`\
Username for basic http authentication

* `--basic-auth-pass`\
Password for basic http authentication

* `--files-dir`\
Path to directory to serve files under `/files` route

* `--listen-host`\
Specifies the host to listen on\
Default: `0.0.0.0`
Expand Down Expand Up @@ -79,3 +82,11 @@ curl -s -X POST -d '{"name":"ps", "args": ["-l"]}' http://10.0.0.1:3000/
"stdout": "F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD\n0 S 1001 3109 3046 0 80 0 - 3422 - pts/1 00:00:01 zsh\n0 S 1001 9457 3109 0 80 0 - 326535 - pts/1 00:00:00 go\n0 S 1001 9521 9457 0 80 0 - 288997 - pts/1 00:00:00 main\n4 R 1001 9618 9521 0 80 0 - 2554 - pts/1 00:00:00 ps\n"
}
```

### Serving Output Files

If an exposed command generates files, you can expose a directory with the `--files-dir` option to make them available for download.

```
si --command /usr/bin/customscript --files-dir /tmp/outputdir
```

0 comments on commit ba3b070

Please sign in to comment.