NeoConsole is a small, standalone package that offers a command line (a.k.a. a REPL) interface to a headless Pharo image.

It contains a number of extendable commands and metrics that allow you to execute arbitrary Pharo code for result (introspection and debugging) or side effect (to manipulate the live, running image). There is a history mechanism, you can refer to previous evaluation results and there is a primitive describe mechanism (like a one level inspect). The metrics system allows you to consult a number of predefined values. There is decent error handling.

Here is a screencast showing how this feels in practice:

The movie shows how to start from scratch, downloading Pharo, installing NeoConsole, running a headless image with the REPL installed in the background. Next, an HTTP server is added to the image and later a specific response is added as well. (You can speed up the movie, if you want).

Obviously this has been done before, and this is not the definitive solution in this area. For example, readline support (allowing you to edit your input) would be fantastic. A true command line inspector and debugger would be super as well. These are standard features in Lisp and would be totally possible in Pharo too.

I just needed this for myself, liked the result and thought it would be worth sharing.



Security warning: this service opens up your image for access to those with access to your local network (i.e. those logged in to your machine), without any further authenication, allowing them to do absolutely anything. Think and make sure that you know what you are doing.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: