# Using libraries

{% hint style="info" %}
If you haven't created a project yet, please follow [this tutorial](/getting-started/creating-a-new-project.md).
{% endhint %}

## Installing libraries

The library installation process is very simple. Open a terminal in the project's root directory and run this command:

```bash
CaffeineC lib info vyPal/cffc-std
```

You will see a banner similair to this one:

```
--------------------------------------------------
                  Package Details                 
--------------------------------------------------
Name        : std
Description : The CaffeineC standard library
Version     : 1.0.7
Main File   : src/main.cffc
Author      : vyPal
License     : GPL-3.0
--------------------------------------------------
```

This is the package details for the CaffeineCnec standard library.

You can install it and add it to your project by running this command:

```bash
CaffeineC install vyPal/cffc-std
```

## Using installed library

Congrats on installing the CaffeineC standard library! But for it to be useful, we have to use it in our program. Open the `main.cffc` file from the example project, and make these changes:

```diff
package main;

-extern func printf(format: *i8): void;
+import "vyPal/cffc-std/io";

func main(): i64 {
    printf("Hello, world!\n");
    return 0;
}
```

With this line you have imported the `io.cffc` file from the `vyPal/cffc-std` library. This file includes many other functions besides the `printf` function


---

# 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://c.vypal.me/getting-started/using-libraries.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.
