Skip to main content
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 Pre-build binaries are coming soon.

Installation

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

Initial Configuration

Cube requires the URL of your NIM instance before it can communicate with the API. Initialize your configuration:
You can verify your configuration at any time:

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:
Once configured, you can authenticate without providing credentials on every login.

Authentication

Login with a Service Account

Use the configured OpenID client credentials:
Or provide credentials explicitly:

Login with a User Account

For username/password authentication:

Logout

Clear the current authentication session:

Working with Resources

Cube exposes NIM resources through a consistent command structure.

Discover Available Resources

List all available resources:
Display information about a specific resource:

Entity Types

Entity types represent object definitions within NIM.

List Entity Types

Get an Entity Type

Retrieve a single entity type by its identifier:

Create an Entity Type

Update an Entity Type

Delete an Entity Type


Filtering and Queries

Filter results using a query expression:

JSON Output

Generate compact JSON output for scripting and automation:
Pipe results to other tools:

Reading Input from Standard Input

Cube can read request payloads directly from stdin. Create a resource using a JSON file:
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