1.2.0 • Published 13 days ago

flok-repl v1.2.0

Weekly downloads
14
License
GPL-3.0+
Repository
-
Last release
13 days ago

flok-repl

REPL client for interfacing with a Flok server and live coding interpreters.

See Flok for more.

Work in progress

Install

npm install -g flok-repl

Usage

To start a REPL connected to some hub:

flok-repl -- CMD [ARGS...]

Run flok-repl --help to see all available options.

Local server

If you have a local web server running (see flok-web, and want to use SuperCollider for a session named 1a0c2df3-5931-46dd-9c7c-52932de15a5d, just run:

flok-repl -t sclang -s 1a0c2df3-5931-46dd-9c7c-52932de15a5d

This will start sclang interpreter and connect it to Flok. Now when you (or someone else) evaluates code in Flok, it will be sent to sclang.

The default hub is your own computer (i.e. ws://localhost:3000). If you want to connect to a remote hub on your LAN, for example to 192.168.0.5:

flok-repl -t sclang -s 1a0c2df3-5931-46dd-9c7c-52932de15a5d -H ws://192.168.0.5:3000

There is a list of known interpreters. Use flok-repl --list-types to list them. You can run any command that accepts input from the standard input, like any language REPL. For instance, to use with cat:

flok-repl cat

Remote server

WARNING - Please Read: As of today, using a public remote hub is dangerous as anyone can evaluate code on your computer via Flok, be it sound playing or writing files on your disk (any general purpose programming language can do that), so unless you made flok-repl run on a sandboxed environment, please, make sure only trusted users are using your session when you use a public hub. I will not be responsible for any damaged caused by Flok. You have been warned.

To start a REPL for a remote server/hub, you must provide a --hub/-H option.

There's currently a hub on flok-hub.herokuapp.com. This public server runs on https, so you have to use wss:// instead of ws:// as you would normally on local servers. For example, to start a tidal REPL, run the following:

flok-repl -H wss://flok-hub.herokuapp.com -t tidal -s 1a0c2df3-5931-46dd-9c7c-52932de15a5d

Development

This project uses Yarn. If you don't have it installed, read this page and follow the instructions.

After unpacking or cloning this repository, cd into it and run yarn to install all dependencies.

Run yarn flok-repl or node bin/flok-repl.js to execute the binary script.

With yarn test you can run tests.

Contributing

Bug reports and pull requests are welcome on GitHub at the issues page. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

This project is licensed under GPL 3+.

1.2.0

13 days ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago

1.0.0-alpha.10

4 months ago

0.4.12

4 months ago

1.0.0-alpha.6

1 year ago

1.0.0-alpha.4

1 year ago

1.0.0-alpha.3

1 year ago

1.0.0-alpha.2

1 year ago

0.4.11

1 year ago

0.4.9

2 years ago

0.4.10

2 years ago

0.4.8

2 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.17

4 years ago

0.3.16

4 years ago

0.3.15

4 years ago

0.3.14

4 years ago

0.3.13

4 years ago

0.3.12

4 years ago

0.3.11

4 years ago

0.3.10

4 years ago

0.3.9

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.0

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago