indra 0.1.8

Indra, continuous integration and automation tool #

Indra allows you to define continuous integration and automation scripts as Dart code. Scripts can be ran from an IDE and debugged. Indra runs as a command line tool or as a daemon with a JSON API. Indra has a user interface that interacts with the daemon.

Installation #

First, install Dart.

Then, clone Indra from GitHub:

git clone

Finally, install Indra:


Now you can run any Indra script as

indra <script.dart> [param1=value [param2=value [...]]]

Or in case the file is named build.dart, simply

indra <[param1=value [param2=value [...]]]

Example #

Example script: reflective.dart

import 'dart:isolate';

import 'package:indra/src/cli.dart';
import 'package:indra/src/tasks/git.dart';
import 'package:indra/src/tasks/pub.dart';

main(List<String> args, SendPort outputPort) async {
  var params = setup(outputPort, args, defaultParams: {'branch': 'dev'});

  var git = new GitRepo('', branch: params['branch']);
  await git.cloneOrPull();
  await Pub.get();

To run the script

indra reflective.dart

Daemon #

Indra can also be ran as a daemon:

indra-daemon <working/dir>

Any Dart file under the working directory can be scheduled to run from the daemon by calling:

POST http://localhost:8080/jobs/<name of the file excluding .dart>/schedule

You can request which jobs are running by calling:

GET http://localhost:8080/jobs

You can request the output of a job by calling:

GET http://localhost:8080/jobs/<script name>/<sequence number>/output

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  indra: ^0.1.8

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:indra/indra.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21


Detected platforms: Flutter, other

Primary library: package:indra/indra.dart with components: io, isolate.

Health issues and suggestions

Document public APIs. (-0.17 points)

34 out of 35 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/task.dart. (-1 points)

Analysis of lib/src/task.dart reported 2 hints:

line 28 col 23: Use = to separate a named parameter from its default value.

line 29 col 20: Use = to separate a named parameter from its default value.

Fix lib/src/tasks/bitbucket.dart. (-0.50 points)

Analysis of lib/src/tasks/bitbucket.dart reported 1 hint:

line 21 col 94: Use = to separate a named parameter from its default value.

Fix lib/src/tasks/gcloud/gcloud.dart. (-0.50 points)

Analysis of lib/src/tasks/gcloud/gcloud.dart reported 1 hint:

line 23 col 59: Use = to separate a named parameter from its default value.

Fix additional 17 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/indra.dart (Run dartfmt to format lib/indra.dart.)
  • lib/src/cli.dart (Run dartfmt to format lib/src/cli.dart.)
  • lib/src/daemon/daemon.dart (Run dartfmt to format lib/src/daemon/daemon.dart.)
  • lib/src/daemon/job.dart (Run dartfmt to format lib/src/daemon/job.dart.)
  • lib/src/daemon/script.dart (Run dartfmt to format lib/src/daemon/script.dart.)
  • lib/src/daemon/worker.dart (Run dartfmt to format lib/src/daemon/worker.dart.)
  • lib/src/output/output.dart (Run dartfmt to format lib/src/output/output.dart.)
  • lib/src/output/text_output.dart (Run dartfmt to format lib/src/output/text_output.dart.)
  • lib/src/runner.dart (Run dartfmt to format lib/src/runner.dart.)
  • lib/src/tasks/gcloud/builds.dart (Run dartfmt to format lib/src/tasks/gcloud/builds.dart.)
  • lib/src/tasks/gcloud/config.dart (Run dartfmt to format lib/src/tasks/gcloud/config.dart.)
  • lib/src/tasks/gcloud/container.dart (Run dartfmt to format lib/src/tasks/gcloud/container.dart.)
  • lib/src/tasks/git.dart (Run dartfmt to format lib/src/tasks/git.dart.)
  • lib/src/tasks/jira.dart (Run dartfmt to format lib/src/tasks/jira.dart.)
  • lib/src/tasks/prompt.dart (Run dartfmt to format lib/src/tasks/prompt.dart.)
  • lib/src/tasks/yarn.dart (Run dartfmt to format lib/src/tasks/yarn.dart.)
  • lib/src/util/pattern_matcher.dart (Run dartfmt to format lib/src/util/pattern_matcher.dart.)

Maintenance issues and suggestions

Provide a file named (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The package description is too short. (-16 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and indra.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
ansicolor ^1.0.2 1.0.2
http ^0.12.0+2 0.12.0+2
meta ^1.1.6 1.1.7
shelf ^0.7.3 0.7.5
yaml ^2.1.15 2.2.0
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
path 1.6.4
pedantic 1.8.0+1
source_span 1.5.5
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6