Develop

Platform SDK command-line interface

Updated: Sep 5, 2026
In addition to calling Platform SDK APIs, one can interact with the environment via a command-line interface (CLI). These CLI commands reduce friction when testing Platform SDK features on Meta Spatial Simulator.
The commands use adb to broadcast intents to a broadcast receiver running in Spatial Simulator.
The commands are formatted in the following manner:
adb shell am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND "<COMMAND_NAME>" --es PARAMS '<COMMAND_PARAMS>'
Note that certain commands expect JSON object strings in the parameters. To improve readability, variables can be used to store parameters in the suggested usage examples. See example:
PARAMS='{"sku": "<SKU>", "price":{"amount_in_hundredths": 350, "currency": "USD", "formatted": "$3.50"}, "name": "my_product", "type": "CONSUMABLE"}'
adb shell am broadcast -n horizon.platform.spatialsim/.CommandReceiver \
  --es COMMAND "iap.create_product" --es PARAMS "$PARAMS"
The result of each command is embedded in the Broadcast result data.
Example:
Broadcast completed: result=0, data="{"message":"Product created with sku: 123456789"}"
Errors are also embedded in the Broadcast result data:
Broadcast completed: result=0, data="{"error":"Failed to decode product: Field 'sku' is required for type with serial name 'horizon.platform.service.iap.transport.v1.Product', but it was missing at path: $"}"

Discover the commands your build offers

The command set is what your build registers, so read it from the build rather than from this page.
# List every registered provider
adb shell am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND "help"

# List the commands one provider offers
adb shell am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND "users.help"
Every provider answers <provider>.help. A command with no . in it routes to the common provider, so help and common.help reach the same place.

CLI commands

common.reset_data

Purpose: Resets the spatial simulator data catalog to default/original state
Parameters: N/A
Example usage:
adb shell "am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND \"common.reset_data\""

group_presence.join_intent_received

Purpose: Triggers event for GroupPresence.joinIntentReceived with parameters
Parameters: JSON object with deeplink message, destination API name, lobby session ID, and match session ID
Example usage:
adb shell "am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND \"group_presence.join_intent_received\" --es PARAMS '{\"deeplink_message\":\"destination3_deeplink_message\",\"destination_api_name\":\"destination3\",\"lobby_session_id\":\"7a8b-zv73\",\"match_session_id\":\"123\"}'"

application_lifecycle.launch_intent_changed

Purpose: Triggers event for ApplicationLifecycle.LaunchIntentChanged with parameters
Parameters: JSON object with deeplink message, destination API name, launch source, type, tracking ID, and users
Example usage:
adb shell "am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND \"application_lifecycle.launch_intent_changed\" --es PARAMS '{\"deeplink_message\":\"horizon://worlds/10235735230144318\",\"destination_api_name\":\"world_name\",\"launch_source\":\"DIRECT_DESTINATION\",\"type\":\"DEEPLINK\",\"tracking_id\":\"1010\",\"users\":[{\"id\":\"121212\",\"display_name\":\"Bobby\"}]}'"

group_presence.group_presence_get

Purpose: Get the group presence information for a given user. The group presence can be set using Platform SDK APIs, see Group Presence.
Note: group_presence.get appears in command help, but use group_presence.group_presence_get with the currently released simulator.
Parameters: User ID (string). If null, gets the group presence information for the default local test-data user.
Example usage:
# Get the default local test-data user's group presence
adb shell am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND "group_presence.group_presence_get"

# Get the group presence for a specific user ID
adb shell am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND "group_presence.group_presence_get" --es PARAMS "084275158957381"

users.create_user

Purpose: Creates a user.
Parameters: JSON object string with the following fields:
Field NameField TypeRequired
id
string
Yes
display_name
string
No
alias
string
No
managed_info
ManagedInfo
No
presence
string
No
presence_deeplink_message
string
No
presence_destination_api_name
string
No
presence_lobby_session_id
string
No
presence_match_session_id
string
No
presence_status
“ONLINE” / “OFFLINE” / “UNKNOWN”
No
profile_url
string
No
profile_url_small
string
No
Example usage:
adb shell "am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND \"users.create_user\" --es PARAMS '{\"id\":\"<USER_ID>\"}'"

iap.create_product

Purpose: Creates a new product
Parameters: JSON object string with the following fields:
Field NameField TypeRequired
sku
string
Yes
type
“DURABLE”, “CONSUMABLE”, “SUBSCRIPTION”
Yes
name
string
Yes
price
Price
Yes
cover_url
string
No
description
string
No
icon_url
string
No
short_description
string
No
billing_plans
BillingPlan[]
No
content_rating
ContentRating
No
Price:
Field NameField TypeRequired
amount_in_hundredths
Long
Yes
currency
string
Yes
formatted
string
Yes
Example usage:
PARAMS='{"sku": "<SKU>", "price":{"amount_in_hundredths": 350, "currency": "USD", "formatted": "$3.50"}, "name": "my_product", "type": "CONSUMABLE"}'
adb shell am broadcast -n horizon.platform.spatialsim/.CommandReceiver \
  --es COMMAND "iap.create_product" --es PARAMS "$PARAMS"

users.block_user

Purpose: Blocks a user given the “id” of the user and has to exist and not be blocked already
Parameters: User ID (string)
Example usage:
adb shell "am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND \"users.block_user\" --es PARAMS '<USER_ID>'"

users.unblock_user

Purpose: Unblocks a previously blocked user given the “id” of the user
Parameters: User ID (string)
Example usage:
adb shell "am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND \"users.unblock_user\" --es PARAMS '<USER_ID>'"

common.all_change_page_size_limit

Purpose: Changes all APIs page size limit
Parameters: Page size (int)
Example usage:
adb shell am broadcast -n horizon.platform.spatialsim/.CommandReceiver --es COMMAND "common.all_change_page_size_limit" --es PARAMS 10