2026-01-25 04:58:39 +01:00
# Wren-CLI
2020-02-12 05:38:21 +01:00
2026-01-25 04:58:39 +01:00
retoor < retoor @ molodetz . nl >
2020-02-12 05:38:21 +01:00
2026-01-25 04:58:39 +01:00
A command-line interface and REPL for the [Wren ](http://wren.io ) programming language. Built on [libuv ](http://libuv.org/ ) for asynchronous I/O with native support for HTTP/HTTPS, WebSockets, TLS, SQLite, JSON, regex, and more.
2020-02-12 05:38:21 +01:00
2026-01-25 04:58:39 +01:00
## Prerequisites
2020-06-05 21:12:15 +02:00
2026-01-25 04:58:39 +01:00
- C compiler (GCC or Clang)
- Make
- OpenSSL development libraries
- Python 3 (for tests)
2020-06-05 21:12:15 +02:00
2026-01-25 04:58:39 +01:00
## Build
2020-06-05 21:12:15 +02:00
2026-01-25 04:58:39 +01:00
```bash
git clone https://github.com/wren-lang/wren-cli.git
cd wren-cli
make build
```
2020-06-05 23:54:54 +02:00
2026-01-25 04:58:39 +01:00
Output binary: `bin/wren_cli`
2020-06-05 21:12:15 +02:00
2026-01-25 04:58:39 +01:00
### Platform-Specific Builds
2020-02-13 08:01:16 +01:00
2026-01-25 04:58:39 +01:00
| Platform | Command |
|----------|---------|
| Linux | `make build` |
| macOS | `cd projects/make.mac && make` |
| FreeBSD | `cd projects/make.bsd && gmake` |
2020-02-13 08:01:16 +01:00
2026-01-25 04:58:39 +01:00
## Test
2020-02-13 08:01:16 +01:00
2026-01-25 04:58:39 +01:00
```bash
make tests
```
2020-02-13 08:01:16 +01:00
2026-01-25 04:58:39 +01:00
Run a specific test suite:
2020-02-13 08:01:16 +01:00
2026-01-25 04:58:39 +01:00
```bash
python3 util/test.py json
```
2021-04-28 23:48:31 +02:00
2026-01-26 05:12:14 +01:00
## Build Targets
| Target | Description |
|--------|-------------|
| `make build` | Release build |
| `make debug` | Debug build |
| `make clean` | Clean build artifacts |
| `make tests` | Build and run all tests |
| `make buildmanual` | Build documentation to `bin/manual/` |
2026-01-25 04:58:39 +01:00
## Usage
2021-04-28 23:48:31 +02:00
2026-01-25 04:58:39 +01:00
```bash
bin/wren_cli script.wren # Execute a script
bin/wren_cli # Start the REPL
```
2020-02-13 08:01:16 +01:00
2026-01-25 04:58:39 +01:00
## Modules
2020-02-13 08:01:16 +01:00
2026-01-25 04:58:39 +01:00
**Core**: io, os, scheduler, timer, net, repl
2020-02-13 08:01:16 +01:00
2026-01-25 04:58:39 +01:00
**Extended**: json, env, math, base64, datetime, dns, signal, subprocess, crypto, regex, http, tls, sqlite, websocket, jinja, pathlib, tempfile, uuid
2020-02-14 01:06:54 +01:00
2026-01-25 04:58:39 +01:00
## Documentation
2020-02-14 01:06:54 +01:00
2026-01-26 05:12:14 +01:00
### Building the Manual
```bash
make buildmanual
```
Output: `bin/manual/` (open `index.html` in a browser)
The manual works offline when opened directly via `file://` protocol.
### Manual Source Structure
```
manual_src/
data/
site.yaml # Site metadata (name, version)
navigation.yaml # Navigation structure and page list
templates/ # Jinja2 base templates
pages/ # Content pages (api/, tutorials/, howto/, etc.)
static/ # CSS, JS assets
```
### Adding Documentation for a New Module
1. Create `manual_src/pages/api/<name>.html` using the template from an existing API page
2. Add entry to `manual_src/data/navigation.yaml` under the API Reference section
3. Update `prev_page` /`next_page` in adjacent API pages
4. Build: `make buildmanual`
2020-02-13 08:01:16 +01:00
2026-01-25 04:58:39 +01:00
## License
2015-01-02 16:42:08 +01:00
2026-01-25 04:58:39 +01:00
MIT