Skip to main content

Flow CLI Cheat sheet


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