Skip to main content

Host Commands (zeysdk host)

Manage ZeyOS instance configurations using the host command.

zeysdk host <command> [options]

Available Commands

CommandDescription
listList all configured hosts
add [hostName]Add a new host
update [hostName]Update existing host
remove [hostName]Remove host configuration
link [hostName]Link current app to host

Command Options

CommandOptionsDescription
add-u, --url <url>Full URL for the host (required)
-t, --token <token>Authentication token
-y, --yesSkip confirmation
update-u, --url <url>New URL for the host
-t, --token <token>New authentication token
link(none)Interactive only

Examples

# List all hosts
zeysdk host list
# Output: Configured hosts:
# - instance1 https://cloud.zeyos.com/instance1
# - instance2 https://cloud.zeyos.com/app2

# Add new host with options
zeysdk host add myinstance -u https://cloud.zeyos.com/app -t mytoken

# Add new host interactively
zeysdk host add
# Output: Enter the host name: myinstance
# Enter the URL: https://cloud.zeyos.com/app
# Enter the token: ****

# Update host with options
zeysdk host update myinstance --url https://cloud.zeyos.com/newapp

# Update host interactively
zeysdk host update
# Output: Select a host to update:
# > instance1
# > instance2

# Remove host
zeysdk host remove myinstance

Error Handling

ErrorDescriptionResolution
Missing sync.jsonNo configurationInitialize app first
Invalid tokenBad credentialsUpdate token
URL errorInvalid URL formatCheck URL format
Host existsDuplicate hostUpdate existing host
Not in appOutside app directoryNavigate to app directory for link command
Write errorCannot save configCheck permissions
Host not foundInvalid host nameCheck host name
Network errorConnection failedCheck connectivity

Notes

  • The link command is only available when inside a ZeyOS app directory
  • A complete URL must be provided when adding or updating hosts
  • Tokens are stored securely using system keychain

Manage ZeyOS instance configurations.

zeysdk hosts [options]

Options

OptionDescriptionDefault
--listList all configured hostsfalse

Actions

ActionDescription
AddCreate new host configuration
UpdateModify existing host settings
DeleteRemove host configuration
LinkConnect to existing host

Examples

# List all hosts
zeysdk hosts --list
# Output: Configured hosts:
# - instance1 https://custom.domain/app1
# - instance2

# Manage hosts interactively
zeysdk hosts
# Output: Choose an action:
# > Add new host
# > instance1 | https://custom.domain/app1
# > instance2

# Add new host
# Output: Enter the new host name: myinstance
# Enter the URL: https://custom.domain/app
# Enter the token: ****
# Host myinstance added successfully.

Error Handling

ErrorDescriptionResolution
Missing sync.jsonNo configurationInitialize app first
Invalid tokenBad credentialsUpdate token
URL errorInvalid URL formatCheck URL format
Host existsDuplicate hostUpdate existing host
Not in appOutside app directoryNavigate to app directory
Write errorCannot save configCheck permissions