@socketsupply/socket
Version:
A Cross-Platform, Native Runtime for Desktop and Mobile Apps — Create apps using HTML, CSS, and JavaScript. Written from the ground up to be small and maintainable.
187 lines (153 loc) • 6.15 kB
Markdown
<!-- This file is generated by bin/docs-generator/cli.js -->
<!-- Do not edit this file directly. -->
# Command Line interface
These commands are available from the command line interface (CLI).
## ssc
### Usage
```bash
ssc [SUBCOMMAND] [options] [<project-dir>]
ssc [SUBCOMMAND] -h
```
### subcommands
| Option | Description |
| --- | --- |
| build | build project |
| list-devices | get the list of connected devices |
| init | create a new project (in the current directory) |
| install-app | install app to the device |
| print-build-dir | print build path to stdout |
| run | run application |
| env | print relavent environment variables |
| setup | install build dependencies |
### general options
| Option | Description |
| --- | --- |
| -h, --help | print help message |
| --prefix | print install path |
| -v, --version | print program version |
## ssc build
Build Socket application.
### Usage
```bash
ssc build [options] [<project-dir>]
```
### options
| Option | Description |
| --- | --- |
| --platform=<platform> | platform target to build application for (defaults to host):<br>- android<br>- android-emulator<br>- ios<br>- ios-simulator |
| --port=<port> | load "index.html" from a specific port (if host is not specified, defaults to localhost) |
| --host=<host> | load "index.html" from a specific host (if port is not specified, defaults to 80) |
| --test[=path] | indicate test mode, optionally importing a test file relative to resource files |
| --headless | build application to run in headless mode (without frame or window) |
| --prod | build for production (disables debugging info, inspector, etc.) |
| -D, --debug | enable debug mode |
| -E, --env | add environment variables |
| -o, --only-build | only run build step, |
| -p, --package | package the app for distribution |
| -q, --quiet | hint for less log output |
| -r, --run | run after building |
| -V, --verbose | enable verbose output |
| -w, --watch | watch for changes to rerun build step |
### Linux options
| Option | Description |
| --- | --- |
| -f, --package-format=<format> | package a Linux application in a specified format for distribution:<br>- deb (default)<br>- zip |
### macOS options
| Option | Description |
| --- | --- |
| -c, --codesign | code sign application with 'codesign' |
| -n, --notarize | notarize application with 'notarytool' |
| -f, --package-format=<format> | package a macOS application in a specified format for distribution:<br>- zip (default)<br>- pkg |
### iOS options
| Option | Description |
| --- | --- |
| -c, --codesign | code sign application during xcoddbuild<br>(requires '[ios] provisioning_profile' in 'socket.ini') |
### Windows options
| Option | Description |
| --- | --- |
| -f, --package-format=<format> | package a Windows application in a specified format for distribution:<br>- appx (default) |
## ssc run
Run application.
### Usage
```bash
ssc run [options] [<project-dir>]
```
### options
| Option | Description |
| --- | --- |
| --headless | run application in headless mode (without frame or window) |
| --platform=<platform> | platform target to run application on (defaults to host):<br>- android<br>- android-emulator<br>- ios<br>- ios-simulator |
| --port=<port> | load "index.html" from a specific port (if host is not specified, defaults to localhost) |
| --host=<host> | load "index.html" from a specific host (if port is not specified, defaults to 80) |
| --prod | build for production (disables debugging info, inspector, etc.) |
| --test[=path] | indicate test mode, optionally importing a test file relative to resource files |
| -D, --debug | enable debug mode |
| -E, --env | add environment variables |
| -V, --verbose | enable verbose output |
## ssc list-devices
Get the list of connected devices.
### Usage
```bash
ssc list-devices [options] --platform=<platform>
```
### options
| Option | Description |
| --- | --- |
| --platform=<platform> | platform target to list devices for:<br>- android<br>- ios |
| --ecid | show device ECID (ios only) |
| --udid | show device UDID (ios only) |
| --only | only show ECID or UDID of the first device (ios only) |
## ssc init
Create a new project. If the path is not provided, the new project will be created in the current directory.
### Usage
```bash
ssc init [<project-dir>]
```
### options
| Option | Description |
| --- | --- |
| -C, --config | only create the config file |
| -n, --name | project name |
## ssc install-app
Install the app to the device or host target.
### Usage
```bash
ssc install-app [--platform=<platform>] [--device=<identifier>] [options]
```
### options
| Option | Description |
| --- | --- |
| -D, --debug | enable debug output |
| --device[=identifier] | identifier (ecid, ID) of the device to install to<br>if not specified, tries to run on the current device |
| --platform=<platform> | platform to install application to device (defaults to host)::<br>- android<br>- ios |
| --prod | install production application |
| -V, --verbose | enable verbose output |
### macOS options
| Option | Description |
| --- | --- |
| --target=<target> | installation target for macOS application (defaults to '/')<br>the application is installed into '$target/Applications' |
## ssc print-build-dir
Create a new project (in the current directory)
### Usage
```bash
ssc print-build-dir [--platform=<platform>] [--prod] [--root] [<project-dir>]
```
### options
| Option | Description |
| --- | --- |
| --platform | platform to print build directory for (defaults to host):<br>- android<br>- android-emulator<br>- ios<br>- ios-simulator |
| --prod | indicate production build directory |
| --root | print the root build directory |
## ssc setup
Setup build tools for host or target platform.
Platforms not listed below can be setup using instructions at https://socketsupply.co/guides
### Usage
```bash
ssc setup [options] --platform=<platform> [-y|--yes]
```
### options
| Option | Description |
| --- | --- |
| --platform=<platform> | platform target to run setup for (defaults to host):<br>- android<br>- ios |
| -q, --quiet | hint for less log output |
| -y, --yes | answer yes to any prompts |