CLI

CLI 0.1.5 is available from npm. Installation and command checks passed on macOS ARM64 and Linux ARM64. Windows has not been checked.

terminal
npm install -g @1sc-hq/1sc@0.1.5
1sc --version
1sc --help
1sc auth login --scopes deployments:read

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

terminal
1sc auth whoami --json
1sc deployments --json
1sc auth status --json

This login grants read access to deployment records. It does not grant permission to create, stop, resume, or destroy a core. Check the scopes in whoami before you run another action.

OptionValuePurpose
--scopesComma-separated permission namesRequests the permissions for this device login.
--jsonNo valuePrints structured command results. Device login prints progress as separate JSON lines.
--api-urlhttps://www.1sc.devSelects the API for the command. This is the production URL.

End CLI access

terminal
1sc auth logout

Logout removes the saved credential from this CLI configuration. It does not revoke the API token on the server. Revoke the token in API tokens to end its access.

Deployment commands

These commands use the permissions of the selected token. A read-only login cannot run the write actions.

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>

Check radio settings

Use a running deployment and its current radio package. Put the settings actually configured in your gNB, UE and site in radio-settings.json. Use the package to compare the expected values.

terminal
1sc deployments radio-package <deployment-id> --output radio.zip
1sc deployments radio-configuration-check <deployment-id> --input radio-settings.json --json

Replace every sample value below with your configured value. The downloaded radio-attach-kit.json identifies the deployment endpoints, PLMN, TAC, slice and DNN.

radio-settings.json
{
  "mcc": "208",
  "mnc": "93",
  "tac": 1,
  "sst": 1,
  "sd": "010203",
  "dnn": "internet",
  "amfN2": "core.example.invalid:38412",
  "upfN3": "core.example.invalid:2152",
  "radioSourceIp": "198.51.100.42"
}
FieldValueSource
mcc, mncStrings; preserve the digit countsThe PLMN configured in the gNB.
tac, sstNumbersThe gNB TAC and the gNB/UE slice SST.
sdSix hexadecimal digitsThe gNB/UE slice SD.
dnnStringThe UE DNN.
amfN2, upfN3Host and portThe AMF N2 destination and UPF N3 endpoint in the radio configuration.
radioSourceIpIPv4 addressThe site's public radio egress address.

For each mismatch, read checks[].correction. The report compares supplied settings with the deployment and returns liveRadioVerified: false. A live radio run needs separate packet evidence.

terminal
1sc deployments customer-radio-run-check <deployment-id> --input radio-run-result.json --json

For the default lab data network, use the result JSON from your radio kit. For a reported failure, read failureStage and failureReason. Customer-supplied results retain independentlyVerified: false; keep the captures and run evidence with the report.

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
Update deployment lifetimePATCH/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
Read operation statusGET/api/v1/operations/:id

Create, update, stop, resume, destroy, and attach responses include an operationId. Read that operation until its state is succeeded or failed. Errors use a stable code and descriptive message. Treat codes as machine-readable and messages as human-readable context.

Search commands, workflows, configuration, attach, API, and reports.