A developer environment manager with a nice future

Overview

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.

Comments
  • Use docker to build Linux builds

    Use docker to build Linux builds

    This PR includes a script (just the script) that can be explicitly called when you, on say, an x86 or arm based mac, want to produce a linux build for the build system.

    Requires: Docker installed, and your user has permission to use it (otherwise you can run it with sudo, but you will have permission issues if you go to build motive natively after the fact).

    Uses a volume to build, and the release binary will be in the usual spot target/release/motive

    opened by jeremytregunna 0
  • Removes _do_ from init example task

    Removes _do_ from init example task

    fc73277a deprecated the need for the do statement in task declarations. The default manifest from motive init still contained do, which causes every command to break.

    This PR removes the deprecated statement from the default manifest.

    opened by kodumbeats 0
  • `exec()` does not run in task context

    `exec()` does not run in task context

    For some reason, exec() doesn't work in a task context. This also means that the shorthand syntax (removing exec()) is also affected.

    For instance, the example task does not work unless the shell call is moved into the lua function:

    > motive init
    [motive] ✔  Created Manifest file: /home/snowdum/tmp/manifest
    > motive list
    
    Motive Tasks:
    
    [motive] ℹ  example      - This is a task description
    
    
    > motive example
    
    Hello world
    
    > vim manifest
    > motive example
    
    Hello world
    total 12
    drwxr-xr-x  2 snowdum snowdum 4096 Mar 10 08:44 .
    drwx------ 38 snowdum snowdum 4096 Mar 10 08:44 ..
    -rw-r--r--  1 snowdum snowdum  168 Mar 10 08:44 manifest
    
    >
    
    > git diff manifest manifest.bak
    diff --git a/manifest b/manifest.bak
    index 4242315..67c9514 100644
    --- a/manifest
    +++ b/manifest.bak
    @@ -3,11 +3,11 @@
    
     function example_function()
       print("Hello world")
    +  exec("ls -la")
     end
    
     task example -- This is a task description
       example_function()
    
    -  exec("ls -la")
     end
    

    system info: arch linux - kernel 5.16.12-arch1-1 cargo 1.59.0 (49d8809dc 2022-02-10) commit 781e1140f46beefbbba856f932b694be38d13364

    opened by kodumbeats 0
  • Alias `list` to `ls`

    Alias `list` to `ls`

    For my convenience, I create a task to alias motive list to motive ls:

    task ls
      exec("motive list")
    end
    

    Does it make sense to alias this by default?

    opened by kodumbeats 0
  • Misconfigured manifest breaks CLI functionality

    Misconfigured manifest breaks CLI functionality

    When a manifest is misconfigured, motive list does not work, nor provide any hints on what's misconfigured. Using the manifest in #3:

    $ motive list
    [motive] ✖  Something went wrong...
    
    opened by kodumbeats 0
  • Manifest does not support bash linebreaks

    Manifest does not support bash linebreaks

    Trying to include bash linebreaks in a motive task is unsupported.

    Example manifest:

    task postgres
    docker run \
      --name postgres \
      --detach \
      --publish 5432:5432 \
      --env POSTGRES_USER=postgres \
      --env POSTGRES_PASSWORD=postgres \
      postgres:latest
    end
    

    Wrapping in exec() results in the same issue

    task postgres
    exec([[
    docker run \
      --name postgres \
      --detach \
      --publish 5432:5432 \
      --env POSTGRES_USER=postgres \
      --env POSTGRES_PASSWORD=postgres \
      postgres:latest
    ]])
    end
    

    Error message: [motive] ✖ Something went wrong...

    bug 
    opened by kodumbeats 0
Releases(0.0.3)
Owner
Wess Cope
I suffer from Application Development Disorder and an engineer at Appwrite.io
Wess Cope
A tool that uses the credentials stored in 1password as an environment variable.

openv A tool that uses the credentials stored in 1password as an environment variable. Requirements 1password command-line tool Getting Started # Sign

mrtc0 31 Nov 10, 2022
Send nice emails

Jolimail is an open source alternative to all the transactionnal email solutions. Why did we build jolimail? Jolimail comes from the frustration of us

Jérémie Drouet 100 Dec 20, 2022
A nice template for NEAR repos

Template for a NEAR project If you're looking for a no-std version of this template, go here. Contains: a setup script Cargo.toml setup with simulatio

Thor 12 Dec 28, 2021
A rust script to convert a better bibtex json file from Zotero into nice organised notes in Obsidian

Zotero to Obsidian script This is a script that takes a better bibtex JSON file exported by Zotero and generates an organised collection of reference

Sashin Exists 3 Oct 9, 2022
Add nice user-facing diagnostics to your errors without being weird about it.

thisdiagnostic is a Rust library for adding rich diagnostic metadata to errors, for some really fancy and customizable error reporting!

Kat Marchán 14 Feb 2, 2022
A versatile and efficient proxy framework with nice features suitable for various use cases.

A versatile and efficient proxy framework with nice features suitable for various use cases.

null 1.7k Jan 9, 2023
Generate Nice Solana Address By Template

Yes, I know about GPU generators. https://smith-mcf.medium.com/solana-vanity-address-using-gpus-5a68ad94d1d4 ./solana-nice-address --help solana-nice-

Kirill Fomichev 18 Jun 18, 2022
Who said python couldn't have nice errors?

potato Who said python couldn't have nice errors? Running git clone https://github.com/KittyBorgX/potato.git cd potato cargo build --release ./target/

Krishna Ramasimha 5 Jan 22, 2023
Persist game settings like music volume or graphic settings in a nice toml file in the right location.

Bevy Settings The goal of this project is to store settings in a resource throughout game launches. Currently this crate supports Linux, Mac and Windo

Tobias Kriebisch 9 Feb 25, 2023
Bevy Entities are nice. Objects are better!

?? Moonshine Object An extension to Bevy which provides an ergonomic interface for managing complex Entity hierarchies. Entities are nice. Objects are

null 7 May 7, 2024
Yet another Python environment manager.

yen The easiest Python environment manager. Create virtual environments for any Python version, without needing Python pre-installed. Installation Get

Tushar Sadhwani 19 Oct 7, 2023
gstats — command line tool to print a developer handy summary of all git repositories below current directory

gstats Simple Rust tool to get quick summary info on git repos showing latest tag, branch, state. I implemented this to help me work with a the not to

Boon at Shift 12 Jun 10, 2021
🌌⭐ Git tooling of the future.

❯ Glitter Git tooling of the future. ❯ ?? Features Config files Fast Easy to use Friendly errors ❯ ?? Documentation For proper docs, see here ❯ ✋ What

Milo 229 Dec 22, 2022
Cassette A simple, single-future, non-blocking executor intended for building state machines.

Cassette A simple, single-future, non-blocking executor intended for building state machines. Designed to be no-std and embedded friendly. This execut

James Munns 50 Jan 2, 2023
WebAssembly on Rust is a bright future in making application runs at the Edge or on the Serverless technologies.

WebAssembly Tour WebAssembly on Rust is a bright future in making application runs at the Edge or on the Serverless technologies. We spend a lot of ti

Thang Chung 129 Dec 28, 2022
Concurrency extensions for Future

futures-concurrency Concurrency extensions for Future API Docs | Releases | Contributing Installation $ cargo add futures-concurrency Contributing Wan

Yoshua Wuyts 169 Dec 27, 2022
Argument parsing for the future 🚀

argi Argument parsing for the future ?? Features Macro-based approach, providing an intuitive way to layout a cli Rich auto-help generation, styling b

Owez 132 Oct 23, 2022
async-alloc-counter measures max allocations in a future invocation

async-alloc-counter measures max allocations in a future invocation see examples/ for usage This allocator can be used as follows: use async_alloc_cou

Geoffroy Couprie 2 Dec 3, 2021
My journey of learning rust as a web developer.

My journey of learning rust Low-level languages seem very interesting to me. I always wanted to learn a low-level language but never had the chance. T

null 1 Oct 21, 2021
Roadmap to becoming a Rust Web Developer in 2021

Roadmap to becoming a Rust Web Developer in 2021

Anshul Goyal 1.4k Jan 4, 2023