HackHub Scripting for VS Code
HackHub Scripting adds HackHub API support to Visual Studio Code for programs written in .hh files.
Install HackHub Scripting from the Visual Studio Marketplace
Features
- TypeScript syntax highlighting for
.hh files
- HackHub API IntelliSense and member completion
- Parameter and return-type information
- Hover documentation
- Top-level
await, matching the HackHub runtime
- Independent file checking, preventing variables in separate scripts from conflicting
- Local TypeScript import and export support
- Snippets for common HackHub scripting tasks
- No generated declaration files or workspace configuration
The bundled API includes globals and namespaces such as:
Shell
Shell.Process
Networking
Networking.Wifi
FileSystem
Crypto
HackDB
NTLM
Debug
Installation
Visual Studio Marketplace
Install the extension from the Visual Studio Marketplace, then reload Visual Studio Code.
Install from a VSIX
- Download the latest
.vsix release.
- Open the Extensions view in Visual Studio Code.
- Open the Views and More Actions menu.
- Select Install from VSIX....
- Select the downloaded package and reload Visual Studio Code.
Getting started
Create a file ending in .hh:
const target = await prompt("Target IP: ");
if (!Networking.IsIp(target)) {
throw "Invalid IP address";
}
const subnet = await Networking.GetSubnet(target);
println(subnet ? `Connected to ${subnet.ip}` : "Target unavailable");
HackHub programs can use top-level await without wrapping the program in an asynchronous function.
Snippets
| Prefix |
Description |
hh-start |
Prompt for a target and retrieve its subnet |
hh-exec |
Execute a shell command and read its output |
hh-ports |
Inspect every port on a subnet |
hh-lock |
Lock terminal input and guarantee that it is unlocked |
How it works
The extension packages its API declarations and TypeScript language-service integration internally. Opening a .hh file automatically provides HackHub types and runtime behavior inside the editor.
The extension does not create hackhub-api.d.ts, tsconfig.json, or other support files in your scripts folder. Virtual declarations used by Visual Studio Code are never added to the program sent to HackHub.
Each .hh file is checked as an independent program. A variable named target in one script will not conflict with a variable named target in another script.
Development
Install the dependencies:
npm install
Validate the JavaScript:
npm run check
Build an installable package:
npm run package
Additional development information is available in DEVELOPMENT.md.
API coverage
The declarations are based on the HackHub runtime reference verified on August 5, 2026. Some signatures were inferred from documented examples because the reference does not provide a machine-readable type specification.
If HackHub changes its API, the declarations may need to be updated.
License
This project is licensed under the MIT License included in LICENSE.
HackHub Scripting is a community-created development tool. It is not an official HackHub product unless explicitly stated otherwise by HackHub's developers.