# @hiber3d/hdk-cli

> Hiber3D HDK's own CLI to perform various actions

Latest version **1.1.28** (published 2024-10-28) · See LICENSE.md license · 0 weekly downloads

## Install

```sh
npm install @hiber3d/hdk-cli
pnpm add @hiber3d/hdk-cli
yarn add @hiber3d/hdk-cli
bun add @hiber3d/hdk-cli
```

Provides the command `hdk`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.28 |
| Published | 2024-10-28 |
| First published | 2023-05-02 |
| Weekly downloads | 0 |
| License | See LICENSE.md |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=20.14.0 |
| Dependencies | 4 |
| Unpacked size | 587.3 KB |
| Known vulnerabilities | 0 (+20 in 1 direct dependencies) |
| Install scripts | no |
| Author | Hiber AB |
| Maintainers | hiberbot, wilhelmberggren, hiber-stefan |

## Links

- npm: https://www.npmjs.com/package/@hiber3d/hdk-cli
- Homepage: https://hiberworld.com/developer
- npm.io page: https://npm.io/package/@hiber3d/hdk-cli

## Dependencies (4)

- [vite](https://npm.io/package/vite.md) 5.1.7
- [node-gzip](https://npm.io/package/node-gzip.md) ^1.1.2
- [node-cache](https://npm.io/package/node-cache.md) ^5.1.2
- [@hiber3d/engine](https://npm.io/package/@hiber3d/engine.md) 1.78.0

## Recent versions

- 1.1.28 (latest) — 2024-10-28
- 1.1.27 — 2024-10-24
- 1.1.26 — 2024-10-21
- 1.1.25 — 2024-10-21
- 1.1.24 — 2024-10-04
- 1.1.23 — 2024-09-25
- 1.1.22 — 2024-09-19
- 1.1.21 — 2024-08-29
- 1.1.20 — 2024-08-28
- 1.1.19 — 2024-08-28
- 1.1.18 — 2024-08-27
- 1.1.17 — 2024-08-26
- 1.1.16 — 2024-08-15
- 1.1.15 — 2024-08-14
- 1.1.14 — 2024-08-14
- … 34 more at https://npm.io/package/@hiber3d/hdk-cli/versions

## README

# Hiber3D HDK CLI

Hiber3D HDK is a Typescript library for creating web-based 3D experiences. Powered by the lightweight Hiber engine it is compatible across all major mobile, tablet, and desktop browsers. It features built-in multiplayer, character controls, gameplay mechanics, customizable avatars and more, allowing you to create interactive 3D worlds rapidly.

The `hdk-cli` is used to perform actions like running a local dev server, and publishing worlds on hiberworld.com.

## Installation

Install with NPM:

```bash bash copy
npm i @hiber3d/hdk-cli
```

or with yarn:

```bash bash copy
yarn add @hiber3d/hdk-cli
```

## Commands

### `hdk dev``

This runs a local development server from the current directory. The server starts at the nearest available port from 5173 and upwards.
The development server looks for an `index.tsx` file or an `index.html`. If it finds an index.html file, it serves it as plain HTML, if it finds an index.tsx it wraps it in a Hiber3D canvas and calls the code it contains.
Optionally, the development server can be used to generate a scene.json after rendering the scene. That is necessary for publishing the world on hiberworld.com.
Usually, you will run this indirectly via a `yarn dev` or `npm dev`from within a project created with the `create-hiber-world`command.

### `hdk upload`

This command does the following:

1. Make sure we have a `DEVELOPER_TOKEN` set in `.env` (Prompts the user for one if missing)
2. Reads a `scene.json` that should contain the world json (Gives error if it doesn't exist)
3. Reads an `app.json` or a user chosen file name that should contain an id for an existing project on hiberworld
4. If no `app.json` is found, prompt the user for a project title and run an api call to `/project/codekit/create` to create a new project. Save the response id and title to `app.json`
5. Run an api call to `/project/{id-from-app.json}/save_v3` with the contents of `scene.json` to upload the world data.
6. Log the link to the world on hiberworld.com

## Usage

Please see the [Publishing Guide](https://developer.hiber3d.com/docs/getting-started/publishing) for examples of using HDK CLI to run and upload Hiber3D worlds.

## Documentation

See [Hiber3D HDK](https://developer.hiber3d.com/docs/)

---
_Source: https://npm.io/package/@hiber3d/hdk-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
