---
title: "oz0 index add"
description: "Add a plugin index: https:// (or http://), or file:// in dev mode."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0/index/add"
---
# oz0 index add

> Add a plugin index: https:// (or http://), or file:// in dev mode.

For: Operators and developers looking up a command.

Add a plugin index: https:// (or `http://`), or file:// in dev mode. The URL may not carry a user name or password: every user of the cluster sees it. The server fetches it. Without --root-key it is not used yet: `index list` shows the fingerprint of the root key its copy names, which you compare with the one its publisher gives you, and then `index trust <name> --fingerprint <SHA256:...>` pins that key.

With --file instead of a URL, the index is imported: the server never fetches it, in any mode, and takes each new copy only from `index refresh <name> --file`, checking its signatures, expiry and version (an older copy is refused as a rollback) as for a fetched one; for clusters with no way out, such as one installing from an offline folder. Cluster admins may.

## Usage

```bash
oz0 index add <name> <url> | add <name> --file index.json [flags]
```

## Flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --allow-withdrawn
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      install withdrawn and quarantined versions with a warning, instead of refusing them
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --file
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      import the index from this copy of its signed index.json instead of a URL; it is never fetched
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --json
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      print JSON instead of a table
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --root-key
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the index's root key (Ed25519, base64), from its publisher: trusts the index at once
    </td>
  </tr>
</tbody>
</table>

## Inherited flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --context
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        $OZ0_CONTEXT or &lt;config dir>/orchestrator-zero/context.json
      </code>
    </td>
    
    <td>
      CLI context file written by server init
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --log-level
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        info
      </code>
    </td>
    
    <td>
      log level: debug, info, warn or error
    </td>
  </tr>
</tbody>
</table>

See [all `oz0` commands](https://docs.oz0.ai/reference/cli/oz0) and the [global flags](https://docs.oz0.ai/reference/cli/oz0#global-flags).


## Sitemap

See the full [sitemap](https://docs.oz0.ai/sitemap.md) for all pages.
