An open API service indexing awesome lists of open source software.

https://github.com/ikuradon/yabume-piston-client

Nostr bot that executes code via Piston API
https://github.com/ikuradon/yabume-piston-client

bot code-execution nostr piston

Last synced: about 2 months ago
JSON representation

Nostr bot that executes code via Piston API

Awesome Lists containing this project

README

          

# yabume-piston-client

Nostr bot that executes code via
[Piston API](https://github.com/engineer-man/piston).

## Commands

### /run \

Execute code in the specified language.

**Basic Syntax:**

````
/run

```

```

````

**Legacy Syntax:**

```
/run

```

### /rerun

Re-execute the referenced `/run` post with optional new args/stdin.

```
/rerun

---

```

### /run help

Show usage help.

### /run lang

Show supported languages.

## Setup

### Environment Variables

| Variable | Description | Default |
| ----------------- | --------------------------------------------------- | ------------------ |
| `PISTON_SERVER` | Piston API server URL | `https://emkc.org` |
| `RELAY_URL` | Nostr relay WebSocket URL | `wss://yabu.me` |
| `PRIVATE_KEY_HEX` | Nostr private key (hex) | (required) |
| `LOG_LEVEL` | Log output level (`DEBUG`, `INFO`, `WARN`, `ERROR`) | `INFO` |

Create a `.env` file or export the variables.

### Run

```bash
deno task start
```

### Test

```bash
deno task test
```

## License

[MIT](LICENSE)