Skip to content

comp register

NAME

phyware comp register — register the active PhyCloud tenant as a PhyComp tenant.

SYNOPSIS

phyware comp register [OPTIONS]

DESCRIPTION

Links a PhyCloud tenant to PhyComp, enabling compliance evaluation against the tenant's event data. Must be run once per tenant before using any comp commands.

OPTIONS

Flag Type Required Default Env
--url string No http://localhost:8001 PHYCOMP_URL
--api-key string No PHYCOMP_API_KEY
--output enum No table

| --tenant-id | string | No | (active) | — | | --phycloud-url | string | No | http://localhost:8000 | PHYCLOUD_URL | | --phycloud-api-key| string | No | — | PHYCLOUD_API_KEY |

ARGUMENTS

None.

INPUT

None.

OUTPUT

Field Type Description
tenant_id string PhyComp tenant ID
status string registered

EXIT CODES

Code Meaning
0 Success
1 Generic / connection error
2 Authentication / authorisation error
3 Resource not found
4 Validation error
5 Server-side error

EXAMPLES

# Register using env vars
phyware comp register

# Register a specific tenant
phyware comp register --tenant-id ten_abc123

# Register with explicit credentials
phyware comp register \
  --phycloud-url https://cloud.phyware.io \
  --phycloud-api-key phk_live_...

# Register and then load default rules
phyware comp register && phyware comp rules load-defaults

# Check registration status via violations list (should return empty)
phyware comp violations list --output json

AGENT NOTES

Run register exactly once per tenant. It is idempotent — re-running does not cause errors but does not change configuration. Follow with rules load-defaults to populate the rule set. Requires admin:tenants scope on the PhyComp service.

SEE ALSO

ERRORS

Code Message Remediation
CONFLICT Already registered No action needed
FORBIDDEN Insufficient scope Ensure admin:tenants
NOT_FOUND Tenant not found Create tenant first