An API, CLI and DSL for event generation & integration
Clone or download
atcol Service support (#7)
* Support parsing of Services; type tweaks

* Introduce Types module; clean-up

* Crude support for HTTP services

* Update

* Update

* Support headers and producers for HTTP

* Add bitcoin example; move to parent dir

* Add bitcoin example; move to parent dir

* Fix piping of input/output between actions/services

* Remove prints

* Tidying & simplification

* Rename HttpService so it's more generic
Latest commit a556bf2 Jan 19, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Service support (#7) Jan 19, 2019
examples Service support (#7) Jan 19, 2019
src Service support (#7) Jan 19, 2019
test Service support (#7) Jan 19, 2019
.travis.yml Operators (#5) Dec 28, 2018
LICENSE Update year Oct 6, 2018 Service support (#7) Jan 19, 2019
Setup.hs Initial commit Sep 17, 2017 Operators (#5) Dec 28, 2018
stack.yaml Operators (#5) Dec 28, 2018
weave.cabal Service support (#7) Jan 19, 2019

Build Status


A DSL for event generation and uniform integration.


weave is an experiment exploring the ideas of a rich event generation DSL combined with parameterising unpredictability for actions.


There are a number of ideas that are central to the design & philosophy of the API & tooling that Weave provides.

Concept Description
Actions the encapsulation of a side-effect
Temporal a parameter based on time
Spatial a parameter based on the environment
Frequency a multiplier
Integration drawing from and writing to various toolchains


The Schedule type represents time-based parameters. There are two constructors: Offset and Window.

Offset represents an offset from the point of calculation, e.g. +200ms.

Instant represents a specific point in time

Window represents a section of time.

In each case, the general idea is to effectively "describe" the boundaries for when to run a computation and the API uses this to (optionally: randomly) pick the execution point.


Weave supports defining events and their actions through a DSL.

The BNF can be see in the weave.bnf file, but generally the form for the DSL is:

<trigger> <action-list>

where trigger is the schedule or spatial specification, and action-list is a list of declared actions, an in-line action ({ ssh server -c "apt-get update" }) or a references to (un)declared actions ('blah | grep | tail -1) to execute, delimited by an operator.


The delimiter for the action list supports basic bash-like operators:

  • | - like bash's pipe operator
  • && - bitwise AND (not implemented yet)
  • || - bitwise OR (not implemented yet)
  • , - sequence, i.e. just run the commands in sequence


There are a number of examples defined in .weave files. See the examples folder.

Executing the chaos binary with the following flags and a file with the contents as follows weave --file apt-update.chaos:

every 6 hours {
  ssh my-server "apt-get update -y"

or through "declared actions":

shell AptUpgrade {
  apt-get update -y && apt-get upgrade -y

shell AutoClean {
  apt-get autoclean  

every 6 hours AptUpgrade, AutoClean


Once you've cloned, just run with stack:

stack install