Commands Cheatsheet
- CLI
- SDK
CLI commands
Before running any CLI commands, make sure that you install the CLI.configure
Run
harbor configure keys
to set up your credentials for usage with the CLI commands.apply
Run
harbor apply testnet-name
to spin up a testnet. This command will work when it is run in a directory that already contains a valid harbor.config.json
describe
Run
harbor describe testnet --name testnet_name
to give you Testnet information on the running actors and its endpoints. You can also output the Testnet information in a JSON format by adding an extra output
flag followed by the json
value: harbor describe testnet --name testnet-name --output json
list
Run
harbor list testnet
to return a list of Testnets in a project you configured via the project-key
.More commands
SDK snippets
Before running any of this, make sure that you properly set up your SDK to work with your projectapply
Applying your Testnet configuration to a Testnet is the quickest way of spinning up your Testnet through the SDK. To do this, run the following code in your SDK:
const testnet = await harbor.apply("/path/to/config", "testnet-name");
clone
Another way of creating a Testnet is through cloning. To clone a Testnet, a
src-testnet-name
must exist first:const testnet = await harbor.clone("src-testnet-name", "new-testnet-name");
testnet
A function that takes in the
testnetName
as a parameter. Returns a Testnet object:const information = await harbor.testnet("testnetName");
logs
Returns the logs of an actor in a Testnet in a certain time period. Requires the
Where
testnetId
, actorName
and timeInMins
:const log = await harbor.logs("testnetId", "actorName", timeInMins);
Where
timeInMins
is an integer.stop
Stops either an actor or a running Testnet, depending on the function signature. For stopping an actor:For stopping a running Testnet:
await harbor.stop("testnetName", "actorName");
await harbor.stop("testnetName");
start
Starts either a stopped actor or a stopped Testnet, depending on the function signature. For starting an actor:
For starting a Testnet:
const testnet = await harbor.start("testNetName", "actorName");
const testnet = await harbor.start("testNetName");