---
title: thv-registry-api prime-db
hide_title: true
description: Reference for ToolHive Registry API CLI command `thv-registry-api prime-db`
last_update:
  author: autogenerated
slug: thv-registry-api_prime-db
mdx:
  format: md
---

## thv-registry-api prime-db

Prime the database with role and user

### Synopsis

Prime the database by creating the required role and user.

This command:
- Creates the role 'toolhive_registry_server' if it doesn't exist
- Creates a user (specified as positional argument) if it doesn't exist
- Grants the role to the user
- Reads the password from STDIN

The command uses the --config option to connect to the database.

```
thv-registry-api prime-db [username] [flags]
```

### Options

```
      --config string   Path to configuration file (YAML format, required)
      --dry-run         Print the SQL that would be executed to standard output
  -h, --help            help for prime-db
```

### Options inherited from parent commands

```
      --debug   Enable debug mode
```

### SEE ALSO

* [thv-registry-api](thv-registry-api.md)	 - ToolHive Registry API server

