Skip to content
Perl6 Automation Framework
Branch: master
Clone or download
Latest commit f0c240b Jun 13, 2019


Sparrow6 - Perl6 Automation Framework

Comparison with other tools

  • Are you familiar with configuration management tools, and/or automation frameworks like Ansible/Chef/Salt? Sparrow6 is written to solve pretty much the same tasks but with different approach.

  • As well as there is task runners like Grunt/Gulp - Sparrow6 could be used as a replacement for them.


zef install Sparrow6

Build Status

Build Status


Sparrow6 is not yet (fully) implemented, see Roadmap for progress.


Sparrow6 consists of various APIs and clients.

It's depends on your needs and purposes which one to use.

Following a brief introduction into each of the Sparrow6 components.

Sparrow6 Development Guide

Check documentation/development on how to develop Sparrow6 tasks.

Sparrow6 Task Runner API

Sparrow6 Runner is an internal runner for Sparrow6 tasks, you probably don't need to get into it's guts, but if you do, here is briefly outlined API.

Run task


use Sparrow6::Task::Runner;
  name  => "bash",
  root  => "examples/plugins/bash",
  do-test => True,
  show-test-result => True,
  debug => %*ENV<SP6_DEBUG> ?? True !! False,
  parameters => %(
    command => 'echo $foo',
    debug   => 1,
    envvars => %(
      foo => "BAR"

Sparrow6::Task::Repository API

Sparrow6::Task::Repository API is an internal API to interact with Sparrow6 repositories, you probably don't need to get into it's guts, but if you do, here is briefly outlined API.

Index update


use Sparrow6::Task::Repository;
  url => "file:///var/sparrow-local-repo",
  debug => True,

Plugin install


use Sparrow6::Task::Repository;
  url     => "",
  debug   => True,

Sparrow6 DSL

Sparrow6 DSL is a syntax sugar to run Sparrow6 tasks, instead of using internal runner you'd better use this one. This DSL is also exposed through various of clients (Tomtit, Sparrowdo, Sparky, Sparrowform )


use Sparrow6::DSL;

task-run "my task", "plugin", %(
  foo => "BAR",
  bar => 100

file "/tmp/foo.txt";

service-restart "nginx";

bash "echo Hello World";

See the full list of DSL functions here - documentation/dsl

Sparrow6 modules

Sparrow6 modules allow to write portable Sparrow6 scenarios distributed as Perl6 modules, read more about it - documentation/modules

Embedded testing facilities

Sparrow6 have it's way to write tests for tasks. Choose the one you need.

Task Checks

Task checks is regexp based DSL to verify structured and unstructured text.

It allows to write embedded test, verifying tasks output.

The DSL is extremely flexible and sometimes has quite a steep learning curve, but this worth it, once you've got to grips with it, you'll never want something else! ((=:

Here are some examples:

# check that output is sequence of English alphabet:

  generator: <<CODE
    print join "\n", map {'regexp: ^^' . $_ . '$$'} a .. z;

#  find all numbers between <number> </number> tags
#  sum them up
#  and print sums in sorted order 

# <number>
#  10
#  20
#  30
# </number>

# <number>
#  20
#  10
#  10
# </number>

between: {'<number>'}  {'</number>'}
  regexp: (\d+)

code: << CODE

  my %sums;
  my $s = 0;  
  for my $stream (@{streams_array()}) {
      for my $layer (@{$stream}){
        for my $captures @{$layer}) {
          for my $c (@{$captures}){
            $sums{$s} += $c;

  print sort values %sums; 


Read more about task checks in documentation/taskchecks.


METEN - is a Minimalistic Embedded Testing Engine. You can "embed" test into task source code and conditionally run them.

It's like task check but much simpler, and it's pure Perl6 rather than DSL:

cat test.pl6

self.stdout-ok("'foo: {self.task-config<foo>}'");

See documentation/m10.


Sparrow6 plugins are distributable tasks.

See documentation/plugins.


Sparrow6 repositories store distributable Sparrow6 tasks packaged as plugins.

See documentation/repository.


s6 is a command line client and plugin manager.

You use s6 to install, configure and run tasks as well as uploading tasks to repositories.

See documentation/s6.


Configuration management tool.

Visit Sparrowdo GH project for details.


Task runner and workflow management tool.

Visit Tomtit GH project for details.


Lightweight cron job runner.

Visit Sparky GH project for details.


Runs Sparrowdo configuration on Terraform instances.

Visit Sparrowform GH project for details.

Environment variables

See documentation/envvars.


See examples/ folder


Alexey Melezhik

Thanks to

God as the One Who inspires me in my life!

You can’t perform that action at this time.