In StarkNet v0.13.0, old command line interface will be removed, and you could use Starkli instead.
For full documentation, see the Starkli Book.
If you're on Linux/macOS/WSL, you can install
stakrliup by running the following command:
curl https://get.starkli.sh | sh
You might need to restart your shell session for the
starkliup command to become available. Once it's available, run the
Running the commands installs
starkli for you, and upgrades it to the latest release if it's already installed.
starkliup detects your device's platform and automatically downloads the right prebuilt binary. It also sets up shell completions. You might need to restart your shell session for the completions to start working.
Starkli is centric around JSON-RPC, and the JSON-RPC provider is considered canonical. Users are strongly recommended to use JSON-RPC. There are a few options to obtain access to a JSON-RPC endpoint:
Once you have a URL to a JSON-RPC endpoint, you can use it via the --rpc option for commands that expect it. For example:
starkli block-number --rpc http://localhost:9545/
Alternatively, you can set the STARKNET_RPC environment variable to make command invocations easier:
and then, simply run:
which is the same as the running with the --rpc option.
Starkli offers the following commands:
To check usage of each command, run with the --help option.