Skip to main content

Prerequisites

Hedis requires three runtime dependencies:
  • Go 1.23 or higher
  • MongoDB — Stores function fingerprints and package metadata
  • Node.js — Required for JavaScript utilities (dependency resolution and package fetching)

Install Go

You need Go 1.23 or higher to build and run Hedis.
brew install go
Verify your installation:
go version
# Output: go version go1.23.0 ...

Install MongoDB

Hedis uses MongoDB to store function fingerprints and package metadata. You can run MongoDB locally or use a cloud instance.

Install Node.js

Node.js is required for the JavaScript utilities included with Hedis.
brew install node
Verify your installation:
node --version
# Output: v20.x.x

Build Hedis

Clone the repository and build the binary:
git clone https://github.com/yourusername/hedis.git
cd hedis/go/hermes-decompiler

# Build the binary
go build -o hermes-decompiler .
All Go commands must be run from the go/hermes-decompiler/ directory.
Verify the build:
./hermes-decompiler --help

Configure environment

Create a .env file in go/hermes-decompiler/ with your configuration:
.env
# MongoDB connection
MONGO_CONNECTION_STRING=mongodb://localhost:27017
MONGO_DB_NAME=hedis

# Hermes binary platform (osx-bin for macOS, linux64-bin for Linux)
OS_HERMES=osx-bin

# GitHub personal access token (required for security advisory API)
GITHUB_TOKEN=ghp_your_token_here
The .env file is automatically loaded via godotenv/autoload. Never commit this file to version control.

Environment variables

VariableDescriptionExample
MONGO_CONNECTION_STRINGMongoDB connection URImongodb://localhost:27017
MONGO_DB_NAMEDatabase namehedis (default)
OS_HERMESHermes binary platformosx-bin or linux64-bin
GITHUB_TOKENGitHub PAT for Security Advisory APIghp_...

Get a GitHub token

You need a GitHub personal access token to query the Security Advisory API:
  1. Go to github.com/settings/tokens
  2. Click “Generate new token (classic)”
  3. Select scopes: public_repo, read:packages
  4. Copy your token to the .env file

Database collections

Hedis creates three MongoDB collections:
CollectionPurpose
packagesnpm package metadata
hashes / hashes_ghsaFunction fingerprints per package per RN version
baselines_v3Empty RN app fingerprints (filters framework functions)
These collections are created automatically when you run the maintain-database command.

Verify installation

Test your setup by disassembling a sample .hbc file:
# Run a test command
./hermes-decompiler disassemble -i sample.hbc -o output.txt
If you see output without errors, your installation is complete!

Next steps

Quick start

Analyze your first React Native app

Commands

Learn about all available commands

Build docs developers (and LLMs) love