Have you had a look at inim or nim secret?
The difference is that inim compiles the code behind the scenes while nim secret is using NimScript.
For simple 1-2 liners, I use nim secret with rlwrap to make line editing bearable, something like rlwrap -S"> " nim secret.
For everything else I just create a new temp file and use a file watcher like entr to compile and run the file. The compile time is very fast.