neph

A modern command line job processor that can execute jobs concurrently command-line command-line-tool command-line-app job-processor job-scheduler make concurrency yml
0.1.6 released
tbrand/neph
204 6 3
Taichiro Suzuki

Latest version Latest version

A modern command line job processor written in Crystal that can execute jobs concurrently. :rocket:
Neph can be substitute for make command. :rocket:

Neph is self-hosting. So after installing neph, try

> neph

at installed directory.

Installation

Neph is written in Crystal, so you need Crystal to install Neph. To install Crystal, see official manual.

To install neph, run following command

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/tbrand/neph/release/tools/install.rb)"

Install neph manually

Cloning this project

git clone https://github.com/tbrand/neph

Compile

> cd neph
> shards build --release

Now executable binary is at neph/bin/neph.

Usage

Put neph.yml at root of your project

main:
  command:
    echo "Hello Neph!"

Execute neph

> neph

STDOUT and STDERR logs are located at .neph/log/[job_name]/*

Options

You can specify job name by -j. In neph.yml,

hello:
  command:
    echo "Hello!"

Then,

> neph -j hello

To see other usages, use --help option

> neph --help

neph.yml

You can define dependencies between jobs like this

main:
  command:
    echo "Main!"
  depends_on:
    - hello
hello:
  command:
    echo "Hello!"

Here main job depends on hello. So when you execute neph, hello job is triggered before the execution of the main job.

You can ignore errors by ignore_error: true

main:
  command:
    echo "Main!"
  depends_on:
    - hello
hello:
  command:
    hogehoge
  ignore_error:
    true

In this jobs, hello job will raise an error since hogehoge command doesn't exist. But main job will be triggered.

You can specify sources by sources: for the jobs like make command.

main:
  command:
    echo "Main!"
  depends_on:
    - hello
  sources:
    - src/test.c
hello:
  command:
    hogehoge
  ignore_error:
    true

If the sources are not updated, the job will be skipped.

You can import other configurations by

import:
  - import_config.yml

main:
  depends_on:
    import_config_job

where import_config.yml is

import_config_job:
  command:
    echo "OK!"

See sample for details.

Used

Neph is used in which_is_the_fastest. In which_is_the_fastest, building time is reduced from 102[sec] to 33[sec]. neph.yml is here.

Contributing

  1. Fork it ( https://github.com/tbrand/neph/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • tbrand Taichiro Suzuki - creator, maintainer
neph:
  github: tbrand/neph
  version: ~> 0.1.6
License MIT
Crystal 0.22.0

Authors

Dependencies 0

Development Dependencies 0

Dependents 0

Last synced .
search fire star recently