@super-protocol/sp-cli
v0.0.6
Published
SuperProtocol Command line interface
Downloads
2,376
Maintainers
Keywords
Readme
sp-cli
=================
SuperProtocol Command line interface
Usage
$ npm install -g @super-protocol/sp-cli
$ sp COMMAND
running command...
$ sp (--version)
@super-protocol/sp-cli/0.0.6 linux-x64 node-v22.21.1
$ sp --help [COMMAND]
USAGE
$ sp COMMAND
...Commands
sp account get-sppisp account infosp auth loginsp auth mesp autocomplete [SHELL]sp configsp config add [FILE]sp config createsp config deletesp config listsp config showsp config usesp files download RESOURCEFILE LOCALDIRECTORYsp files upload PATHsp help [COMMAND]sp loginsp storage createsp storage selectsp storage showsp storage updatesp workflows extend-lease ORDERID
sp account get-sppi
Get SPPI (Super Protocol incentive tokens)
USAGE
$ sp account get-sppi [--json] [--config <value>]
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Get SPPI (Super Protocol incentive tokens)
EXAMPLES
$ sp account get-sppiSee code: src/commands/account/get-sppi.ts
sp account info
Information about current authorized user
USAGE
$ sp account info [--json] [--config <value>]
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Information about current authorized userSee code: src/commands/account/info.ts
sp auth login
Login to SuperProtocol (sign up or sign in).
USAGE
$ sp auth login [--json] [--config <value>]
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Login to SuperProtocol (sign up or sign in).
ALIASES
$ sp login
EXAMPLES
$ sp auth loginSee code: src/commands/auth/login.ts
sp auth me
USAGE
$ sp auth me [--json] [--config <value>]
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.See code: src/commands/auth/me.ts
sp autocomplete [SHELL]
Display autocomplete installation instructions.
USAGE
$ sp autocomplete [SHELL] [-r]
ARGUMENTS
[SHELL] (zsh|bash|powershell) Shell type
FLAGS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
DESCRIPTION
Display autocomplete installation instructions.
EXAMPLES
$ sp autocomplete
$ sp autocomplete bash
$ sp autocomplete zsh
$ sp autocomplete powershell
$ sp autocomplete --refresh-cacheSee code: @oclif/plugin-autocomplete
sp config
Manage configuration configs
USAGE
$ sp config [--json]
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Manage configuration configs
EXAMPLES
$ sp config show - Show current configuration details
$ sp config list - List all configurations
$ sp config use - Switch to a configuration
$ sp config create --name "My Config" - Create new configuration
$ sp config add ./config.json - Import configuration from file
$ sp config delete - Delete a configurationSee code: src/commands/config/index.ts
sp config add [FILE]
Import a configuration from a file
USAGE
$ sp config add [FILE] [--json] [-n <value>] [-y]
ARGUMENTS
[FILE] Configuration file path to import
FLAGS
-n, --name=<value> Custom name for the imported configuration
-y, --yes Automatically switch to imported configuration
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Import a configuration from a file
EXAMPLES
$ sp config add ./my-config.json
$ sp config add ./my-config.json --name "Imported"
Configuration files must follow this schema:
{
"providerUrl": "https://api.dp.superprotocol.com",
"name": "Some name",
"account": {
"address": "0x111222333444555....",
"privateKey": "0x000011122233344555..."
}
}See code: src/commands/config/add.ts
sp config create
Create a new configuration
USAGE
$ sp config create -n <value> [--json] [-u <value>] [-y]
FLAGS
-n, --name=<value> (required) Configuration name
-u, --url=<value> Provider base URL
-y, --yes Switch to new config
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Create a new configuration
EXAMPLES
$ sp config create --name "My Config"
$ sp config create --name "Production" --url "https://api.dp.superprotocol.com"See code: src/commands/config/create.ts
sp config delete
Delete a configuration file
USAGE
$ sp config delete [--json] [-f] [-n <value>]
FLAGS
-f, --force Force deletion without confirmation
-n, --name=<value> Configuration name to delete
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Delete a configuration file
EXAMPLES
$ sp config delete
$ sp config delete --name "My Config"
$ sp config delete --name "My Config" --forceSee code: src/commands/config/delete.ts
sp config list
List all configurations
USAGE
$ sp config list [--json]
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List all configurations
EXAMPLES
$ sp config listSee code: src/commands/config/list.ts
sp config show
Show current configuration
USAGE
$ sp config show [--json]
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Show current configuration
EXAMPLES
$ sp config showSee code: src/commands/config/show.ts
sp config use
Switch to a different configuration file
USAGE
$ sp config use [--json]
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Switch to a different configuration file
EXAMPLES
$ sp config useSee code: src/commands/config/use.ts
sp files download RESOURCEFILE LOCALDIRECTORY
Download file or directory described in resource file
USAGE
$ sp files download RESOURCEFILE LOCALDIRECTORY [--json] [--config <value>] [--maximum-concurrent <value>]
ARGUMENTS
RESOURCEFILE Path to a resource file
LOCALDIRECTORY Path to save downloaded file
FLAGS
--maximum-concurrent=<value> [default: 1] Maximum concurrent pieces to download at once per transfer
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Download file or directory described in resource file
EXAMPLES
$ sp files download ./resource.json ./pathToDownloadSee code: src/commands/files/download.ts
sp files upload PATH
Upload file or directory to remote storage
USAGE
$ sp files upload PATH [--json] [--config <value>] [--filename <value>] [--maximum-concurrent <value>]
[--metadata <value>] [--output <value>] [--skip-encryption] [--sync]
ARGUMENTS
PATH file or directory to upload
FLAGS
--filename=<value> The name of the resulting file/directory in the storage
--maximum-concurrent=<value> [default: 1] Maximum concurrent pieces to upload at once per transfer
--metadata=<value> Path to a metadata file for adding fields to the resource file
--output=<value> [default: resource.json] Path to save resource file that is used to access the uploaded
file
--skip-encryption Skip file encryption before upload
--sync Sync mode: delete files in target that don't exist in source
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Upload file or directory to remote storage
EXAMPLES
$ sp files upload ./file.txtSee code: src/commands/files/upload.ts
sp help [COMMAND]
Display help for sp.
USAGE
$ sp help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for sp.See code: @oclif/plugin-help
sp login
Login to SuperProtocol (sign up or sign in).
USAGE
$ sp login [--json] [--config <value>]
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Login to SuperProtocol (sign up or sign in).
ALIASES
$ sp login
EXAMPLES
$ sp loginsp storage create
Create a new storage entry from file or interactive prompts.
USAGE
$ sp storage create [--json] [--config <value>] [-f <value>] [--notDefault]
FLAGS
-f, --fromFile=<value> Path to a JSON file that contains AddStorageDto payload.
--notDefault Skip setting the created storage as default.
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Create a new storage entry from file or interactive prompts.
EXAMPLES
$ sp storage create
$ sp storage create --fromFile ./storage.json
$ sp storage create --not-defaultSee code: src/commands/storage/create.ts
sp storage select
Select a storage that will be used by subsequent commands.
USAGE
$ sp storage select [--json] [--config <value>]
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Select a storage that will be used by subsequent commands.
EXAMPLES
$ sp storage selectSee code: src/commands/storage/select.ts
sp storage show
Show current selected storage
USAGE
$ sp storage show [--json] [--config <value>]
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Show current selected storage
EXAMPLES
$ sp storage showSee code: src/commands/storage/show.ts
sp storage update
Update the configuration of an existing storage.
USAGE
$ sp storage update [--json] [--config <value>] [-f <value>] [-i <value>]
FLAGS
-f, --fromFile=<value> Path to a JSON file that contains UpdateStorageDto payload.
-i, --id=<value> Storage ID to update
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Update the configuration of an existing storage.
EXAMPLES
$ sp storage update --id=2de3e3a4-0000-1111-2222-333344445555 --fromFile ./storage-update.json
$ sp storage update --id=2de3e3a4-0000-1111-2222-333344445555See code: src/commands/storage/update.ts
sp workflows extend-lease ORDERID
Replenish deposit for a workflow to extend its lease time
USAGE
$ sp workflows extend-lease ORDERID [--json] [--config <value>] [--minutes <value>] [--sppi <value>] [-y]
ARGUMENTS
ORDERID Order ID
FLAGS
-y, --yes Skip confirmation prompt
--minutes=<value> Time to extend order in minutes (automatically calculates tokens)
--sppi=<value> SPPI token amount to add to the order
GLOBAL FLAGS
--config=<value> Specify config file.
--json Format output as json.
DESCRIPTION
Replenish deposit for a workflow to extend its lease time
EXAMPLES
$ sp workflows extend-lease <orderId> --sppi 1.5
$ sp workflows extend-lease <orderId> --minutes 120
$ sp workflows extend-lease <orderId> --sppi 2 --yesSee code: src/commands/workflows/extend-lease.ts
