Skip to content

CLI command reference

Arguments, option defaults and help below come from current source. Run hr --help or command-specific --help on the installed version to compare the deployed interface. Commands execute on the machine running the CLI; remote use normally means SSH to that machine.

hr version

Source: hrcli/hrcli/cli.py, line 66

Show the CLI version.

Examples: hr version

hr pull

Source: hrcli/hrcli/cli.py, line 76

Pull all images for the configured stack.

Examples: hr pull

hr upgrade

Source: hrcli/hrcli/cli.py, line 133

Upgrade HR CLI from GitHub.

hr configure

Source: hrcli/hrcli/cli.py, line 199

Initialize CLI configuration.

hr start

Source: hrcli/hrcli/start_cli.py, line 579

Start the Hanson Robotics SDK services.

Examples: hr start hr start --launch main.yaml hr start --service webui hr start --head sophia

Declared arguments and Typer option contracts:

launch: Optional[str]=typer.Option(DEFAULT_LAUNCH_FILE, '--launch', '-f', help=f'Launch file name (default: {DEFAULT_LAUNCH_FILE})'), service: Optional[List[str]]=typer.Option(None, '--service', help='Individual service(s) to start (optional)'), env: Optional[List[str]]=typer.Option(None, '--env', help='Environment variable(s) to set'), stt: bool=typer.Option(False, '--stt', help='Enable Google Cloud Speech'), gui: bool=typer.Option(False, '--gui', help='Enable UI (for Blender)'), dev: bool=typer.Option(False, '--dev', help='Run in dev mode'), perception: Optional[bool]=typer.Option(None, '--perception/--no-perception', envvar=ENV_ENABLE_PERCEPTION, help='Start the CPU head-perception service with the main stack'), local_ip: Optional[str]=typer.Option(None, '--local-ip', help='IP address for the local machine'), master_ip: Optional[str]=typer.Option(None, '--master-ip', help='IP address for the ROS master'), head: Optional[str]=typer.Option(None, '--head', help='Name of the robot head'), body: Optional[str]=typer.Option(None, '--body', help='Name of the robot body'), project: Optional[str]=typer.Option(None, '--project', help=f'Project name (default: {DEFAULT_PROJECT_NAME})')

hr stop

Source: hrcli/hrcli/stop_cli.py, line 28

Stop the Hanson Robotics SDK services.

Examples: hr stop hr stop --launch main.yaml hr stop --service webui hr stop --volumes

Declared arguments and Typer option contracts:

launch: Optional[str]=typer.Option(DEFAULT_LAUNCH_FILE, '--launch', '-f', help=f'Launch file name (default: {DEFAULT_LAUNCH_FILE})'), service: Optional[List[str]]=typer.Option(None, '--service', help='Individual service(s) to stop (optional)'), project: Optional[str]=typer.Option(None, '--project', help=f'Project name (default: {DEFAULT_PROJECT_NAME})'), remove_volumes: bool=typer.Option(False, '--volumes', '-v', help='Remove named volumes declared in the compose file')

hr stack create

Source: hrcli/hrcli/stack_cli.py, line 341

Create a new stack manifest by specifying images and their tags

Declared arguments and Typer option contracts:

stack_version: str=typer.Argument(..., help='Name for the stack')

hr stack copy

Source: hrcli/hrcli/stack_cli.py, line 398

Create a new stack by copying an existing one and optionally updating image tags.

Examples: hr stack copy v1.0.0 v1.1.0

Declared arguments and Typer option contracts:

source_stack: str=typer.Argument(..., help='Source stack to copy from', autocompletion=complete_stack_versions), new_stack: str=typer.Argument(..., help='New stack name')

hr stack show

Source: hrcli/hrcli/stack_cli.py, line 565

Show details of a stack manifest.

Declared arguments and Typer option contracts:

stack_version: str=typer.Argument(..., help='Name of the stack to show', autocompletion=complete_stack_versions)

hr stack list

Source: hrcli/hrcli/stack_cli.py, line 590

List all available stack manifests (local and ECR)

hr stack pull

Source: hrcli/hrcli/stack_cli.py, line 731

Declared arguments and Typer option contracts:

stack_version: str=typer.Argument(..., help='Name of the stack to pull', autocompletion=complete_stack_versions)

hr stack publish

Source: hrcli/hrcli/stack_cli.py, line 742

Publish a stack manifest to ECR for global access.

Examples: hr stack publish v1.0.0

Declared arguments and Typer option contracts:

stack_version: str=typer.Argument(..., help='Name of the stack to publish', autocompletion=complete_stack_versions)

hr stack sync

Source: hrcli/hrcli/stack_cli.py, line 767

Synchronize local stack manifests with ECR.

hr stack edit

Source: hrcli/hrcli/stack_cli.py, line 874

Edit an existing stack manifest by adding, removing, or updating images.

Examples: hr stack edit v1.0.0

Declared arguments and Typer option contracts:

stack_version: str=typer.Argument(..., help='Stack to edit', autocompletion=complete_stack_versions)

hr stack delete

Source: hrcli/hrcli/stack_cli.py, line 1031

Delete a stack manifest from local cache and ECR.

Examples: hr stack delete v1.0.0

Declared arguments and Typer option contracts:

stack_version: str=typer.Argument(..., help='Name of the stack to delete (from local and ECR)', autocompletion=complete_stack_versions)

hr stack login

Source: hrcli/hrcli/stack_cli.py, line 1093

Login Docker into ECR.

Examples: hr stack login

hr stack create-repo

Source: hrcli/hrcli/stack_cli.py, line 1103

Create an ECR repository.

Examples: hr stack create-repo hansonrobotics/my-image

Declared arguments and Typer option contracts:

repository_name: str=typer.Argument(..., help='Name of the ECR repository to create')

hr servo ping

Source: hrcli/hrcli/servo_cli.py, line 84

Ping Feetech servos to discover connected motors.

Scans the specified ID range on all matching serial ports and reports which servo IDs respond.

Examples: hr servo ping hr servo ping --from-id 0 --to-id 50 hr servo ping --find-any hr servo ping --json hr servo ping --hardware-regex "1A86:7523"

Declared arguments and Typer option contracts:

hardware_regex: str=typer.Option(DEFAULT_HARDWARE_REGEX, help='Serial port filter for detecting boards (matched against /dev/serial/by-id entries).'), baud: int=typer.Option(DEFAULT_BAUD, help='Baudrate.'), from_id: int=typer.Option(0, help='Start servo ID for scanning.'), to_id: int=typer.Option(110, help='End servo ID for scanning.'), json: bool=typer.Option(False, help='Output as JSON.'), find_any: bool=typer.Option(False, help='Print first found motor ID and exit. Exit code 1 if none found.')

hr servo rw

Source: hrcli/hrcli/servo_cli.py, line 167

Read or write Feetech servo registers.

Can read/write individual registers by address, or perform predefined actions like resetting neutral position or changing servo ID.

Examples: hr servo rw --id 10 --addr 56 --length 2 hr servo rw --id 10 --addr 56 --length 2 --write 2048 hr servo rw --id 10 --action reset_neutral hr servo rw --id 10 --action id --write 20

Declared arguments and Typer option contracts:

id: int=typer.Option(..., help='Servo ID.'), hardware_regex: str=typer.Option(DEFAULT_HARDWARE_REGEX, help='Serial port filter for detecting boards.'), baud: int=typer.Option(DEFAULT_BAUD, help='Baudrate.'), protocol: int=typer.Option(DEFAULT_PROTOCOL, help='SCS Protocol.'), addr: Optional[int]=typer.Option(None, help='Register address to read/write.'), length: Optional[int]=typer.Option(None, help='Address length in bytes (1 or 2).', min=1, max=2), negative_bit: Optional[int]=typer.Option(None, help='Negative sign bit for this register.'), write: Optional[int]=typer.Option(None, help='Data to write in decimal format.'), action: Optional[str]=typer.Option(None, help="Predefined action: 'reset_neutral' or 'id'.")

hr servo detect

Source: hrcli/hrcli/servo_cli.py, line 332

Detect connected robot head hardware.

Detection sequence: 1. Scan /dev/serial/by-id for connected serial devices 2. Match devices against hardware.launch config files 3. Fall back to servo ping (IDs 200-240) to identify head 4. Report detected ROBOT_NAME

Examples: hr servo detect hr servo detect --config-path /path/to/hrsdk_configs

Declared arguments and Typer option contracts:

hardware_regex: str=typer.Option(DEFAULT_HARDWARE_REGEX, help='Serial port filter for detecting boards.'), baud: int=typer.Option(DEFAULT_BAUD, help='Baudrate.'), config_path: Optional[str]=typer.Option(None, help='Path to hrsdk_configs directory. Defaults to HR_CONFIG_STORAGE env var.')