> ## Documentation Index
> Fetch the complete documentation index at: https://0xcat.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

This guide walks you through installing Cube, configuring access to your NIM instance, authenticating, and performing common resource operations.

## Prerequisites

* A working installation of Rust and Cargo
* Access to a NIM instance
* Valid authentication credentials (user account or OpenID client)

For Rust installation instructions, see the official Rust website: [https://rust-lang.org/tools/install](https://rust-lang.org/tools/install)

Pre-build binaries are coming soon.

***

## Installation

Install the Cube CLI and MCP server directly from the Git repository using Cargo:

```shellscript theme={null}
cargo install --git https://github.com/Fastiraz/cube.git cube-cli
cargo install --git https://github.com/Fastiraz/cube.git cube-mcp
```

Verify the installation:

```shellscript theme={null}
cube --version
```

***

## Initial Configuration

Cube requires the URL of your NIM instance before it can communicate with the API.

Initialize your configuration:

```shellscript theme={null}
cube config init --base-url https://example.usercube.com
```

You can verify your configuration at any time:

```shellscript theme={null}
cube config show
```

***

## Configure Authentication

Cube supports both interactive user authentication and service account authentication.

### Service Account (OpenID Client Credentials)

This method is recommended for:

* Automation
* CI/CD pipelines
* Background services
* Scheduled jobs

Store your OpenID credentials locally:

```shellscript theme={null}
cube config set openid.client my-agent-client
cube config set openid.secret my-client-secret
```

Once configured, you can authenticate without providing credentials on every login.

***

## Authentication

### Login with a Service Account

Use the configured OpenID client credentials:

```shellscript theme={null}
cube login agent
```

Or provide credentials explicitly:

```shellscript theme={null}
cube login agent --client Job --secret secret
```

### Login with a User Account

For username/password authentication:

```shellscript theme={null}
cube login account --username Administrator --password secret
```

### Logout

Clear the current authentication session:

```shellscript theme={null}
cube login logout
```

***

## Working with Resources

Cube exposes NIM resources through a consistent command structure.

### Discover Available Resources

List all available resources:

```shellscript theme={null}
cube resources
```

Display information about a specific resource:

```shellscript theme={null}
cube resources Metadata
```

***

### Entity Types

Entity types represent object definitions within NIM.

#### List Entity Types

```shellscript theme={null}
cube entitytype list
```

#### Get an Entity Type

Retrieve a single entity type by its identifier:

```shellscript theme={null}
cube entitytype get 1337
```

#### Create an Entity Type

```shellscript theme={null}
cube entitytype create \
  -d '{
    "identifier": "Directory_Test",
    "displayName_L1": "Test"
  }'
```

#### Update an Entity Type

```shellscript theme={null}
cube entitytype update 1337 \
  -d '{
    "displayName_L1": "New Name"
  }'
```

#### Delete an Entity Type

```shellscript theme={null}
cube entitytype delete 1337
```

***

### Filtering and Queries

Filter results using a query expression:

```shellscript theme={null}
cube entitytype list --query "Identifier='Directory_User'"
```

***

### JSON Output

Generate compact JSON output for scripting and automation:

```shellscript theme={null}
cube --output compact entitytype list
```

Pipe results to other tools:

```shellscript theme={null}
cube --output compact entitytype list | jq '.[].Name'
```

***

### Reading Input from Standard Input

Cube can read request payloads directly from stdin.

Create a resource using a JSON file:

```shellscript theme={null}
cat payload.json | cube entitytype create -d -
```

This is particularly useful when generating payloads dynamically in shell scripts or CI/CD workflows.

***

### Next Steps

* Explore available resources with `cube resources`
* Inspect resource schemas and supported operations
* Integrate Cube into automation workflows and CI/CD pipelines
* Use the MCP server to connect Cube with AI assistants and external tools


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.