Code Monkey home page Code Monkey logo

motive's Introduction

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 -- this will get printed when running: $ motive list
  echo "Hello world"
  @ls -la
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 -- Call a lua function
  hello()
end

Motive's Lua subset has some special magic in it that knows if you are calling Lua or not. You can use functions and call the functions like normal and if you want to call something from then command line you just type out the command (from within a Task declaration.). Like:

task hi
  ls -la
  @ls -la
end

The first call to ls -la will print the results to the terminal, and by adding @ in front of our shell command it will mute the output, ie: @ls -la

With your Manifest in place, simply call your task from the command line:

$ motive funcall
> Hello, world!
$ motive taskname
> Hello world

Breaking changes

  • do is no longer used when defining a task.

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.

motive's People

Contributors

jeremytregunna avatar kodumbeats avatar wess avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.