https://github.com/hyperledger/firefly-cli
FireFly Command Line Interface (CLI)
https://github.com/hyperledger/firefly-cli
Last synced: about 1 year ago
JSON representation
FireFly Command Line Interface (CLI)
- Host: GitHub
- URL: https://github.com/hyperledger/firefly-cli
- Owner: hyperledger
- License: apache-2.0
- Created: 2021-05-12T19:46:07.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-25T09:39:26.000Z (about 1 year ago)
- Last Synced: 2025-03-29T07:08:11.892Z (about 1 year ago)
- Language: Go
- Size: 5.22 MB
- Stars: 62
- Watchers: 18
- Forks: 59
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# FireFly CLI

The FireFly CLI can be used to create local [FireFly](https://github.com/hyperledger/firefly) stacks
for offline development of blockchain apps. This allows developers to rapidly iterate on their idea without
needing to set up a bunch of infrastructure before they can write the first line of code.

## Prerequisites
In order to run the FireFly CLI, you will need a few things installed on your dev machine:
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/)
- openssl
## Install the CLI
The easiest way to get up and running with the FireFly CLI is to download a pre-compiled binary of the latest release.
### Download the package for your OS
Go to the [latest release page](https://github.com/hyperledger/firefly-cli/releases/latest) and download the package for your OS and CPU architecture.
### Extract the binary and move it to `/usr/local/bin`
Assuming you downloaded the package from GitHub into you `Downloads` directory, run the following command:
```
sudo tar -zxf ~/Downloads/firefly-cli_*.tar.gz -C /usr/local/bin ff
```
If you downloaded the package from GitHub into a different directory, you will need to change the `tar` command above to wherever the `firefly-cli_*.tar.gz ` file is located.
### macOSUsers
> **NOTE**: On recent versions of macOS, default security settings will prevent the FireFly CLI binary from running, because it was downloaded from the internet. You will need to [allow the FireFly CLI in System Preferences](docs/mac_help.md), before it will run.
### Windows Users
> **NOTE**: For Windows users, we recommend that you use [Windows Subsystem for Linux 2 (WSL2)](https://docs.microsoft.com/en-us/windows/wsl/). Binaries provided for Linux will work in this environment.
### Linux Users
> **NOTE**: For Linux users, it is recommended that you add your user to the `docker` group so that you do not have to run `ff` or `docker` as `root` or with `sudo`. For more information about Docker permissions on Linux, please see [Docker's documentation on the topic](https://docs.docker.com/engine/install/linux-postinstall/).
### Install via Go
If you have a local Go development environment, and you have included `${GOPATH}/bin` in your path, you can install with:
```sh
go install github.com/hyperledger/firefly-cli/ff@latest
```
## Create a new stack
```
$ ff init
```
## Start a stack
```
$ ff start
```
## View logs
```
$ ff logs
```
> **NOTE**: You can use the `-f` flag on the `logs` command to follow the log output from all nodes in the stack
## Stop a stack
```
$ ff stop
```
## Clear all data from a stack
This command clears all data in a stack, but leaves the stack itself. This is useful for testing when you want to start with a clean slate but don't want to actually recreate the resources in the stack itself. Note: this will also stop the stack if it is running.
```
$ ff reset
```
## Completely delete a stack
This command will completely delete a stack, including all of its data and configuration.
```
$ ff remove
```
## Get stack info
This command will print out information about a particular stack, including whether it is running or not.
```
$ ff info
```
## List all stacks
This command will list all stacks that have been created on your machine.
```
$ ff ls
```