A downloadable tool for Windows

what

🔵🌙 Crater is a Lua-based command line tool

🔵🐲 You can use it to run Lua scripts, with some convenience libraries added to Lua's standard library.

Crater is _just_ a normal Lua runtime (backed by MoonSharp) with some added globals that make it easier to write simple shell-style programs with.

  • args is a table that holds the arguments the program was invoked with, eg: crater foo a b c will run foo.crater (or foo.lua or foo) with an args = {"a", "b", "c"}
  • files provides an API for manipulating the file system.
  • program provides an API for running programs on your system
  • lib() is a function that works like require() but instead of importing local files, it imports files that are available in the Library folder next to the crater executable.

As mentioned above, crater pays attention to the files next to the executable.

  • Library contains lua files that can be imported via lib()
  • Scripts contains lua/crater files that crater can invoke in any context.

If you run crater foo then we check the following places in the following order, if a file is found at any part of this process, it's run and subsequent checks are skipped:

  • foo.crater in the working directory
  • foo.lua in the working directory
  • foo in the working directory
  • foo.crater in the Scripts directory next to the crater executable.
  • foo.lua in the Scripts directory
  • foo in the Scripts directory

This means you could have a build.crater in your project repo directory such that crater build will build your project. You can also have a make_new_project.crater in your Scripts directory such that crater make_new_project will build a new project in whatever directory you happen to be in.

Crater is cross platform but you might need to build it yourself if you're not on Window.

https://github.com/notexplosive/crater

why

This was a goofy project I made to make build pipelines for my games easier to write. This begs the question, why not use Python? I don't have a great answer to that! Use this tool at your own risk :)

Published 8 days ago
StatusReleased
CategoryTool
PlatformsWindows
AuthorNotExplosive

Download

Download
crater-windows.zip 28 MB
Version 1.0.67 8 days ago

Leave a comment

Log in with itch.io to leave a comment.