Skip to main content
Version: Next

release-notes-v19

⬆️ Install or Upgrade

Follow the Flow CLI installation guide for instructions on how to install or upgrade the CLI.

⭐ Features

Project Deployment with Contract Initialization Arguments

Project deployment was improved, and it now supports providing initialization arguments during the deployment of contracts. It is easy to specify all the arguments in the configuration like so:


_17
// flow.json
_17
{
_17
// ...
_17
"deployments": {
_17
"testnet": {
_17
"my-testnet-account": [
_17
"NonFungibleToken", {
_17
"name": "Foo",
_17
"args": [
_17
{ "type": "String", "value": "Hello World" },
_17
{ "type": "UInt32", "value": "10" }
_17
]
_17
}]
_17
}
_17
}
_17
// ...
_17
}

Network Status Command

The network status command allows you to query the status of each network and see if the network is available.

Example:


_10
> flow status --network testnet
_10
_10
Status: 🟢 ONLINE
_10
Network: testnet
_10
Access Node: access.devnet.nodes.onflow.org:9000

Global Configuration

Flow CLI now supports global configuration which is a flow.json file saved in your home directory and loaded as the first configuration file wherever you execute the CLI command.

You can generate a global configuration using the --global flag.

Command example: flow init --global.

Global flow configuration is saved as:

  • macOS: ~/flow.json
  • Linux: ~/flow.json
  • Windows: C:\Users\$USER\flow.json

You can read more about it in the docs.

Environment File Support

The CLI will load environment variables defined in the .env file in the active directory, if one exists. These variables can be substituted inside the flow.json, just like any other environment variable.

Example .env file:


_10
PRIVATE_KEY=123


_11
// flow.json
_11
{
_11
// ...
_11
"accounts": {
_11
"my-testnet-account": {
_11
"address": "3ae53cb6e3f42a79",
_11
"keys": "${PRIVATE_KEY}"
_11
}
_11
}
_11
// ...
_11
}

🎉 Improvements

Default Network Without Configuration

Default network is provided even if no configuration is present which allows you to use the CLI on even more commands without the requirement of having a configuration pre-initialized.

Chain ID Removed

Chain ID property was removed from the configuration as it is not needed anymore. With this improvement, the new configuration is less complex and shorter.

Send Signed Progress

Send signed transaction now includes progress output the same way as sending transaction command does.

🐞 Bug Fixes

Keys Generate JSON output

Keys generation output in JSON format was fixed and it now shows correctly private and public keys.

Account Key Index When Sending Transactions

Account key index is now fetched from the configuration and it doesn't default to 0 anymore.

Transaction Boolean Argument

The transaction boolean argument wasn't parsed correctly when passed in comma split format.

JSON Outputs Fixes

JSON output format was not working properly for some commands.