Install the tools
One command installs everything you need for your language: the ndsr runtime (prebuilt), the hivec
compiler where it is a binary, and necter-init, which creates a starter project. It runs on macOS
(Apple Silicon and Intel) and Linux (x86_64 and aarch64), needs no sudo, and verifies every download
against the release’s SHA256SUMS.
Install
Section titled “Install”curl -fsSL https://necter.network/install.sh | sh -s -- rustInstalls ndsr, hivec-rs and the hivec dispatcher. Needs cargo, rustup and the
wasm32-unknown-unknown target (prerequisites).
curl -fsSL https://necter.network/install.sh | sh -s -- goInstalls ndsr, hivec-go and the hivec dispatcher. Needs Go 1.21+ and TinyGo
(prerequisites).
curl -fsSL https://necter.network/install.sh | sh -s -- typescriptInstalls ndsr. The TypeScript SDK (with its hivec) is an npm package that each project adds as a dev
dependency; necter-init typescript sets that up. Needs Node.js 18+ and npm.
curl -fsSL https://necter.network/install.sh | sh -s -- javascriptInstalls ndsr. The JavaScript SDK (with its hivec) is an npm package that each project adds as a dev
dependency; necter-init javascript sets that up. Needs Node.js 18+ and npm.
curl -fsSL https://necter.network/install.sh | sh -s -- pythonInstalls ndsr. The Python SDK (with its hivec) is a wheel that each project installs into a virtual
environment; necter-init python writes the requirements.txt for it. Needs Python 3.10+.
curl -fsSL https://necter.network/install.sh | sh -s -- minerInstalls necter-miner, the command-line miner for servers, Linux and macOS. Then follow
Mine on a server. For the macOS desktop app use the desktop component (it downloads,
verifies and opens the disk image) or see Desktop app.
Then create and run your first module:
necter-init rust my_module && cd my_modulehivec build # -> dist/my_module.hbcndsr run dist/my_module.hbc addNumbers --input '{"a":2,"b":3}'necter-init go greeter && cd greetergo mod tidyhivec build . # -> dist/greeter.hbcndsr run dist/greeter.hbc addNumbers --input '{"a":2,"b":3}'necter-init typescript counter_ts && cd counter_tsnpm installnpx hivec build counter.ts # -> dist/counter.hbcndsr run dist/counter.hbc increment --input 5necter-init javascript counter_js && cd counter_jsnpm installnpx hivec build counter.js # -> dist/counter.hbcndsr run dist/counter.hbc increment --input '{"by":2}' --gas 10000000necter-init python counter_py && cd counter_pypython3 -m venv .venv && . .venv/bin/activate # Python 3.10+ (e.g. python3.12 if python3 is older)pip install -r requirements.txthivec build counter.py # -> dist/counter.hbcndsr run dist/counter.hbc increment --input '{"by":2}' --gas 50000000necter-miner --versionnecter-miner initnecter-miner join --project 0x<project_id> --payout 0x<your payout address>necter-miner statusThe quickstart walks through the same steps and goes on to deploy the module to the testnet.
What it installs
Section titled “What it installs”Everything goes under ~/.necter (change it with --dir). Binaries go to ~/.necter/bin:
| File | Installed with | What it is |
|---|---|---|
ndsr |
every SDK component, validator |
The NDSR runtime (Necter Distributed State Runtime): runs .hbc modules locally and runs nodes |
hivec-rs |
rust |
The Rust SDK’s compiler CLI |
hivec-go |
go |
The Go SDK’s compiler CLI |
hivec |
rust, go |
A small dispatcher: runs hivec-rs in a project with a Cargo.toml, hivec-go in one with a go.mod |
necter-init |
every SDK component | necter-init <rust|go|typescript|javascript|python> <dir> copies a starter template from ~/.necter/share/hivekit/templates and uses the directory name as the module name |
necter-miner |
miner |
The command-line miner |
The validator component also writes three files to ~/.necter/share/validator: ndsr.env.example (an
example configuration), ndsr.service (a systemd unit) and network.necter.ndsr.plist (a launchd agent).
It starts nothing. See Run a validator node.
TypeScript, JavaScript and Python have no global hivec: the SDK is a per-project package (an npm dev
dependency, or a wheel in a virtual environment) and its hivec runs as npx hivec or from the activated
virtual environment.
Add ~/.necter/bin to your PATH
Section titled “Add ~/.necter/bin to your PATH”If ~/.necter/bin is not on your PATH, the installer prints the line for your shell:
echo 'export PATH="$HOME/.necter/bin:$PATH"' >> ~/.zshrc && export PATH="$HOME/.necter/bin:$PATH"echo 'export PATH="$HOME/.necter/bin:$PATH"' >> ~/.bashrc && export PATH="$HOME/.necter/bin:$PATH"fish_add_path $HOME/.necter/binPrerequisites
Section titled “Prerequisites”The installer checks these and warns about anything missing; it does not fail and does not install them.
| Component | Needs |
|---|---|
rust |
cargo and rustup (rustup.rs), plus the wasm32-unknown-unknown target: rustup target add wasm32-unknown-unknown |
go |
Go 1.21+ (go.dev/dl) and TinyGo (tested with 0.42.0; install guide). Set $TINYGO to a tinygo binary that is not on your PATH |
typescript, javascript |
Node.js 18+ and npm |
python |
Python 3.10+. The installer looks for python3.14 down to python3.10, then python3, and prints which one to use for the virtual environment |
miner, desktop, validator |
nothing beyond curl |
Install Rust with rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shrustup target add wasm32-unknown-unknownInstall TinyGo on macOS with Homebrew:
brew tap tinygo-org/tools && brew install tinygoOptions
Section titled “Options”curl -fsSL https://necter.network/install.sh | sh -s -- [options] <component>...| Option | Effect |
|---|---|
--dir DIR |
Install under DIR instead of ~/.necter (binaries go to DIR/bin) |
--version |
Print the installer and release versions and the versions of the installed tools |
--uninstall |
Remove everything the installer put under the install directory |
--help |
Show the usage |
Components: rust, go, typescript, javascript, python, miner, desktop (macOS: downloads,
verifies and opens the Necter Miner disk image, saved to ~/Downloads), validator, and all (= rust go typescript javascript python miner). Give several at once, for example sh -s -- rust python.
Re-running the installer is safe: what is already installed is skipped. It detects macOS on arm64 or x86_64 (it prefers arm64 under Rosetta) and Linux on x86_64 or aarch64 (static binaries). Other systems are refused; on Windows, use WSL.
Manual install from the GitHub release
Section titled “Manual install from the GitHub release”All binaries are attached to the public HiveKit v1.0.0 release
(Apache-2.0). To install ndsr by hand, download the archive for your platform and SHA256SUMS, verify,
extract and put the binary on your PATH:
curl -fsSLO https://github.com/Necter-Network/hivekit/releases/download/v1.0.0/ndsr-1.0.0-aarch64-apple-darwin.tar.gzcurl -fsSLO https://github.com/Necter-Network/hivekit/releases/download/v1.0.0/SHA256SUMSshasum -a 256 -c SHA256SUMS --ignore-missing # Linux: sha256sum -c SHA256SUMS --ignore-missingtar -xzf ndsr-1.0.0-aarch64-apple-darwin.tar.gzmkdir -p ~/.necter/bininstall -m 0755 ndsr-1.0.0-aarch64-apple-darwin/ndsr ~/.necter/bin/ndsrRelease assets:
| Asset | Contents |
|---|---|
ndsr-1.0.0-<target>.tar.gz |
the ndsr runtime |
hivec-rs-1.0.0-<target>.tar.gz |
the Rust hivec |
hivec-go-1.0.0-<target>.tar.gz |
the Go hivec |
necter-hivekit-1.0.0.tgz |
npm package @necter/hivekit (TypeScript and JavaScript SDK) |
necter-hivejs-1.0.0.tgz |
npm package @necter/hivejs (client for calling deployed modules) |
necter_hivekit-1.0.0-py3-none-any.whl, necter_hivekit-1.0.0.tar.gz |
Python distribution necter-hivekit (import name hivekit) |
hivekit-templates-1.0.0.tar.gz |
the starter templates used by necter-init |
install.sh, SHA256SUMS |
the installer and the checksums of every asset |
<target> is one of aarch64-apple-darwin, x86_64-apple-darwin, x86_64-unknown-linux-musl or
aarch64-unknown-linux-musl. Each archive unpacks to a directory <name>-1.0.0-<target>/ holding the
binary.
The miner is released separately, in necter-releases:
necter-miner-1.0.1-<target>.tar.gz for the same four targets, the macOS desktop app and the Android app.
Package references
Section titled “Package references”The SDKs are referenced from GitHub, not from package registries. Publishing to crates.io, npm and PyPI is planned.
[lib]crate-type = ["cdylib", "rlib"]
[dependencies]hivekit = { git = "https://github.com/Necter-Network/hivekit", tag = "v1.0.0" }serde = { version = "1", features = ["derive"] }To build the Rust hivec from source instead of using the prebuilt one:
cargo install --git https://github.com/Necter-Network/hivekit --tag v1.0.0 hivekit --bin hivecimport hivekit "github.com/Necter-Network/hivekit/hivekit-go"The module path is case-sensitive: Necter-Network.
npm install --save-dev https://github.com/Necter-Network/hivekit/releases/download/v1.0.0/necter-hivekit-1.0.0.tgzThis adds @necter/hivekit and its npx hivec. Module sources keep import { hive, storage } from 'hivekit':
that import is provided inside the module by the HiveKit prelude.
npm install --save-dev https://github.com/Necter-Network/hivekit/releases/download/v1.0.0/necter-hivekit-1.0.0.tgzThis adds @necter/hivekit and its npx hivec. Module sources keep require('hivekit'): that import is
provided inside the module by the HiveKit prelude.
Inside a virtual environment:
pip install https://github.com/Necter-Network/hivekit/releases/download/v1.0.0/necter_hivekit-1.0.0-py3-none-any.whlOr as a line in requirements.txt:
necter-hivekit @ https://github.com/Necter-Network/hivekit/releases/download/v1.0.0/necter_hivekit-1.0.0-py3-none-any.whlThis installs the hivec command into the virtual environment. Import it as from hivekit import hive.
Calling modules from apps: @necter/hivejs
Section titled “Calling modules from apps: @necter/hivejs”@necter/hivejs is a dependency-free client for browsers and Node:
npm install https://github.com/Necter-Network/hivekit/releases/download/v1.0.0/necter-hivejs-1.0.0.tgzimport { Hive } from '@necter/hivejs'Usage: Upload and call a module.
Verify your install
Section titled “Verify your install”ndsr --version # ndsr 1.0.0hivec --version # hivec 1.0.0 (Rust) or hivec-go/1.0.0 (Go)necter-miner --versioncurl -fsSL https://necter.network/install.sh | sh -s -- --versionEvery hivec finds ndsr through $NDSR_BIN, then ndsr on your PATH.
Upgrade and uninstall
Section titled “Upgrade and uninstall”To upgrade, re-run the one-liner: a newer installer installs the newer release.
To uninstall:
curl -fsSL https://necter.network/install.sh | sh -s -- --uninstallThis removes only what the installer put in place. Miner data (keys, wallet, configuration) and node data directories are left untouched.
Troubleshooting
Section titled “Troubleshooting”| Problem | Fix |
|---|---|
command not found: ndsr (or hivec, necter-init, necter-miner) |
~/.necter/bin is not on your PATH; add it with the line for your shell and open a new terminal |
Rust build fails because the wasm32-unknown-unknown target is missing |
rustup target add wasm32-unknown-unknown |
Go: tinygo not found |
Install TinyGo (install guide) or set $TINYGO to its binary |
Python: the venv or pip install fails, or the installer says your python3 is too old |
Use a Python 3.10+ interpreter for the venv, for example python3.12 -m venv .venv |
"error": "out of gas" from ndsr run on a JavaScript or Python module |
ndsr run defaults to 1,000,000 gas; these engines need more, so pass --gas 10000000 (JavaScript) or --gas 50000000 (Python) |
unsupported OS |
The installer supports macOS and Linux. On Windows, run it inside WSL |
checksum mismatch for … |
The download was corrupted or interrupted: re-run the installer. If it keeps failing, do not use the file and report it on the HiveKit repository |
hivec run cannot find ndsr |
Put ndsr on your PATH or set NDSR_BIN=/path/to/ndsr |