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 | bashThe install script picks the right build for your machine, including a baseline build for older CPUs without AVX support.
Check that it worked:
hull --versionFor other platforms and troubleshooting, see Install.
Update
hull upgradehull 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:
hullThis 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:
| Command | What it does |
|---|---|
hull | Start the TUI in the current directory |
hull path/to/project | Start the TUI in another directory |
hull -c | Continue the last session |
hull -s <session-id> | Continue a specific session |
hull -c --fork | Continue the last session as a new copy |
hull --agent plan | Start with a specific agent |
hull -m <provider/model> | Start with a specific model |
hull --worktree my-feature | Create 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.
| Agent | Use it to |
|---|---|
code | Write and change code. This is the default. |
plan | Plan work. It can only edit plan files. |
ask | Get answers and explanations without changing your code. |
debug | Diagnose 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
| Command | Aliases | Description |
|---|---|---|
/sessions | /resume, /continue | Switch to another session |
/new | /clear | Start a new session |
/rename | Rename the session | |
/timeline | Jump to a message | |
/fork | Fork the session from a message | |
/compact | /summarize | Summarize the session to free up context |
/undo / /redo | Undo or redo the last message and its file changes | |
/copy | Copy the latest response | |
/copy-session | Copy the whole transcript | |
/export | Export the transcript | |
/share / /unshare | Share or stop sharing the session | |
/thinking | /toggle-thinking | Show or hide thinking blocks |
/timestamps | /toggle-timestamps | Show or hide timestamps |
Agents, models and tools
| Command | Aliases | Description |
|---|---|---|
/agents | Switch agent | |
/models | Switch model | |
/variants | Switch the model's reasoning effort | |
/mcps | Turn MCP servers on or off | |
/skills | Browse available skills | |
/auto-approve | /approve-all | Turn auto-approve on or off |
/goal | Keep working toward a goal: /goal <objective>, or pause, resume, clear | |
/init | Create or update the project's AGENTS.md | |
/review | Review your changes (see below) | |
/diff | Open the diff viewer | |
/workspaces | /worktrees | Manage git worktrees |
Account and system
| Command | Aliases | Description |
|---|---|---|
/connect | Sign in or add a provider | |
/profile | /me, /whoami | Show your Hull account |
/teams | /team, /org, /orgs | Switch organization |
/remote | Let Hull Cloud reach this session (see below) | |
/status | Show status | |
/themes | Switch theme | |
/reload | Reload config, skills, agents and commands from disk | |
/editor | Write your prompt in an external editor | |
/help | Show help | |
/exit | /quit, /q | Quit |
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:
| Command | Reviews |
|---|---|
/review or /review uncommitted | Staged, unstaged and untracked changes |
/review staged | Only staged changes |
/review unpushed | Local 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:
| Flag | Behavior |
|---|---|
--auto | Approve every permission request from the session and its subagents. Use it in CI and other isolated environments. |
--dangerously-skip-permissions | Approve 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
schemaVersionbefore 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.
timestampis 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": trueto your globalhull.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:
| Scope | Location |
|---|---|
| Global | ~/.config/hull/hull.json or hull.jsonc |
| Project | hull.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 decisionEnvironment 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
}
}enabledturns all alerts on or off.notificationsshows a desktop notification when the terminal isn't focused.soundplays a sound.volumeis a number from0to1.
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.