Getting Started

Quick Start Guide

Build your first hybrid infrastructure dependency graph with assets, models, compliance rules, and GraphQL queries.

Rescile Quick Start Guide

This guide will walk you through building a dependency graph of your infrastructure using rescile-ce.

We’ll start with a minimal “Hello, World” example and progressively build a more realistic model representing a hybrid environment with on-premise and cloud resources, including applying a compliance control.

Before You Begin

To follow this guide, you need the rescile-ce binary installed and accessible in your system’s PATH. You can verify the installation by running rescile-ce –version. See the Installation & Setup guide for detailed instructions. Download the latest version or run rescile-ce update.

For easy project based setup have a look into the bootstrap repository.

First, let’s create a project folder named my-infra-graph and the necessary subdirectories:

mkdir -p my-infra-graph/data/{assets,models,compliance,output}
cd my-infra-graph

All subsequent file paths in this guide will be relative to the my-infra-graph directory.


Step 1: The “Hello, World” Graph - Creating a Derived Resource

Goal: Model a single application and derive a server resource from it. This demonstrates the core workflow: Assets -> Models -> Compliance -> Output.

flowchart LR
    subgraph "Phase 1: Ground Truth"
        A["<div style='text-align:left; padding: 5px;'><i class='fa-solid fa-file-csv fa-fw'></i> <b>Assets</b><br>Define components<br>in CSV files.</div>"]
    end
    subgraph "Phase 2: Architecture"
        B["<div style='text-align:left; padding: 5px;'><i class='fa-solid fa-code fa-fw'></i> <b>Models</b><br>Transform assets<br>with TOML files.</div>"]
    end
    subgraph "Phase 3: Governance"
        C["<div style='text-align:left; padding: 5px;'><i class='fa-solid fa-shield fa-fw'></i> <b>Compliance</b><br>Enforce policies<br>with TOML files.</div>"]
    end
    subgraph "Phase 4: Output"
        R["<div style='text-align:left; padding: 5px;'><i class='fa-solid fa-file-invoice fa-fw'></i> <b>Output</b><br>Generate artifacts<br>with TOML files.</div>"]
    end
    subgraph "Phase 5: Actions"
        ACT["<div style='text-align:left; padding: 5px;'><i class='fa-solid fa-bolt fa-fw'></i> <b>Actions</b><br>Trigger tasks<br>via APIs/MCP.</div>"]
    end
    subgraph "Result"
        G["<div style='text-align:left; padding: 5px;'><i class='fa-solid fa-sitemap fa-fw'></i> <b>Queryable Graph</b><br>A model<br>of your estate.</div>"]
    end
    A -- "Provide Ground Truth" --> B -- "Define Architecture" --> C -- "Enforce Policy" --> R -- "Generate Artifacts" --> G
    G -. "Automate Operations" .-> ACT

1. Define the Foundational Asset

Assets are the ground truth of your environment. Create a CSV file to define a single application. The filename (application.csv) becomes the resource’s type, and the first column (name) is its primary key.

Verified examples: every CSV/TOML block in this guide is included directly from the tested fixture workspace examples/quickstart-step1 (and, from step 2 on, examples/quickstart). These are validated against rescile-ce on every change — run just verify locally.

data/assets/application.csv

name,owner,runtime
billing-api,team-alpha,java

2. Create an Architectural Model

Models transform assets into a richer graph. We will create a server.toml model that unconditionally creates one server resource for every application resource.

data/models/server.toml

# The origin resource type to read from (from application.csv).
origin_resource = "application"

# The [[create_resource]] block defines a rule for creating new resources.
# Since there is no 'match_on' key, this rule applies to every 'application' resource.
[[create_resource]]
# The type of the new resource.
resource_type = "server"
# The type of the new relation.
relation_type = "RUNS_ON"
# The primary key (name) for the new server.
# The template `{{origin_resource.name}}` accesses the 'name' property of the application.
name = "{{origin_resource.name}}_server"
# Define properties for the newly created server resource.
[create_resource.properties]
os = "Linux"
managed_by = "{{origin_resource.owner}}" # Inherit the owner from the application

3. Build and Verify the Graph

Now, run the rescile-ce command-line tool to process your assets and models and generate the graph.

# Start the server
rescile-ce --data-dir ./data serve

Open your browser to http://localhost:7600 and run the following query in the GraphiQL interface:

query VerifySimpleGraph {
  application(filter: {name: "billing-api"}) {
    name
    owner
    server {
      properties {
        relation
      }
      node {
        name
        os
        managed_by
      }
    }
  }
}
{
  "data": {
    "application": [
      {
        "name": "billing-api",
        "owner": "team-alpha",
        "server": [
          {
            "properties": {
              "relation": "RUNS_ON"
            },
            "node": {
              "name": "billing-api_server",
              "os": "Linux",
              "managed_by": "team-alpha"
            }
          }
        ]
      }
    ]
  }
}
  1. An application resource named billing-api.
  2. A server resource named billing-api_server with properties os="Linux" and managed_by="team-alpha".
  3. An relation type RUNS_ON connecting (application:billing-api) to (server:billing-api_server).
graph TD
    App["application<br><b>billing-api</b>"] -- RUNS_ON --> Server["server<br><b>billing-api_server</b><br>{os: Linux,<br>managed_by: team-alpha}"]

Before the start with step 2, we will save the current graph to compare at the end of the step.

rescile-ce --data-dir ./data save step1.json


Continue with Quickstart: Hybrid Model & Compliance — add conditional platform modeling, database assets, and your first compliance control.