Skip to main content

Connecting a HackerAI Agent to Your Local Machine

A simple guide for enabling local command execution from HackerAI.co

Updated yesterday

HackerAI lets you link your own machine or network to the web app through Agent Mode. After you connect, you can run commands on your device from HackerAI—useful for tooling you’ve installed locally, automation, and work against assets on your LAN.

This capability is available on all paid plans.


What the local client does

The HackerAI Local Sandbox Client (@hackerai/local) opens a secure connection between your computer and HackerAI. While it’s running, Agent Mode can:

  • Execute terminal commands on your computer in real time

  • Use your machine’s network visibility for scanning and testing (subject to your OS and permissions)

Commands run directly on your host OS—there is no container isolation layer in the current client.


1. Get Your Token

  1. Log in to HackerAI.

  2. Open Settings (from the sidebar or your account menu).

  3. Open the Agents tab.

  4. Click Generate Token or copy an existing token.

That token links this machine to your HackerAI account.


2. Install and Start the Local Agent

Quick Start (recommended)

npx @hackerai/local@latest --token YOUR_TOKEN

Or install globally:

npm install -g @hackerai/local

hackerai-local --token YOUR_TOKEN

3. Usage Examples

Basic Docker Mode (default)

npx @hackerai/local@latest --token hsb_abc123 --name "My Laptop"
  • --name is optional; if omitted, the client defaults to your hostname.


4. Options

Option

Description

--token TOKEN

Required authentication token

--name NAME

Name shown in HackerAI

--help, -h

Show help message


Security Overview

  • Commands run on your OS without isolation. Only run the client on machines you trust and control.

  • The client exits automatically after about 1 hour of inactivity (no commands), to reduce long-lived sessions.

Did this answer your question?