hlbc-cli Crates.io

A CLI to navigate through Hashlink bytecode files. This is the command line interface for hlbc, the Hashlink bytecode disassembler, analyzer, decompiler and assembler.

This crate is a program, see hlbc for a library to use.

screenshot


Installation

Download a prebuilt binary from the releases page.

Or build from the latest version :

shell cargo install hlbc-cli

Or build the crate from the latest sources :

```shell git clone https://github.com/Gui-Yom/hlbc cd hlbc/hlbc-cli cargo build --release

The resulting binary can be found in hlbc/target/release

```

Usage

hlbc-cli <file> [-c <command>] [-w <command>]

You get access to a prompt where you can enter commands.

You can execute commands on startup with the -c switch. e.g. Dump all strings from the bytecode then exit : hlbc-cli main.hl -c "s ..; exit". If you omit the exit command, the app will simply launch the normal prompt after executing the startup commands.

With -w, the given command will execute each time the file changes. The cli won't show a command prompt.

You can also pass a .hx file containing Haxe source code directly to be compiled on the fly if the haxe compiler is present in the PATH.

Commands

Indexes

In most of the commands that accept an index, you can pass a Rust style range too : a..b, ..b, a.., a..=b, ... Where ..10 means 'select the first 10 items' and .. means 'display everything'.

Decompiler

More info about the decompiler here.

Changelog

See CHANGELOG.md.

Wiki

A wiki detailing the specifics of Hashlink bytecode is available here.

Planned features