# compile

## Usage

`prism compile` is used to parse the `tasks.ref(...)` calls, construct the DAG, and generate the manifest.

```
 Usage: prism compile [OPTIONS]                                                                                                      
                                                                                                                                     
 Parse the tasks.ref(...) calls, construct the DAG, and generate the manifest.                                                       
                                                                                                                                     
 Examples:                                                                                                                           
                                                                                                                                     
  • prism compile                                                                                                                    
  • prism compile -l debug                                                                                                           
                                                                                                                                     
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --log-level  -l  [info|warn|error|debug]  Set the log level                                                                       │
│ --full-tb                                 Show the full traceback when an error occurs                                            │
│ --help                                    Show this message and exit.                                                             │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```

Here's what `prism compile` does under the hood.

1. Parses the tasks contained in the `modules/` folder for `tasks.ref(...)` calls.
2. It then takes these function calls and creates the dependency graph. You can visualize this graph using the [`prism graph`](https://docs.runprism.com/v0.2.2/cli/graph) command.
3. It stores the project metadata (e.g., the configuration, the `tasks.ref(...)` calls, the targets, and the [topological sort](https://en.wikipedia.org/wiki/Topological_sorting)) in a `manifest`.

## Example

Here's what the output will look like in Terminal:

```
$ prism compile
--------------------------------------------------------------------------------
<HH:MM:SS> | INFO  | Running with prism v0.2.2...
<HH:MM:SS> | INFO  | Found project directory at /Users/my_first_project
 
<HH:MM:SS> | INFO  | RUNNING EVENT 'task DAG'................................................................ [RUN]
<HH:MM:SS> | INFO  | FINISHED EVENT 'task DAG'............................................................... [DONE in 0.01s]
 
<HH:MM:SS> | INFO  | Done!
--------------------------------------------------------------------------------
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.runprism.com/v0.2.2/cli/compile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
