Catalog npm
Back to packageRELEASE DETAILS

0.2.1

npm

0g-orbit

The developer toolkit for 0G. Store, infer, deploy — one SDK, one CLI, five minutes.

0gaiblockchaincliinferencesdkstoragedecentralizedfine-tuningweb3zero-gravity
Published5 Apr 2026
Direct dependencies9
Transitive dependenciesNot calculated

README

Current package documentation

0G Orbit

The developer toolkit for 0G. Store, infer, fine-tune — one SDK, one CLI, five minutes.

CI npm License: MIT Node.js

What is this?

0G Orbit wraps the 0G storage SDK, serving broker, and chain interactions into a single unified interface. Instead of juggling @0gfoundation/0g-ts-sdk, @0glabs/0g-serving-broker, and raw ethers calls, you get one Orbit class and one orbit CLI.

Storage — Upload and download files to 0G's decentralized storage network Inference — Run AI models on 0G's decentralized compute network Fine-Tuning — Upload datasets, create training tasks, download fine-tuned models

Install

npm install 0g-orbit

Quick Start

SDK

import { Orbit } from '0g-orbit'

const orbit = await Orbit.connect({
  network: 'testnet',
  privateKey: process.env.PRIVATE_KEY,
})

// Upload a file
const { root, txHash } = await orbit.store('./data.json')
console.log(`Stored: ${root}`)

// Download it back
await orbit.retrieve(root, './downloaded.json')

// Run AI inference
const response = await orbit.infer('meta-llama/Llama-3.2-3B-Instruct', {
  message: 'Explain zero-knowledge proofs in one sentence.',
})
console.log(response.content)

// Fine-tune a model
const dataset = await orbit.uploadDataset('./training-data.jsonl')
const task = await orbit.createFineTuneTask({
  model: 'base-model',
  dataset: dataset.root,
  providerAddress: '0x...',
})

CLI

# Set your private key
export PRIVATE_KEY=0x...

# Upload a file
orbit store ./my-file.txt

# Download a file
orbit retrieve <rootHash> ./output.txt

# Run inference
orbit infer meta-llama/Llama-3.2-3B-Instruct -m "Hello, 0G!"

# List available AI services
orbit services

# Fine-tune a model
orbit fine-tune ./dataset.jsonl --model base-model --provider 0x...

# Check account status
orbit status

API

Orbit.connect(config)

Creates a connected Orbit instance.

OptionTypeDescription
network'testnet' | 'mainnet'Network to connect to
privateKeystring?Wallet private key (falls back to PRIVATE_KEY env var)
rpcUrlstring?Custom RPC URL

Storage

MethodDescription
orbit.store(path, options?)Upload a file, returns { root, txHash }
orbit.storeData(text, options?)Upload a text string
orbit.retrieve(rootHash, outputPath, options?)Download a file by root hash

Inference

MethodDescription
orbit.infer(model, options)Run AI inference, returns { content, tokensUsed }
orbit.listServices()List available AI services on the network

Fine-Tuning

MethodDescription
orbit.uploadDataset(path)Upload a training dataset to storage
orbit.createFineTuneTask(options)Create a fine-tuning task
orbit.getFineTuneTask(provider, taskId)Check task status
orbit.downloadModel(provider, taskId, outputDir)Download a fine-tuned model
orbit.listModels()List available base models
orbit.listProviders()List fine-tuning providers

Direct Client Access

For advanced usage, access the underlying clients directly:

orbit.storage    // StorageClient
orbit.inference  // InferenceClient
orbit.fineTuning // FineTuningClient

Security

This package has transitive dependencies with known vulnerabilities (from upstream 0G SDKs). To mitigate, add this to your project's package.json:

{
  "overrides": {
    "axios": "1.14.0"
  }
}

See SECURITY.md for details.

Contributing

See CONTRIBUTING.md.

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 9

Native requirements
9 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
ora
Environment
{
  "local_name": "ora",
  "alias": false,
  "peer_metadata": null
}
^8.0.1runtime
chalk
Environment
{
  "local_name": "chalk",
  "alias": false,
  "peer_metadata": null
}
^5.3.0runtime
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
^6.13.1runtime
commander
Environment
{
  "local_name": "commander",
  "alias": false,
  "peer_metadata": null
}
^12.1.0runtime
@0gfoundation/0g-ts-sdk
Environment
{
  "local_name": "@0gfoundation/0g-ts-sdk",
  "alias": false,
  "peer_metadata": null
}
^1.0.1runtime
@0glabs/0g-serving-broker
Environment
{
  "local_name": "@0glabs/0g-serving-broker",
  "alias": false,
  "peer_metadata": null
}
^0.7.4runtime
vitest
Environment
{
  "local_name": "vitest",
  "alias": false,
  "peer_metadata": null
}
^1.6.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.4.0development
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
^20.12.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "8886ef504e815b035a6f889ccdfedfa937f33129",
  "tarball": "https://registry.npmjs.org/0g-orbit/-/0g-orbit-0.2.1.tgz",
  "fileCount": 116,
  "integrity": "sha512-S7bE0kwWAWovwt3TPH8weIHKQbEqUn2jB2+x4MH7TfQqpmNheCh3KSvRdG7REZ81TYd/l2hcZ3jXm9K+t0YNdA==",
  "signatures": [
    {
      "sig": "MEUCIBR8KI/umuk7dszcF2viZOJXbbVNHo+B8YIjPTZ0vn5GAiEAoG0wSCDVR3rbuN43Bho+l8ddVGiasO7C4+bronarN2k=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 307300
}

Repository

PENDING
cyber/0g-orbit

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:40 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:bf089983434f36d9097e1133ddab7429ebacb667da06c4dbd4e99ed0d01662a1

Other collected versions

0.2.35 Apr0.2.25 Apr0.2.04 Apr0.1.04 AprView all collected versions →