> For the complete documentation index, see [llms.txt](https://docs.computesdk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.computesdk.com/providers/neevcloud.md).

# NeevCloud

NeevCloud provider for ComputeSDK - run commands and manage files in secure cloud sandboxes with preview URLs.

[NeevCloud](https://neevcloud.com) provider for ComputeSDK - run commands and manage files in secure cloud sandboxes.

## Installation & Setup

```bash
npm install @computesdk/neevcloud
```

Add your NeevCloud credentials to a `.env` file:

```bash
NEEV_API_KEY=your_neev_api_key
NEEV_ORG_ID=your_neev_org_id
NEEV_PROJECT_ID=your_neev_project_id
```

## Usage

```typescript
import { neevcloud } from '@computesdk/neevcloud';

const compute = neevcloud({
  apiKey: process.env.NEEV_API_KEY,
  orgId: process.env.NEEV_ORG_ID,
  projectId: process.env.NEEV_PROJECT_ID,
});

// Create sandbox
const sandbox = await compute.instances.create();

// Run a command
const result = await sandbox.runCommand('echo "Hello from NeevCloud!"');
console.log(result.stdout); // "Hello from NeevCloud!"

// Clean up
await sandbox.destroy();
```

### Configuration Options

```typescript
interface NeevCloudConfig {
  /** NeevCloud API key - if not provided, will use NEEV_API_KEY env var */
  apiKey?: string;
  /** Org the sandboxes belong to - if not provided, will use NEEV_ORG_ID env var */
  orgId?: string;
  /** Project the sandboxes belong to - if not provided, will use NEEV_PROJECT_ID env var */
  projectId?: string;
  /** Request timeout in milliseconds */
  timeout?: number;
}
```

### Preview URLs

Expose any port over a public HTTPS URL:

```typescript
await sandbox.runCommand('python3 -m http.server 3000', { background: true });
const url = await sandbox.getUrl({ port: 3000 });
```

### Boot Source

Start from a catalogue template, a raw OCI image, or the platform default (`templateId` and `image` are mutually exclusive):

```typescript
await compute.instances.create({ templateId: 'sb-ubuntu-24-04-minimal' });
await compute.instances.create({ image: 'docker.io/library/python:3.12' });
```

### Sandbox Options

Set a name, env vars, size and lifetime at create. `cpu` is cores, `memory` is MB, and `timeout` is the sandbox's lifetime in milliseconds; it is deleted when that elapses.

```typescript
await compute.instances.create({
  name: 'build-42',
  envs: { NODE_ENV: 'production' },
  cpu: 2,
  memory: 4096,
  timeout: 30 * 60 * 1000,
});
```

### Snapshots

A snapshot saves a sandbox's memory and filesystem. `snapshot.create` resolves once it can be restored.

```typescript
const snapshot = await compute.snapshot.create(sandbox.instanceId, { name: 'after-install' });
const copy = await compute.instances.create({ snapshotId: snapshot.id });
await compute.snapshot.delete(snapshot.id);
```

### Templates

`template.list()` returns the sandbox template catalogue. The catalogue is managed by NeevCloud, so `template.create` and `template.delete` throw.

### Paths

A relative path is resolved from the workspace root (`/workspace`) and an absolute path is used as is, the same in `filesystem` calls and in `runCommand`.

### Streaming and Timeouts

`onStdout` / `onStderr` stream over the NeevCloud exec API, so no port inside the sandbox has to be reachable. A command that outruns its `timeout` returns exit code `124` with the output produced so far.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.computesdk.com/providers/neevcloud.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
