indra 0.1.13

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 ~/.indra/runtime

Finally, install Indra:

Linux / MacOS:

cd ~/.indra/runtime/bin


  • Create an environment variable INDRA_HOME = <path\to\indra>\bin
  • Add INDRA_HOME to your PATH environment variable

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.13

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 Apr 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health issues and suggestions

Document public APIs. (-0.21 points)

36 out of 37 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 bin/run.dart. (-3.45 points)

Analysis of bin/run.dart reported 7 hints, including:

line 8 col 11: Unnecessary new keyword.

line 9 col 14: Unnecessary new keyword.

line 10 col 13: Unnecessary new keyword.

line 11 col 12: Unnecessary new keyword.

line 16 col 12: Unnecessary new keyword.

Fix lib/src/util/string_pattern.dart. (-1.49 points)

Analysis of lib/src/util/string_pattern.dart reported 3 hints:

line 25 col 15: Unnecessary new keyword.

line 27 col 13: Unnecessary new keyword.

line 39 col 7: Unnecessary new keyword.

Fix bin/daemon.dart. (-0.50 points)

Analysis of bin/daemon.dart reported 1 hint:

line 6 col 3: Unnecessary new keyword.

Fix additional 20 files with analysis or formatting issues. (-1.50 points)

Additional issues in the following files:

  • lib/src/tasks/bitbucket.dart (1 hint)
  • lib/src/tasks/gcloud/container.dart (1 hint)
  • lib/src/tasks/gcloud/gcloud.dart (1 hint)
  • 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/task.dart (Run dartfmt to format lib/src/task.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/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+4
meta ^1.1.6 1.1.8
shelf ^0.7.3 0.7.5
webdriver ^2.1.1 2.1.2
yaml ^2.1.15 2.2.0
Transitive dependencies
archive 2.0.13
args 1.6.0
async 2.4.1
charcode 1.1.3
collection 1.14.12
convert 2.1.1
crypto 2.1.4
http_parser 3.1.4
matcher 0.12.6
path 1.6.4
pedantic 1.9.0
source_span 1.7.0
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.5
sync_http 0.2.0
term_glyph 1.1.0
typed_data 1.1.6