CLI

terminal
npm install -g @1sc-hq/1sc
1sc auth login

Open the authorization URL shown in the terminal and approve the device.

terminal
1sc deployments
1sc deployments show <deployment-id>
1sc deployments logs <deployment-id>
1sc deployments events <deployment-id>
1sc deployments stop <deployment-id>
1sc deployments destroy <deployment-id>
1sc deployments resume <deployment-id>
1sc attach run <deployment-id>
1sc verify <deployment-id>

Create from the CLI

terminal
npx @1sc-hq/1sc deploy --agent --cleanup stop

Agent mode generates a name, confirms the billable action, emits NDJSON progress, waits for readiness, and verifies hosted attach.

OptionRequiredDefault / optionsPurpose
--name <name>Required unless --agent is setAny deployment nameNames the deployment.
--agentOptionalFlagEnables JSON output, --yes, wait, hosted attach verification, and generated naming defaults.
--radio-source <cidr|auto>OptionalCIDR or autoRestricts N2/N3 access to the radio source. auto detects the caller's IPv4 /32.
--core <fivegc|free5gc|open5gs>Optionalfivegc, free5gc, open5gs; default fivegcSelects the hosted core implementation.
--verifyOptionalFlagWaits for readiness, then runs hosted attach verification.
--cleanup <keep|stop|destroy>Optionalkeep, stop, destroy; default keepKeeps, stops, or destroys the deployment after verification.
--timeout <duration>OptionalExample: 45m; default 30mSets the maximum wait time for readiness, attach verification, and cleanup.
--yesRequired unless --agent is setFlagConfirms the billable deployment action.
--api-url <url>OptionalURLOverrides the 1sc API URL.
--jsonOptionalFlagPrints JSON output.

API authentication

  • Create an API token with the required access bundle, then send it as a Bearer token in the Authorization header.

What you can automate

TaskMethodPath
List deploymentsGET/api/v1/deployments
Create a deploymentPOST/api/v1/deployments
Read deployment detailsGET/api/v1/deployments/:id
Read job eventsGET/api/v1/deployments/:id/events
Read logsGET/api/v1/deployments/:id/logs
Stop the corePOST/api/v1/deployments/:id/stop
Resume the corePOST/api/v1/deployments/:id/resume
Run hosted attach validationPOST/api/v1/deployments/:id/attach-tests

Errors use a stable code and descriptive message. Treat codes as machine-readable and messages as human-readable context.