Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix any old references to flow setup #973

Merged
merged 5 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 0 additions & 111 deletions docs/build/guides/flow-cli.md

This file was deleted.

9 changes: 4 additions & 5 deletions docs/build/guides/fungible-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,14 @@ please follow [the installation guide here](https://developers.flow.com/tools/fl

> 💡 Note: Here is [a link to the completed code](https://github.com/chasefleming/FooToken) if you want to skip ahead or reference as you follow along.

Once you have the Flow CLI installed, you can set up a new project
using the `flow setup` command. This command initializes
the necessary directory structure and a `flow.json` configuration file
(a way to configure your project for contract sources, deployments, accounts, and more):
Once you have the Flow CLI installed, you can set up a new project using the `flow init` command. This command initializes the necessary directory structure and a `flow.json` configuration file (a way to configure your project for contract sources, deployments, accounts, and more):

```bash
flow setup FooToken
flow init FooToken
```

> Note: Select "No" when it asks you to install core contracts for the purposes of this tutorial.

Upon execution, the command will generate the following directory structure:

```
Expand Down
9 changes: 4 additions & 5 deletions docs/build/guides/nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ please follow [the installation guide here](../../tools/flow-cli/install.md).

> 💡 Note: Here is [a link to the completed code](https://github.com/chasefleming/foobar-nft) if you want to skip ahead or reference as you follow along.

Once you have the Flow CLI installed, you can set up a new project
using the `flow setup` command. This command initializes
the necessary directory structure and a `flow.json` configuration file
(a way to configure your project for contract sources, deployments, accounts, and more):
Once you have the Flow CLI installed, you can set up a new project using the `flow init` command. This command initializes the necessary directory structure and a `flow.json` configuration file (a way to configure your project for contract sources, deployments, accounts, and more):

```bash
flow setup foobar-nft
flow init foobar-nft
```

> Note: Select "No" when it asks you to install core contracts for the purposes of this tutorial.

Upon execution, the command will generate the following directory structure:

```
Expand Down
2 changes: 1 addition & 1 deletion docs/build/smart-contracts/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Anyone can deploy and update contracts on mainnet. Audits are encouraged but not
### Create and deploy a mainnet project
The tool of choice is Flow CLI, there are quickstarts and guides that use Flow CLI, [Getting Started](../getting-started/flow-cli)
- It is highly encouraged to test your contracts, transactions and scripts on Testnet, have strong smart contract test coverage and follow any additional guidelines set out here: [Smart Contract Testing Guidelines](./testing.md).
- Follow the Flow CLI instructions to [Create a Project](../../tools/flow-cli/index.md). You have the Flow CLI installed and ran `flow init` or `flow setup` in your project folder and generating a `flow.json` file
- Follow the Flow CLI instructions to [Create a Project](../../tools/flow-cli/index.md). You have the Flow CLI installed and ran `flow init` in your project folder and generating a `flow.json` file
- Mainnet account: You completed the mainnet account setup, (see above) and have your key pair and mainnet address ready.
- [Deploy your project](../../tools/flow-cli/deployment/deploy-project-contracts.md), notice that your account now has contracts deployed on mainnet.
- [Deploy a contract](../../tools/flow-cli/accounts/account-add-contract.md) to mainnet. You can deploy contracts individually using the `account-add-contract` command.
Expand Down
49 changes: 4 additions & 45 deletions docs/tools/flow-cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The **Flow Command Line Interface (CLI)** is a powerful tool that enables develo

With Flow CLI, developers can:

- **Initialize Projects**: Quickly set up new Flow projects using the `flow init` command, which creates the necessary files and directories, sets up your project configuration, and installs any core contract dependencies.
- **Manage Contract Dependencies**: Use the [Dependency Manager](dependency-manager.md) to install and manage smart contract dependencies effortlessly, simplifying the integration of external contracts into your project.
- **Manage Accounts**: Create and manage Flow accounts, configure keys, and handle account-related operations.
- **Send Transactions**: Build, sign, and submit transactions to the Flow network, allowing for contract interaction and fund transfers.
- **Query Chain State**: Retrieve data from the Flow blockchain, including account balances, event logs, and the status of specific transactions.
Expand All @@ -23,49 +25,6 @@ The Flow CLI is essential for developers looking to build, test, and maintain de
Follow [these steps](../flow-cli/install.md) to install the Flow CLI on
macOS, Linux, and Windows.

## Create your first project
The Flow CLI is Flow’s primary development and testing environment, similar to Hardhat and Foundry for developers familiar with writing in Solidity. With the Flow CLI super commands, initiating your new project becomes effortless. Execute the `flow setup` command and make a selection from a variety of accessible scaffolds.

```
> flow setup hello-world --scaffold

🔨 General Scaffolds
[1] Empty Cadence Project - Empty project containing only basic folder structure and flow.json configuration.
[2] Simple Cadence Project - Scaffold contains required folder structure as well as some example Cadence code.
[3] Cadence NFT Project - Scaffold contains the ExampleNFT sample NFT contract.
[4] Hybrid Custody Project - Starter for exploring & implementing Hybrid Custody.

💻 Web Scaffolds
[5] FCL Web Dapp - Simple TypeScript web application using next.js, FCL, and Cadence.

📱 Mobile Scaffolds
[6] Swift iOS simple example - iOS example demonstrating usage of FCL and Flow interactions.
[7] Android simple example - Android example demonstrating usage of FCL and Flow interactions.
[8] FCL React Native Mobile Dapp - React Native (Expo) mobile dapp example demonstrating FCL and Flow interactions.

🏀 Unity Scaffolds
[9] Simple Unity - Simple example demonstrating how to interact with the Flow network using Unity SDK.
[10] Mobile Unity Game - Example words game built on Flow using the Unity SDK.
```

After you have created your new project you can proceed writing contracts and by running `dev`
command the CLI will make sure they are deployed to the Flow emulator for you. Flow emulator is
a simplified version of Flow network you can use locally to develop.

So proceed by starting the emulator:

```
> flow emulator
```

After creating your new project you are ready to start writing contracts. The Flow emulator is a simplified local simulation of the Flow network. Running the dev command in the CLI ensures that the contracts are deployed to the Flow emulator for you.

And then the flow dev:
```
> flow dev
```

### Next steps

As part of the next steps you can read more about [flow dev command](super-commands.md).
## Create Your First Project

To get started with creating your first Flow project and to learn more about how to use the Flow CLI super commands, please refer to the [Super Commands documentation](super-commands.md). These commands simplify the setup and development process, allowing you to focus on building your application without worrying about the underlying configurations.
4 changes: 3 additions & 1 deletion docs/tools/flow-cli/super-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ sidebar_position: 2
Flow CLI Super commands are set of commands that can be used during development of your dApp to greatly simplify the workflow. The result is you can focus on writing the contracts and the commands will take care of the rest.

## Init
The initial command to start your new Flow project is `flow init`. It will ask you a few questions about how you'd like to configure your project and then create the necessary files and folders, setup the configuration file, and install any core contracts dependencies you might need.
The initial command to start your new Flow project is flow init. It will ask you a few questions about how you'd like to configure your project and then create the necessary files and folders, set up the configuration file, and install any core contract dependencies you might need.

During the initialization process, `flow init` will prompt you if you want to install any core smart contracts (e.g. `NonFungibleToken`) and set them up in your project. If you choose to install core contracts, the CLI will use the [Dependency Manager](dependency-manager.md) under the hood to automatically install any required smart contract dependencies.

> Note: If you just want the `flow.json` configured without creating any folders or files, you can run `flow init --config-only`.

Expand Down
5 changes: 5 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,11 @@
"source": "build/smart-contracts/cadence",
"destination": "https://cadence-lang.org/docs/",
"permanent": true
},
{
"source": "/build/guides/flow-cli",
"destination": "/tools/flow-cli/install",
"permanent": true
}
]
}
Loading