MCPcopy Index your code
hub / github.com/cirocosta/cr

github.com/cirocosta/cr @0.0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.0.2 ↗ · + Follow
29 symbols 70 edges 11 files 16 documented · 55%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cr 📂

The concurrent runner

Overview

cr is a job executor concerned with achieving the highest parallel execution possible.

Given a definition of jobs and their dependencies, it builds a graph that outlines the execution plan of these jobs.

For instance, consider the following plan:

Jobs:
  - Id: 'SayFoo'
    Run: 'echo foo'

  - Id: 'SayBaz'
    Run: 'echo baz'
    DependsOn: [ 'SayFoo' ]

  - Id: 'SayCaz'
    Run: 'echo caz'
    DependsOn: [ 'SayFoo' ]

This plan states that we have 3 jobs to be executed: SayFoo, SayBaz and SayCaz but the last two jobs must only be executed after the first one and in case it succeeds.

To visualize the execution plan we can run it with --graph, which validates the plan and prints out a dot digraph.

# Execute CR telling it where the execution
# plan is (execution.yaml) and that it should
# just print the graph and exit.
cr --file ./execution.yaml  --graph

digraph {
    compound = "true"
    newrank = "true"
    subgraph "root" {
        "[root] SayFoo" -> "[root] SayBaz"
        "[root] SayFoo" -> "[root] SayCaz"
        "[root] _root" -> "[root] SayFoo"
    }
}

# If we pipe this to `dot` and than take the output
# of `dot` we can see the visual representation of the 
# digraph.

cr --file ./examples/hello-world.yaml --graph \
        | dot -Tpng > ./assets/hello-world.graph.png

Core symbols most depended-on inside this repo

must
called by 3
main.go
TemplateField
called by 3
lib/templater.go
Execute
called by 2
lib/executor.go
Run
called by 2
lib/execution.go
BuildDependencyGraph
called by 2
lib/graph.go
GetDotGraph
called by 1
lib/executor.go
RunJob
called by 1
lib/executor.go
CreateWalkFunc
called by 1
lib/executor.go

Shape

Method 10
Function 9
Struct 9
TypeAlias 1

Languages

Go100%

Modules by API surface

lib/executor.go7 symbols
lib/ui.go5 symbols
lib/types.go5 symbols
main.go4 symbols
lib/templater.go2 symbols
lib/execution.go2 symbols
lib/names.go1 symbols
lib/graph_test.go1 symbols
lib/graph.go1 symbols
lib/config.go1 symbols

For agents

$ claude mcp add cr \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact