Hawa Code provides a rich command-line interface supporting interactive sessions, configuration management, MCP server management, and more.
Basic Usage
hcode [prompt] [options] |
By default, launching without any subcommands enters interactive session mode.
Global Options
| Option | Description |
|---|---|
-c, --cwd <cwd> |
Set the current working directory |
-d, --debug |
Enable debug mode |
--verbose |
Enable verbose output mode |
-ea, --enable-architect |
Enable the Architect tool |
-p, --print |
Print response and exit (useful for pipes) |
--dangerously-skip-permissions |
Skip all permission checks (Docker containers with no internet only) |
-v, --version |
Show version number |
Examples
# Start interactive session |
Configuration Management (config)
Manage Hawa Code configuration items.
hcode config <subcommand> |
Subcommands
get <key>
Get a configuration value.
hcode config get theme |
Options:
-g, --global- Use global configuration
set <key> <value>
Set a configuration value.
hcode config set theme dark |
Options:
-g, --global- Use global configuration
remove <key>
Remove a configuration item.
hcode config remove theme |
Options:
-g, --global- Use global configuration
list
List all configuration values.
hcode config list |
Options:
-g, --global- Use global configuration
Approved Tools Management (approved-tools)
Manage the list of approved tools.
hcode approved-tools <subcommand> |
Subcommands
list
List all approved tools.
hcode approved-tools list |
remove <tool>
Remove a tool from the approved list.
hcode approved-tools remove BashTool |
MCP Server Management (mcp)
Configure and manage MCP (Model Context Protocol) servers.
hcode mcp <subcommand> |
Subcommands
serve
Start the Hawa Code MCP server.
hcode mcp serve |
add <name> <command> [args...]
Add a stdio-type MCP server.
# Add npx server |
Options:
-s, --scope <scope>- Configuration scope (project or global), default: project-e, --env <env...>- Set environment variables (e.g., -e KEY=value)
add-sse <name> <url>
Add an SSE-type MCP server (requires specific permissions).
hcode mcp add-sse my-server http://localhost:3000/sse |
Options:
-s, --scope <scope>- Configuration scope (project or global), default: project
remove <name>
Remove an MCP server.
hcode mcp remove my-server |
Options:
-s, --scope <scope>- Configuration scope (project, global, or mcprc), default: project
list
List all configured MCP servers.
hcode mcp list |
get <name>
Get detailed information about a specific MCP server.
hcode mcp get my-server |
reset-mcprc-choices
Reset all .mcp.json server approval/rejection states (requires specific permissions).
hcode mcp reset-mcprc-choices |
Update
Check for and install updates.
hcode update |
This command will:
- Check for the latest version
- Automatically download and install if a new version is available
- Display the update result