Motive
A developer environment manager with a nice future. But first let's just make a simple task runner that takes advantage of a special version of Lua.
Installing
- macOS
$ brew tap wess/packages
$ brew update
$ brew install motive
$ cd /to/some/dir
$ motive init
- windows
to do
- linux
to do
Getting started
Once Motive is installed run: $ motive init
and this will create a manifest file in your current directory. Anything in the manifest you write is standard lua, the only exception is defining tasks. Motive uses task to identify commands that can be run from the command line. For example:
-- task identifies what can be run using: $ motive taskname
task taskname do -- this will get printed when running: $ motive list
exec("echo", "Hello world")
end
-- This function cannot be called from the command line and only available
-- in the manifest
function hello()
print("Hello, world!")
end
-- A task can call a lua function
task funcall do -- Call a lua function
hello()
end
With your Manifest in place, simply call your task from the command line:
$ motive funcall
> Hello, world!
$ motive taskname
> Hello world
What's included?
Everything Lua offers with the addition of a fancy
exec
function that runs shell commands.
Todo
- Easy ways to install.
- Built-in file watch, change, execute.
- Request client because why not.
Contributing
Contributions are welcome, just make a pull request. If you are including new functionality, please write a usage example, and include any information that will impact installation and/or setup.
License
Motive is released under the MIT license. See LICENSE for details.