Skip to main content

Flow CLI Cheat sheet


_1492
_1492
------------
_1492
_1492
Usage:
_1492
flow [command]
_1492
_1492
👋 Welcome Flow developer!
_1492
If you are starting a new flow project use our super commands, start by running 'flow setup'.
_1492
_1492
🔥 Super Commands
_1492
dev Build your Flow project
_1492
generate Generate template files for common Cadence code
_1492
setup Start a new Flow project
_1492
_1492
📦 Flow Entities
_1492
accounts Create and retrieve accounts and deploy contracts
_1492
blocks Retrieve blocks
_1492
collections Retrieve collections
_1492
events Retrieve events
_1492
_1492
💬 Flow Interactions
_1492
scripts Execute Cadence scripts
_1492
transactions Build, sign, send and retrieve transactions
_1492
_1492
🔨 Flow Tools
_1492
cadence Execute Cadence code
_1492
dev-wallet Run a development wallet
_1492
emulator Run Flow network for development
_1492
flix execute, generate, package
_1492
flowser Run Flowser project explorer
_1492
test Run Cadence tests
_1492
_1492
🏄 Flow Project
_1492
deploy Deploy all project contracts
_1492
init Initialize a new configuration
_1492
project Manage your Cadence project
_1492
run Start emulator and deploy all project contracts
_1492
_1492
🔒 Flow Security
_1492
keys Generate and decode Flow keys
_1492
signatures Signature verification and creation
_1492
_1492
🔗 Dependency Manager
_1492
dependencies Manage contracts and dependencies
_1492
_1492
Additional Commands:
_1492
allHelp Outputs help for all the CLI commands
_1492
completion Generate the autocompletion script for the specified shell
_1492
config Utilities to manage configuration
_1492
help Help about any command
_1492
settings Manage persisted global settings
_1492
snapshot Retrieve the protocol state snapshot
_1492
status Display the status of the Flow network
_1492
version View version and commit information
_1492
_1492
Flags:
_1492
-f, --config-path strings Path to flow configuration file (default [/Users/tomhaile/flow.json,flow.json])
_1492
-x, --filter string Filter result values by property name
_1492
--format string Format result values (default "text")
_1492
--host string Flow Access API host address
_1492
-l, --log string Log level, options: "debug", "info", "error", "none" (default "info")
_1492
-n, --network string Network from configuration file (default "emulator")
_1492
--network-key string Flow Access API host network key for secure client connections
_1492
-o, --output string Output format, options: "text", "json", "inline" (default "text")
_1492
-s, --save string Save result to a filename
_1492
--skip-version-check Skip version check during start up
_1492
-y, --yes Approve any prompts
_1492
_1492
Use "flow [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Create and retrieve accounts and deploy contracts
_1492
_1492
Usage:
_1492
flow accounts [command]
_1492
_1492
Available Commands:
_1492
add-contract Deploy a new contract to an account
_1492
create Create a new account on network
_1492
fund Funds an account by address through the Testnet Faucet
_1492
get Gets an account by address
_1492
remove-contract Remove a contract deployed to an account
_1492
staking-info Get account staking info
_1492
update-contract Update a contract deployed to an account
_1492
_1492
Use "flow accounts [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Deploy a new contract to an account
_1492
_1492
Usage:
_1492
flow accounts add-contract <filename> <args> [flags]
_1492
_1492
Examples:
_1492
flow accounts add-contract ./FungibleToken.cdc helloArg
_1492
_1492
_1492
Flags:
_1492
--args-json string arguments in JSON-Cadence format
_1492
--include strings Fields to include in the output. Valid values: contracts.
_1492
--show-diff Shows diff between existing and new contracts on update
_1492
--signer string Account name from configuration used to sign the transaction (default "emulator-account")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Create a new account on network
_1492
_1492
Usage:
_1492
flow accounts create [flags]
_1492
_1492
Examples:
_1492
flow accounts create --key d651f1931a2...8745
_1492
_1492
_1492
Flags:
_1492
--hash-algo strings Hash used for the digest (default [SHA3_256])
_1492
--include strings Fields to include in the output
_1492
--key strings Public keys to attach to account
_1492
--key-weight ints Weight for the key
_1492
--sig-algo strings Signature algorithm used to generate the keys (default [ECDSA_P256])
_1492
--signer string Account name from configuration used to sign the transaction (default "emulator-account")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Funds an account by address through the Testnet Faucet
_1492
_1492
Usage:
_1492
flow accounts fund <address> [flags]
_1492
_1492
Examples:
_1492
flow accounts fund 8e94eaa81771313a
_1492
_1492
_1492
Flags:
_1492
--include strings Fields to include in the output. Valid values: contracts.
_1492
_1492
_1492
_1492
------------
_1492
_1492
Gets an account by address
_1492
_1492
Usage:
_1492
flow accounts get <address> [flags]
_1492
_1492
Examples:
_1492
flow accounts get f8d6e0586b0a20c7
_1492
_1492
_1492
Flags:
_1492
--include strings Fields to include in the output. Valid values: contracts.
_1492
_1492
_1492
_1492
------------
_1492
_1492
Remove a contract deployed to an account
_1492
_1492
Usage:
_1492
flow accounts remove-contract <name> [flags]
_1492
_1492
Examples:
_1492
flow accounts remove-contract FungibleToken
_1492
_1492
_1492
Flags:
_1492
--include strings Fields to include in the output. Valid values: contracts.
_1492
--network string Network name from configuration to use
_1492
--signer string Account name from configuration used to sign the transaction (default "emulator-account")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Get account staking info
_1492
_1492
Usage:
_1492
flow accounts staking-info <address> [flags]
_1492
_1492
Examples:
_1492
flow accounts staking-info f8d6e0586b0a20c7
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Update a contract deployed to an account
_1492
_1492
Usage:
_1492
flow accounts update-contract <filename> <args> [flags]
_1492
_1492
Examples:
_1492
flow accounts update-contract ./FungibleToken.cdc helloArg
_1492
_1492
_1492
Flags:
_1492
--args-json string arguments in JSON-Cadence format
_1492
--include strings Fields to include in the output. Valid values: contracts.
_1492
--show-diff Shows diff between existing and new contracts on update
_1492
--signer string Account name from configuration used to sign the transaction (default "emulator-account")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Outputs help for all the CLI commands
_1492
_1492
Usage:
_1492
flow allHelp [flags]
_1492
_1492
Examples:
_1492
flow cheat sheet
_1492
_1492
_1492
Flags:
_1492
-h, --help help for allHelp
_1492
_1492
_1492
_1492
------------
_1492
_1492
Retrieve blocks
_1492
_1492
Usage:
_1492
flow blocks [command]
_1492
_1492
Available Commands:
_1492
get Get block info
_1492
_1492
Use "flow blocks [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Get block info
_1492
_1492
Usage:
_1492
flow blocks get <block_id|latest|block_height> [flags]
_1492
_1492
Examples:
_1492
flow blocks get latest --network testnet
_1492
_1492
_1492
Flags:
_1492
--events string List events of this type for the block
_1492
--include strings Fields to include in the output. Valid values: transactions.
_1492
_1492
_1492
_1492
------------
_1492
_1492
Execute Cadence code
_1492
_1492
Usage:
_1492
flow cadence [flags]
_1492
flow cadence [command]
_1492
_1492
Available Commands:
_1492
language-server Start the Cadence language server
_1492
_1492
Use "flow cadence [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Start the Cadence language server
_1492
_1492
Usage:
_1492
flow cadence language-server [flags]
_1492
_1492
_1492
Flags:
_1492
--enable-flow-client Enable Flow client functionality (default true)
_1492
_1492
_1492
_1492
------------
_1492
_1492
Retrieve collections
_1492
_1492
Usage:
_1492
flow collections [command]
_1492
_1492
Available Commands:
_1492
get Get collection info
_1492
_1492
Use "flow collections [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Get collection info
_1492
_1492
Usage:
_1492
flow collections get <collection_id> [flags]
_1492
_1492
Examples:
_1492
flow collections get 270d...9c31e
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Generate the autocompletion script for flow for the specified shell.
_1492
See each sub-command's help for details on how to use the generated script.
_1492
_1492
Usage:
_1492
flow completion [command]
_1492
_1492
Available Commands:
_1492
bash Generate the autocompletion script for bash
_1492
fish Generate the autocompletion script for fish
_1492
powershell Generate the autocompletion script for powershell
_1492
zsh Generate the autocompletion script for zsh
_1492
_1492
Use "flow completion [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Generate the autocompletion script for the bash shell.
_1492
_1492
This script depends on the 'bash-completion' package.
_1492
If it is not installed already, you can install it via your OS's package manager.
_1492
_1492
To load completions in your current shell session:
_1492
_1492
source <(flow completion bash)
_1492
_1492
To load completions for every new session, execute once:
_1492
_1492
#### Linux:
_1492
_1492
flow completion bash > /etc/bash_completion.d/flow
_1492
_1492
#### macOS:
_1492
_1492
flow completion bash > $(brew --prefix)/etc/bash_completion.d/flow
_1492
_1492
You will need to start a new shell for this setup to take effect.
_1492
_1492
Usage:
_1492
flow completion bash
_1492
_1492
_1492
Flags:
_1492
--no-descriptions disable completion descriptions
_1492
_1492
_1492
_1492
------------
_1492
_1492
Generate the autocompletion script for the fish shell.
_1492
_1492
To load completions in your current shell session:
_1492
_1492
flow completion fish | source
_1492
_1492
To load completions for every new session, execute once:
_1492
_1492
flow completion fish > ~/.config/fish/completions/flow.fish
_1492
_1492
You will need to start a new shell for this setup to take effect.
_1492
_1492
Usage:
_1492
flow completion fish [flags]
_1492
_1492
_1492
Flags:
_1492
--no-descriptions disable completion descriptions
_1492
_1492
_1492
_1492
------------
_1492
_1492
Generate the autocompletion script for powershell.
_1492
_1492
To load completions in your current shell session:
_1492
_1492
flow completion powershell | Out-String | Invoke-Expression
_1492
_1492
To load completions for every new session, add the output of the above command
_1492
to your powershell profile.
_1492
_1492
Usage:
_1492
flow completion powershell [flags]
_1492
_1492
_1492
Flags:
_1492
--no-descriptions disable completion descriptions
_1492
_1492
_1492
_1492
------------
_1492
_1492
Generate the autocompletion script for the zsh shell.
_1492
_1492
If shell completion is not already enabled in your environment you will need
_1492
to enable it. You can execute the following once:
_1492
_1492
echo "autoload -U compinit; compinit" >> ~/.zshrc
_1492
_1492
To load completions in your current shell session:
_1492
_1492
source <(flow completion zsh)
_1492
_1492
To load completions for every new session, execute once:
_1492
_1492
#### Linux:
_1492
_1492
flow completion zsh > "${fpath[1]}/_flow"
_1492
_1492
#### macOS:
_1492
_1492
flow completion zsh > $(brew --prefix)/share/zsh/site-functions/_flow
_1492
_1492
You will need to start a new shell for this setup to take effect.
_1492
_1492
Usage:
_1492
flow completion zsh [flags]
_1492
_1492
_1492
Flags:
_1492
--no-descriptions disable completion descriptions
_1492
_1492
_1492
_1492
------------
_1492
_1492
Utilities to manage configuration
_1492
_1492
Usage:
_1492
flow config [command]
_1492
_1492
Available Commands:
_1492
add Add resource to configuration
_1492
init Initialize a new configuration
_1492
remove Remove resource from configuration
_1492
_1492
Use "flow config [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Add resource to configuration
_1492
_1492
Usage:
_1492
flow config add [command]
_1492
_1492
Examples:
_1492
flow config add account
_1492
_1492
Available Commands:
_1492
account Add account to configuration
_1492
contract Add contract to configuration
_1492
deployment Add deployment to configuration
_1492
network Add network to configuration
_1492
_1492
Use "flow config add [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Add account to configuration
_1492
_1492
Usage:
_1492
flow config add account [flags]
_1492
_1492
Examples:
_1492
flow config add account
_1492
_1492
_1492
Flags:
_1492
--address string Account address
_1492
--hash-algo string Hash algorithm to pair with this account key (default "SHA3_256")
_1492
--key-index string Account key index (default "0")
_1492
--name string Name for the account
_1492
--private-key string Account private key
_1492
--sig-algo string Signature algorithm of this account key (default "ECDSA_P256")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Add contract to configuration
_1492
_1492
Usage:
_1492
flow config add contract [flags]
_1492
_1492
Examples:
_1492
flow config add contract
_1492
_1492
_1492
Flags:
_1492
--emulator-alias string Address for the emulator alias
_1492
--filename string Filename of the contract source
_1492
--mainnet-alias string Address for the mainnet alias
_1492
--name string Name of the contract
_1492
--testnet-alias string Address for the testnet alias
_1492
_1492
_1492
_1492
------------
_1492
_1492
Add deployment to configuration
_1492
_1492
Usage:
_1492
flow config add deployment [flags]
_1492
_1492
Examples:
_1492
flow config add deployment
_1492
_1492
_1492
Flags:
_1492
--account string Account name used for deployment
_1492
--contract strings Name of the contract to be deployed
_1492
--network string Network name used for deployment
_1492
_1492
_1492
_1492
------------
_1492
_1492
Add network to configuration
_1492
_1492
Usage:
_1492
flow config add network [flags]
_1492
_1492
Examples:
_1492
flow config add network
_1492
_1492
_1492
Flags:
_1492
--host string Flow Access API host address
_1492
--name string Network name
_1492
--network-key string Flow Access API host network key for secure client connections
_1492
_1492
_1492
_1492
------------
_1492
_1492
Initialize a new configuration
_1492
_1492
Usage:
_1492
flow config init [flags]
_1492
_1492
_1492
Flags:
_1492
--global Initialize global user configuration
_1492
--reset Reset configuration file
_1492
--service-hash-algo string Service account key hash algorithm (default "SHA3_256")
_1492
--service-private-key string Service account private key
_1492
--service-sig-algo string Service account key signature algorithm (default "ECDSA_P256")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Remove resource from configuration
_1492
_1492
Usage:
_1492
flow config remove [command]
_1492
_1492
Examples:
_1492
flow config remove account
_1492
_1492
Available Commands:
_1492
account Remove account from configuration
_1492
contract Remove contract from configuration
_1492
deployment Remove deployment from configuration
_1492
network Remove network from configuration
_1492
_1492
Use "flow config remove [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Remove account from configuration
_1492
_1492
Usage:
_1492
flow config remove account <name> [flags]
_1492
_1492
Examples:
_1492
flow config remove account Foo
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Remove contract from configuration
_1492
_1492
Usage:
_1492
flow config remove contract <name> [flags]
_1492
_1492
Examples:
_1492
flow config remove contract Foo
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Remove deployment from configuration
_1492
_1492
Usage:
_1492
flow config remove deployment <account> <network> [flags]
_1492
_1492
Examples:
_1492
flow config remove deployment Foo testnet
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Remove network from configuration
_1492
_1492
Usage:
_1492
flow config remove network <name> [flags]
_1492
_1492
Examples:
_1492
flow config remove network Foo
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Manage contracts and dependencies
_1492
_1492
Usage:
_1492
flow dependencies [command]
_1492
_1492
Aliases:
_1492
dependencies, deps
_1492
_1492
Available Commands:
_1492
add Add a single contract and its dependencies.
_1492
install Install contract and dependencies.
_1492
_1492
Use "flow dependencies [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Add a single contract and its dependencies.
_1492
_1492
Usage:
_1492
flow dependencies add <source string> [flags]
_1492
_1492
Examples:
_1492
flow dependencies add testnet://0afe396ebc8eee65.FlowToken
_1492
_1492
_1492
Flags:
_1492
--name string Name of the dependency
_1492
_1492
_1492
_1492
------------
_1492
_1492
Install contract and dependencies.
_1492
_1492
Usage:
_1492
flow dependencies install [flags]
_1492
_1492
Examples:
_1492
flow dependencies install
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Deploy all project contracts
_1492
_1492
Usage:
_1492
flow deploy [flags]
_1492
_1492
Examples:
_1492
flow deploy
_1492
_1492
_1492
Flags:
_1492
--show-diff use show-diff flag to show diff between existing and new contracts on update
_1492
--update use update flag to update existing contracts
_1492
_1492
_1492
_1492
------------
_1492
_1492
Build your Flow project
_1492
_1492
Usage:
_1492
flow dev [flags]
_1492
_1492
Examples:
_1492
flow dev
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Run a development wallet
_1492
_1492
Usage:
_1492
flow dev-wallet [flags]
_1492
_1492
Examples:
_1492
flow dev-wallet
_1492
_1492
_1492
Flags:
_1492
--emulator-host string Host for access node connection (default "http://localhost:8888")
_1492
--port uint Dev wallet port to listen on (default 8701)
_1492
_1492
_1492
_1492
------------
_1492
_1492
Run Flow network for development
_1492
_1492
Usage:
_1492
flow emulator [flags]
_1492
flow emulator [command]
_1492
_1492
Available Commands:
_1492
snapshot Create/Load/List emulator snapshots
_1492
_1492
Flags:
_1492
--admin-port int port to run the admin API (default 8080)
_1492
-b, --block-time duration time between sealed blocks, e.g. '300ms', '-1.5h' or '2h45m'. Valid units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h'
_1492
--chain-id string chain to emulate for address generation. Valid values are: 'emulator', 'testnet', 'mainnet' (default "emulator")
_1492
--contract-removal allow removal of already deployed contracts, used for updating during development (default true)
_1492
--contracts deploy common contracts when emulator starts
_1492
--coverage-reporting enable Cadence code coverage reporting
_1492
--dbpath string path to database directory (default "./flowdb")
_1492
--debugger-port int port to run the Debugger (Debug Adapter Protocol) (default 2345)
_1492
--evm-enabled enable EVM support
_1492
--grpc-debug enable gRPC server reflection for debugging with grpc_cli
_1492
--host string host to listen on for emulator GRPC/REST/Admin servers (default: all interfaces)
_1492
--init whether to initialize a new account profile
_1492
--log-format string logging output format. Valid values (text, JSON) (default "text")
_1492
--min-account-balance string The minimum account balance of an account. This is also the cost of creating one account. e.g. '0.001'. The default is taken from the current version of flow-go
_1492
--persist enable persistent storage
_1492
-p, --port int port to run RPC server (default 3569)
_1492
--redis-url string redis-server URL for persisting redis storage backend ( redis://[[username:]password@]host[:port][/database] )
_1492
--rest-debug enable REST API debugging output
_1492
--rest-port int port to run the REST API (default 8888)
_1492
--script-gas-limit int gas limit for scripts (default 100000)
_1492
--service-hash-algo string service account key hash algorithm (default "SHA3_256")
_1492
--service-priv-key string service account private key
_1492
--service-pub-key string service account public key
_1492
--service-sig-algo string service account key signature algorithm (default "ECDSA_P256")
_1492
--simple-addresses use sequential addresses starting with 0x01
_1492
--skip-tx-validation skip verification of transaction signatures and sequence numbers
_1492
--snapshot enable snapshots for emulator
_1492
--sqlite-url string sqlite db URL for persisting sqlite storage backend
_1492
--storage-limit enable account storage limit (default true)
_1492
--storage-per-flow string the MB amount of storage capacity an account has per 1 FLOW token it has. e.g. '100.0'. The default is taken from the current version of flow-go
_1492
--token-supply string initial FLOW token supply (default "1000000000.0")
_1492
--transaction-expiry int transaction expiry, measured in blocks (default 10)
_1492
--transaction-fees enable transaction fees
_1492
--transaction-max-gas-limit int maximum gas limit for transactions (default 9999)
_1492
-v, --verbose enable verbose logging
_1492
_1492
Use "flow emulator [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Create/Load/List emulator snapshots
_1492
_1492
Usage:
_1492
flow emulator snapshot <create|load|list> [snapshotName] [flags]
_1492
_1492
Examples:
_1492
flow emulator snapshot create testSnapshot
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Retrieve events
_1492
_1492
Usage:
_1492
flow events [command]
_1492
_1492
Available Commands:
_1492
get Get events in a block range
_1492
_1492
Use "flow events [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Get events in a block range
_1492
_1492
Usage:
_1492
flow events get <event_name> [flags]
_1492
_1492
Examples:
_1492
#fetch events from the latest 10 blocks is the default behavior
_1492
flow events get A.1654653399040a61.FlowToken.TokensDeposited
_1492
_1492
#specify manual start and stop blocks
_1492
flow events get A.1654653399040a61.FlowToken.TokensDeposited --start 11559500 --end 11559600
_1492
_1492
#in order to get and event from the 20 latest blocks on a network run
_1492
flow events get A.1654653399040a61.FlowToken.TokensDeposited --last 20 --network mainnet
_1492
_1492
#if you want to fetch multiple event types that is done by sending in more events. Even fetching will be done in parallel.
_1492
flow events get A.1654653399040a61.FlowToken.TokensDeposited A.1654653399040a61.FlowToken.TokensWithdrawn
_1492
_1492
_1492
_1492
Flags:
_1492
--batch uint Number of blocks each worker will fetch (default 25)
_1492
--end uint End block height
_1492
--last uint Fetch number of blocks relative to the last block. Ignored if the start flag is set. Used as a default if no flags are provided (default 10)
_1492
--start uint Start block height
_1492
--workers int Number of workers to use when fetching events in parallel (default 10)
_1492
_1492
_1492
_1492
------------
_1492
_1492
execute, generate, package
_1492
_1492
Usage:
_1492
flow flix [command]
_1492
_1492
Available Commands:
_1492
execute execute FLIX template with a given id, name, local filename, or url
_1492
generate generate FLIX json template given local Cadence filename
_1492
package package file for FLIX template fcl-js is default
_1492
_1492
Use "flow flix [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
execute FLIX template with a given id, name, local filename, or url
_1492
_1492
Usage:
_1492
flow flix execute <id | name | path | url> [flags]
_1492
_1492
Examples:
_1492
flow flix execute transfer-flow 1 0x123456789
_1492
_1492
_1492
Flags:
_1492
--args-json string arguments in JSON-Cadence format
_1492
--authorizer strings Name of a single or multiple comma-separated accounts used as authorizers from configuration
_1492
--block-height uint block height to execute the script at
_1492
--block-id string block ID to execute the script at
_1492
--exclude strings Fields to exclude from the output (events)
_1492
--gas-limit uint transaction gas limit (default 1000)
_1492
--include strings Fields to include in the output
_1492
--lang string language to generate the template for (default "js")
_1492
--payer string Account name from configuration used as payer
_1492
--pre-fill string template path to pre fill the FLIX
_1492
--proposer string Account name from configuration used as proposer
_1492
--signer string Account name from configuration used to sign the transaction as proposer, payer and suthorizer
_1492
_1492
_1492
_1492
------------
_1492
_1492
generate FLIX json template given local Cadence filename
_1492
_1492
Usage:
_1492
flow flix generate <cadence.cdc> [flags]
_1492
_1492
Examples:
_1492
flow flix generate multiply.cdc
_1492
_1492
_1492
Flags:
_1492
--args-json string arguments in JSON-Cadence format
_1492
--authorizer strings Name of a single or multiple comma-separated accounts used as authorizers from configuration
_1492
--block-height uint block height to execute the script at
_1492
--block-id string block ID to execute the script at
_1492
--exclude strings Fields to exclude from the output (events)
_1492
--gas-limit uint transaction gas limit (default 1000)
_1492
--include strings Fields to include in the output
_1492
--lang string language to generate the template for (default "js")
_1492
--payer string Account name from configuration used as payer
_1492
--pre-fill string template path to pre fill the FLIX
_1492
--proposer string Account name from configuration used as proposer
_1492
--signer string Account name from configuration used to sign the transaction as proposer, payer and suthorizer
_1492
_1492
_1492
_1492
------------
_1492
_1492
package file for FLIX template fcl-js is default
_1492
_1492
Usage:
_1492
flow flix package <id | name | path | url> --lang <lang> [flags]
_1492
_1492
Examples:
_1492
flow flix package multiply.template.json --lang js
_1492
_1492
_1492
Flags:
_1492
--args-json string arguments in JSON-Cadence format
_1492
--authorizer strings Name of a single or multiple comma-separated accounts used as authorizers from configuration
_1492
--block-height uint block height to execute the script at
_1492
--block-id string block ID to execute the script at
_1492
--exclude strings Fields to exclude from the output (events)
_1492
--gas-limit uint transaction gas limit (default 1000)
_1492
--include strings Fields to include in the output
_1492
--lang string language to generate the template for (default "js")
_1492
--payer string Account name from configuration used as payer
_1492
--pre-fill string template path to pre fill the FLIX
_1492
--proposer string Account name from configuration used as proposer
_1492
--signer string Account name from configuration used to sign the transaction as proposer, payer and suthorizer
_1492
_1492
_1492
_1492
------------
_1492
_1492
Run Flowser project explorer
_1492
_1492
Usage:
_1492
flow flowser [flags]
_1492
_1492
Examples:
_1492
flow flowser
_1492
_1492
_1492
Flags:
_1492
--emulator-host string Host for access node connection (default "http://localhost:8888")
_1492
--port uint Dev wallet port to listen on (default 8701)
_1492
_1492
_1492
_1492
------------
_1492
_1492
Generate template files for common Cadence code
_1492
_1492
Usage:
_1492
flow generate [command]
_1492
_1492
Aliases:
_1492
generate, g
_1492
_1492
Available Commands:
_1492
contract Generate Cadence smart contract template
_1492
script Generate a Cadence script template
_1492
transaction Generate a Cadence transaction template
_1492
_1492
Use "flow generate [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Generate Cadence smart contract template
_1492
_1492
Usage:
_1492
flow generate contract <name> [flags]
_1492
_1492
Examples:
_1492
flow generate contract HelloWorld
_1492
_1492
_1492
Flags:
_1492
--dir string Directory to generate files in
_1492
_1492
_1492
_1492
------------
_1492
_1492
Generate a Cadence script template
_1492
_1492
Usage:
_1492
flow generate script <name> [flags]
_1492
_1492
Examples:
_1492
flow generate script SomeScript
_1492
_1492
_1492
Flags:
_1492
--dir string Directory to generate files in
_1492
_1492
_1492
_1492
------------
_1492
_1492
Generate a Cadence transaction template
_1492
_1492
Usage:
_1492
flow generate transaction <name> [flags]
_1492
_1492
Examples:
_1492
flow generate transaction SomeTransaction
_1492
_1492
_1492
Flags:
_1492
--dir string Directory to generate files in
_1492
_1492
_1492
_1492
------------
_1492
_1492
Help provides help for any command in the application.
_1492
Simply type flow help [path to command] for full details.
_1492
_1492
Usage:
_1492
flow help [command] [flags]
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Initialize a new configuration
_1492
_1492
Usage:
_1492
flow init [flags]
_1492
_1492
Examples:
_1492
flow project init
_1492
_1492
_1492
Flags:
_1492
--global Initialize global user configuration
_1492
--reset Reset configuration file
_1492
--service-hash-algo string Service account key hash algorithm (default "SHA3_256")
_1492
--service-private-key string Service account private key
_1492
--service-sig-algo string Service account key signature algorithm (default "ECDSA_P256")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Generate and decode Flow keys
_1492
_1492
Usage:
_1492
flow keys [command]
_1492
_1492
Available Commands:
_1492
decode Decode an encoded public key
_1492
derive Derive public key from a private key
_1492
generate Generate a new key-pair
_1492
_1492
Use "flow keys [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Decode an encoded public key
_1492
_1492
Usage:
_1492
flow keys decode <rlp|pem> <encoded public key> [flags]
_1492
_1492
Examples:
_1492
flow keys decode rlp f847b8408...2402038203e8
_1492
_1492
_1492
Flags:
_1492
--from-file string Load key from file
_1492
--sig-algo string Signature algorithm (default "ECDSA_P256")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Derive public key from a private key
_1492
_1492
Usage:
_1492
flow keys derive <encoded private key> [flags]
_1492
_1492
Examples:
_1492
flow keys derive 4247b8408...2402038203e8
_1492
_1492
_1492
Flags:
_1492
--sig-algo string Signature algorithm (default "ECDSA_P256")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Generate a new key-pair
_1492
_1492
Usage:
_1492
flow keys generate [flags]
_1492
_1492
Examples:
_1492
flow keys generate
_1492
_1492
_1492
Flags:
_1492
--derivationPath string Derivation path (default "m/44'/539'/0'/0/0")
_1492
--mnemonic string Mnemonic seed to use
_1492
--sig-algo string Signature algorithm (default "ECDSA_P256")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Manage your Cadence project
_1492
_1492
Usage:
_1492
flow project [command]
_1492
_1492
Available Commands:
_1492
deploy Deploy Cadence contracts
_1492
_1492
Use "flow project [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Deploy Cadence contracts
_1492
_1492
Usage:
_1492
flow project deploy [flags]
_1492
_1492
Examples:
_1492
flow project deploy --network testnet
_1492
_1492
_1492
Flags:
_1492
--show-diff use show-diff flag to show diff between existing and new contracts on update
_1492
--update use update flag to update existing contracts
_1492
_1492
_1492
_1492
------------
_1492
_1492
Start emulator and deploy all project contracts
_1492
_1492
Usage:
_1492
flow run [flags]
_1492
_1492
Examples:
_1492
flow run
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Execute Cadence scripts
_1492
_1492
Usage:
_1492
flow scripts [command]
_1492
_1492
Available Commands:
_1492
execute Execute a script
_1492
_1492
Use "flow scripts [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Execute a script
_1492
_1492
Usage:
_1492
flow scripts execute <filename> [<argument> <argument> ...] [flags]
_1492
_1492
Examples:
_1492
flow scripts execute script.cdc "Meow" "Woof"
_1492
_1492
_1492
Flags:
_1492
--args-json string arguments in JSON-Cadence format
_1492
--block-height uint block height to execute the script at
_1492
--block-id string block ID to execute the script at
_1492
_1492
_1492
_1492
------------
_1492
_1492
Manage persisted global settings
_1492
_1492
Usage:
_1492
flow settings [command]
_1492
_1492
Available Commands:
_1492
metrics Configure command usage metrics settings
_1492
_1492
Use "flow settings [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Configure command usage metrics settings
_1492
_1492
Usage:
_1492
flow settings metrics [flags]
_1492
_1492
Examples:
_1492
flow settings metrics disable
_1492
flow settings metrics enable
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Start a new Flow project
_1492
_1492
Usage:
_1492
flow setup <project name> [flags]
_1492
_1492
Examples:
_1492
flow setup my-project
_1492
_1492
_1492
Flags:
_1492
--scaffold Interactively select a provided scaffold for project creation
_1492
--scaffold-id int Use provided scaffold ID for project creation
_1492
_1492
_1492
_1492
------------
_1492
_1492
Signature verification and creation
_1492
_1492
Usage:
_1492
flow signatures [command]
_1492
_1492
Available Commands:
_1492
generate Generate the message signature
_1492
verify Verify the signature
_1492
_1492
Use "flow signatures [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Generate the message signature
_1492
_1492
Usage:
_1492
flow signatures generate <message> [flags]
_1492
_1492
Examples:
_1492
flow signatures generate 'The quick brown fox jumps over the lazy dog' --signer alice
_1492
_1492
_1492
Flags:
_1492
--signer string name of the account used to sign (default "emulator-account")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Verify the signature
_1492
_1492
Usage:
_1492
flow signatures verify <message> <signature> <public key> [flags]
_1492
_1492
Examples:
_1492
flow signatures verify 'The quick brown fox jumps over the lazy dog' 99fa...25b af3...52d
_1492
_1492
_1492
Flags:
_1492
--hash-algo string Hashing algorithm used to create signature (default "SHA3_256")
_1492
--sig-algo string Signature algorithm used to create the public key (default "ECDSA_P256")
_1492
_1492
_1492
_1492
------------
_1492
_1492
Retrieve the protocol state snapshot
_1492
_1492
Usage:
_1492
flow snapshot [command]
_1492
_1492
Available Commands:
_1492
save Get the latest finalized protocol snapshot
_1492
_1492
Use "flow snapshot [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Get the latest finalized protocol snapshot
_1492
_1492
Usage:
_1492
flow snapshot save [flags]
_1492
_1492
Examples:
_1492
flow snapshot save /tmp/snapshot.json
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Display the status of the Flow network
_1492
_1492
Usage:
_1492
flow status [flags]
_1492
_1492
_1492
_1492
_1492
------------
_1492
_1492
Run Cadence tests
_1492
_1492
Usage:
_1492
flow test <filename> [flags]
_1492
_1492
Examples:
_1492
flow test script.cdc
_1492
_1492
_1492
Flags:
_1492
--cover Use the cover flag to calculate coverage report
_1492
--covercode string Use the covercode flag to calculate coverage report only for certain types of code. Available values are "all" & "contracts" (default "all")
_1492
--coverprofile string Filename to write the calculated coverage report. Supported extensions are .json and .lcov (default "coverage.json")
_1492
--name string Use the name flag to run only tests that match the given name
_1492
--random Use the random flag to execute test cases randomly
_1492
--seed int Use the seed flag to manipulate random execution of test cases
_1492
_1492
_1492
_1492
------------
_1492
_1492
Build, sign, send and retrieve transactions
_1492
_1492
Usage:
_1492
flow transactions [command]
_1492
_1492
Available Commands:
_1492
build Build an unsigned transaction
_1492
decode Decode a transaction
_1492
get Get the transaction by ID
_1492
send Send a transaction
_1492
send-signed Send signed transaction
_1492
sign Sign built transaction
_1492
_1492
Use "flow transactions [command] --help" for more information about a command.
_1492
_1492
_1492
------------
_1492
_1492
Build an unsigned transaction
_1492
_1492
Usage:
_1492
flow transactions build <code filename> [<argument> <argument> ...] [flags]
_1492
_1492
Examples:
_1492
flow transactions build ./transaction.cdc "Hello" --proposer alice --authorizer alice --payer bob
_1492
_1492
_1492
Flags:
_1492
--args-json string arguments in JSON-Cadence format
_1492
--authorizer strings transaction authorizer (default [emulator-account])
_1492
--gas-limit uint transaction gas limit (default 1000)
_1492
--payer string transaction payer (default "emulator-account")
_1492
--proposer string transaction proposer (default "emulator-account")
_1492
--proposer-key-index int proposer key index
_1492
_1492
_1492
_1492
------------
_1492
_1492
Decode a transaction
_1492
_1492
Usage:
_1492
flow transactions decode <transaction filename> [flags]
_1492
_1492
Examples:
_1492
flow transactions decode ./transaction.rlp
_1492
_1492
_1492
Flags:
_1492
--include strings Fields to include in the output. Valid values: signatures, code, payload.
_1492
_1492
_1492
_1492
------------
_1492
_1492
Get the transaction by ID
_1492
_1492
Usage:
_1492
flow transactions get <tx_id> [flags]
_1492
_1492
Aliases:
_1492
get, status
_1492
_1492
Examples:
_1492
flow transactions get 07a8...b433
_1492
_1492
_1492
Flags:
_1492
--exclude strings Fields to exclude from the output. Valid values: events.
_1492
--include strings Fields to include in the output. Valid values: signatures, code, payload, fee-events.
_1492
--sealed Wait for a sealed result (default true)
_1492
_1492
_1492
_1492
------------
_1492
_1492
Send a transaction
_1492
_1492
Usage:
_1492
flow transactions send <code filename> [<argument> <argument> ...] [flags]
_1492
_1492
Examples:
_1492
flow transactions send tx.cdc "Hello world"
_1492
_1492
_1492
Flags:
_1492
--args-json string arguments in JSON-Cadence format
_1492
--authorizer strings Name of a single or multiple comma-separated accounts used as authorizers from configuration
_1492
--exclude strings Fields to exclude from the output (events)
_1492
--gas-limit uint transaction gas limit (default 1000)
_1492
--include strings Fields to include in the output
_1492
--payer string Account name from configuration used as payer
_1492
--proposer string Account name from configuration used as proposer
_1492
--signer string Account name from configuration used to sign the transaction as proposer, payer and suthorizer
_1492
_1492
_1492
_1492
------------
_1492
_1492
Send signed transaction
_1492
_1492
Usage:
_1492
flow transactions send-signed <signed transaction filename> [flags]
_1492
_1492
Examples:
_1492
flow transactions send-signed signed.rlp
_1492
_1492
_1492
Flags:
_1492
--exclude strings Fields to exclude from the output (events)
_1492
--include strings Fields to include in the output. Valid values: signatures, code, payload.
_1492
_1492
_1492
_1492
------------
_1492
_1492
Sign built transaction
_1492
_1492
Usage:
_1492
flow transactions sign [<built transaction filename> | --from-remote-url <url>] [flags]
_1492
_1492
Examples:
_1492
flow transactions sign ./built.rlp --signer alice
_1492
_1492
_1492
Flags:
_1492
--from-remote-url string server URL where RLP can be fetched, signed RLP will be posted back to remote URL.
_1492
--include strings Fields to include in the output. Valid values: signatures, code, payload.
_1492
--signer strings name of a single or multiple comma-separated accounts used to sign (default [emulator-account])
_1492
_1492
_1492
_1492
------------
_1492
_1492
View version and commit information
_1492
_1492
Usage:
_1492
flow version [flags]
_1492
_1492
_1492
Global Flags:
_1492
-f, --config-path strings Path to flow configuration file (default [/Users/tomhaile/flow.json,flow.json])
_1492
-x, --filter string Filter result values by property name
_1492
--format string Format result values (default "text")
_1492
--host string Flow Access API host address
_1492
-l, --log string Log level, options: "debug", "info", "error", "none" (default "info")
_1492
-n, --network string Network from configuration file (default "emulator")
_1492
--network-key string Flow Access API host network key for secure client connections
_1492
-o, --output string Output format, options: "text", "json", "inline" (default "text")
_1492
-s, --save string Save result to a filename
_1492
--skip-version-check Skip version check during start up
_1492
-y, --yes Approve any prompts
_1492
_1492
_1492
------------