# Quickstart

### <i class="fa-screwdriver-wrench" style="color:$primary;">:screwdriver-wrench:</i>  Prerequisites&#x20;

| Tool                                                                                                          | Version                                                                                                  | Why                                                       |
| ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| Node.js  <i class="fa-node-js" style="color:$primary;">:node-js:</i>                                          | <mark style="color:$primary;">`>= 18`</mark>                                                             | Required by the <mark style="color:$primary;">SDK</mark>. |
| npm  <i class="fa-npm" style="color:$primary;">:npm:</i>                                                      | bundled with Node                                                                                        | Used for the example project.                             |
| <mark style="color:$primary;">PromptVault</mark> API key  <i class="fa-key" style="color:$primary;">:key:</i> | <mark style="color:$primary;">`pv_live_...`</mark> or <mark style="color:$primary;">`pv_test_...`</mark> | Lets your application read prompts.                       |

### 1. Create your first <mark style="color:$primary;">prompt</mark>

In the <mark style="color:$primary;">Dashboard</mark>:

1. Create a new <mark style="color:$primary;">**Folder**</mark> to group your prompts. \
   \&#xNAN;*\* You can name it <mark style="color:$primary;">general</mark> if you can't scope your prompt yet.*&#x20;

   <div align="left"><figure><img src="/files/mnTSwS1PI9wn50XnoPkQ" alt="" width="224"><figcaption></figcaption></figure></div>
2. Click <mark style="color:$primary;">**New prompt**</mark>.

   <div align="left"><figure><img src="/files/8eKVdaSRlfgTtGpEupeC" alt="" width="229"><figcaption></figcaption></figure></div>
3. Choose a <mark style="color:$primary;">slug</mark> (e.g. <mark style="color:$primary;">`support-triage`</mark>).

   <div align="left"><figure><img src="/files/UGx3TzHA14lSX4sDdb58" alt="" width="230"><figcaption></figcaption></figure></div>
4. Write the <mark style="color:$primary;">prompt</mark> body.\
   ![](/files/iSxTJy3P94SCsiogMlqZ)
5. Save it to <mark style="color:$primary;">**Live**</mark>.\
   ![](/files/4VHppM8V0kuHX5AFB1wi)
6. The saved <mark style="color:$primary;">version</mark> is updated.\
   ![](/files/Bv8HHkAMwuY1ZvKVQy3S)

### 2. Create an <mark style="color:$primary;">API key</mark>

1. Open <mark style="color:$primary;">**Settings**</mark>.

   <div align="left"><figure><img src="/files/GDtCTHPq4B2yrbfwprJy" alt="" width="227"><figcaption></figcaption></figure></div>
2. At <mark style="color:$primary;">API Keys</mark>: give new key name (e.g. <mark style="color:$primary;">`myapp-key`</mark>), choose <mark style="color:$primary;">`pv_live_`</mark> for <mark style="color:$primary;">**live prompts**</mark>, click <mark style="color:$primary;">**Create key**</mark>.

   <figure><img src="/files/erp3PfQ279tY9deKCbyd" alt=""><figcaption></figcaption></figure>
3. Copy the key when it is shown. The key will not be shown again

   <figure><img src="/files/YgOof0XWt9I8vRqIlHZR" alt=""><figcaption></figcaption></figure>

Store the key in your application environment (e.g. <mark style="color:$primary;">`.env.local`</mark>):

```bash
export PROMPTV_KEY="pv_live_..."
```

### 3. Install the SDK

```bash
npm install @promptv/sdk
```

### 4. Read a prompt from code

```ts
import { promptvault } from "@promptv/sdk";

const pv = promptvault({ key: process.env.PROMPTV_KEY! });

const prompt = await pv.get("support-triage");
console.log(prompt.version, prompt.source);
```

If you used a different slug, pass that slug to <mark style="color:$primary;">`pv.get(...)`</mark>.

### 5. Add variables <mark style="color:$primary;">(optional)</mark>

If your prompt includes variables (e.g. <mark style="color:$primary;">`{{recipient_name}}`</mark>), pass values at fetch time:

```ts
const prompt = await pv.get("onboarding-email", {
  variables: { recipient_name: "Maya" },
});
```

The <mark style="color:$primary;">SDK</mark> replaces both <mark style="color:$primary;">`{{name}}`</mark> and <mark style="color:$primary;">`{name}`</mark> tokens equally. See [<mark style="color:$primary;">**Variables**</mark>](/promptvault/documentation/dashboard/editor.md).

### Where to go next

* <mark style="color:$primary;">Dashboard tour</mark> - visual walkthrough of every screen.
* <mark style="color:$primary;">Concepts</mark> - workspaces, prompts, versions, environments.
* <mark style="color:$primary;">SDK reference</mark> - every method, option, and type.
* <mark style="color:$primary;">Integrations overview</mark> - connect prompt events to your existing tooling.


---

# 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://aiso.gitbook.io/promptvault/documentation/getting-started/quickstart.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.
