CLI

Hull CLI

Install the Hull CLI, run agents in your terminal, and automate tasks with hull run.

The Hull CLI (hull) runs Hull's agents in your terminal. It is the same agent runtime that powers Hull Desktop and the IDE extensions, so agents, skills, permissions and config behave the same way everywhere.

Use it to plan and make changes without leaving the terminal, review your work before you push, and run agents headlessly in scripts and CI.

Install

curl -fsSL https://withhull.com/cli/install | bash

The install script picks the right build for your machine, including a baseline build for older CPUs without AVX support.

Check that it worked:

hull --version

For other platforms and troubleshooting, see Install.

Update

hull upgrade

hull upgrade detects how you installed the CLI and updates it the same way. Pass a version to install a specific release, for example hull upgrade 0.1.4.

Start a session

Open a terminal in your project and run:

hull

This opens the interactive terminal UI (TUI). Type a task and press Enter. The first time you run it, use /connect to sign in to Hull Gateway or add your own provider keys.

Useful ways to start:

CommandWhat it does
hullStart the TUI in the current directory
hull path/to/projectStart the TUI in another directory
hull -cContinue the last session
hull -s <session-id>Continue a specific session
hull -c --forkContinue the last session as a new copy
hull --agent planStart with a specific agent
hull -m <provider/model>Start with a specific model
hull --worktree my-featureCreate or reuse a git worktree named my-feature and start there

Agents

Press Tab to cycle between primary agents, or use /agents to pick one.

AgentUse it to
codeWrite and change code. This is the default.
planPlan work. It can only edit plan files.
askGet answers and explanations without changing your code.
debugDiagnose and fix problems step by step.

You can add your own agents and subagents. See Custom agents and Subagents.

Slash commands

Type / in the prompt to see every available command, including your own commands and skills. The most useful built-in ones:

Sessions

CommandAliasesDescription
/sessions/resume, /continueSwitch to another session
/new/clearStart a new session
/renameRename the session
/timelineJump to a message
/forkFork the session from a message
/compact/summarizeSummarize the session to free up context
/undo / /redoUndo or redo the last message and its file changes
/copyCopy the latest response
/copy-sessionCopy the whole transcript
/exportExport the transcript
/share / /unshareShare or stop sharing the session
/thinking/toggle-thinkingShow or hide thinking blocks
/timestamps/toggle-timestampsShow or hide timestamps

Agents, models and tools

CommandAliasesDescription
/agentsSwitch agent
/modelsSwitch model
/variantsSwitch the model's reasoning effort
/mcpsTurn MCP servers on or off
/skillsBrowse available skills
/auto-approve/approve-allTurn auto-approve on or off
/goalKeep working toward a goal: /goal <objective>, or pause, resume, clear
/initCreate or update the project's AGENTS.md
/reviewReview your changes (see below)
/diffOpen the diff viewer
/workspaces/worktreesManage git worktrees

Account and system

CommandAliasesDescription
/connectSign in or add a provider
/profile/me, /whoamiShow your Hull account
/teams/team, /org, /orgsSwitch organization
/remoteLet Hull Cloud reach this session (see below)
/statusShow status
/themesSwitch theme
/reloadReload config, skills, agents and commands from disk
/editorWrite your prompt in an external editor
/helpShow help
/exit/quit, /qQuit

Press Ctrl+P to open the command palette for everything else, such as display toggles.

Review changes locally

Run /review to have Hull review your work before you push. The review is read-only: Hull reports findings and doesn't edit files until you ask it to fix them. With no arguments it reviews your uncommitted changes. You can name what to review:

CommandReviews
/review or /review uncommittedStaged, unstaged and untracked changes
/review stagedOnly staged changes
/review unpushedLocal commits not yet pushed
/review branch [base]The current branch against base, or the default branch
/review <commit hash>One commit
/review <PR URL or number>A GitHub pull request

Add guidance after the target, for example /review branch focus on error handling. Add quick or deep to change how thorough the review is.

For reviews on pull requests in GitHub or GitLab, see Code review.

Run headlessly with hull run

hull run sends one message, prints the result and exits. Use it in scripts, CI and other automation.

hull run "Add a unit test for the date parser"

By default, hull run can't ask you for approval. If the agent needs an action that your permissions set to ask, Hull rejects it and the run exits with an error. To let it work on its own, choose one of these:

FlagBehavior
--autoApprove every permission request from the session and its subagents. Use it in CI and other isolated environments.
--dangerously-skip-permissionsApprove requests that are not explicitly denied.

Rules set to deny are never approved by either flag. A safer approach is to allow exactly what the job needs in the project's hull.json.

Other useful flags: --agent, -m/--model, -f/--file to attach files, --command to run a slash command, -c or -s to continue a session, and --attach <url> to send the run to a server started with hull serve. See the CLI reference for the full list.

Example: GitHub Actions

- name: Run Hull
  run: hull run --auto "Update the changelog for this release"

JSON output

Use --format json when another program reads the output:

hull run --format json "Check the repository"

Hull writes one JSON object per line to standard output. Diagnostics stay on standard error. Every event has the same envelope:

{"schemaVersion":1,"type":"text","timestamp":1785686400000,"sessionID":"ses_example","part":{"type":"text","text":"Done"}}

Event types are tool_use, step_start, step_finish, text, reasoning and error.

  • Check schemaVersion before you process an event.
  • Hull may add fields or event types without changing the version, so ignore anything you don't recognize.
  • Removing or renaming a field, or changing its meaning or type, requires a new schema version.
  • Events arrive in stream order. timestamp is informational, not a unique ID.

Organizations

If you belong to a Hull organization, use /teams to choose which one your requests go through. Hull remembers your choice for later sessions, including hull run.

In CI and other non-interactive environments, set HULL_ORG_ID instead. It takes priority over the saved choice. hull run has no --org flag.

Remote control

Remote control lets you see and steer a local CLI session from Hull Cloud. You must be signed in to Hull.

  • Turn it on for the current session with /remote.
  • Turn it on for every session by adding "remote_control": true to your global hull.json.

While remote control is on, anyone signed in to your Hull account can send messages to this session on your computer.

Configuration

The CLI reads the same config as every other Hull surface:

ScopeLocation
Global~/.config/hull/hull.json or hull.jsonc
Projecthull.json or hull.jsonc in your project, or inside .hull/

Hull also reads opencode.json and opencode.jsonc in the same places, and the legacy .hullcode/ directory. It does not read .opencode/ directories. Project settings override global ones. Run hull debug config to see the merged result and hull config check to find mistakes.

{
  "$schema": "https://app.withhull.com/config.json",
  "permission": {
    "bash": { "*": "ask", "git status *": "allow" }
  }
}

Common keys include model, provider, mcp, permission, instructions, agent, command, formatter and lsp. See Settings for the full list, Permissions for approval rules and MCP in the CLI for MCP servers.

Project trust

Config in a repository can run code on your machine, for example through MCP servers, plugins or instructions. Hull doesn't load a project's hull.json, .hull/ directory, AGENTS.md or similar files until you trust the project. Hull asks the first time you open it. You can also decide from the terminal:

hull trust              # trust the current directory
hull trust --deny       # keep project config disabled
hull trust --remove     # forget the decision

Environment variables in config

Use {env:NAME} to read an environment variable in a config value:

{
  "provider": {
    "openai": { "options": { "apiKey": "{env:OPENAI_API_KEY}" } }
  }
}

{env:...} only works in trusted config: your global config, a file passed with HULL_CONFIG or HULL_CONFIG_CONTENT, or config managed by your organization. In a project's hull.json the reference is ignored and Hull logs a warning, so a repository can't send your secrets to a server it controls. {file:...} works in project config only for files inside the project.

Notifications and sounds

Attention alerts are off by default. Turn them on in hull console under Settings > CLI > Notifications, or in ~/.config/hull/tui.json (global) or .hull/tui.json (project):

{
  "attention": {
    "enabled": true,
    "notifications": true,
    "sound": true,
    "volume": 0.4
  }
}
  • enabled turns all alerts on or off.
  • notifications shows a desktop notification when the terminal isn't focused.
  • sound plays a sound. volume is a number from 0 to 1.

To use your own sounds, add file paths under attention.sounds with the keys default, question, permission, error, done or subagent_done. Relative paths are resolved from the folder that holds tui.json.

Telemetry

To turn off Hull's OpenTelemetry tracing, set:

{
  "experimental": { "openTelemetry": false }
}

Shift+Enter in Windows Terminal

Windows Terminal doesn't send Shift+Enter to programs by default. To insert a newline with Shift+Enter, open Windows Terminal's settings.json and add this to the actions array:

{
  "command": { "action": "sendInput", "input": "\u001b[13;2u" },
  "id": "User.sendInput.ShiftEnterCustom"
}

Then add this to the keybindings array:

{ "keys": "shift+enter", "id": "User.sendInput.ShiftEnterCustom" }

Restart Windows Terminal to apply the change.

Next steps

On this page