Host Commands (zeysdk host)
Manage ZeyOS instance configurations using the host command.
zeysdk host <command> [options]
Available Commands
| Command | Description |
|---|---|
list | List 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
| Command | Options | Description |
|---|---|---|
add | -u, --url <url> | Full URL for the host (required) |
-t, --token <token> | Authentication token | |
-y, --yes | Skip 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
| Error | Description | Resolution |
|---|---|---|
| Missing sync.json | No configuration | Initialize app first |
| Invalid token | Bad credentials | Update token |
| URL error | Invalid URL format | Check URL format |
| Host exists | Duplicate host | Update existing host |
| Not in app | Outside app directory | Navigate to app directory for link command |
| Write error | Cannot save config | Check permissions |
| Host not found | Invalid host name | Check host name |
| Network error | Connection failed | Check connectivity |
Notes
- The
linkcommand 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
| Option | Description | Default |
|---|---|---|
--list | List all configured hosts | false |
Actions
| Action | Description |
|---|---|
| Add | Create new host configuration |
| Update | Modify existing host settings |
| Delete | Remove host configuration |
| Link | Connect 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
| Error | Description | Resolution |
|---|---|---|
| Missing sync.json | No configuration | Initialize app first |
| Invalid token | Bad credentials | Update token |
| URL error | Invalid URL format | Check URL format |
| Host exists | Duplicate host | Update existing host |
| Not in app | Outside app directory | Navigate to app directory |
| Write error | Cannot save config | Check permissions |