Skip to content

Commit 886e65a

Browse files
authored
Merge pull request #1505 from onflow/brian-doyle/update-flow-init
Update flow init descriptions
2 parents 403d09a + fd33a59 commit 886e65a

File tree

7 files changed

+30
-38
lines changed

7 files changed

+30
-38
lines changed

docs/blockchain-development-tutorials/cadence/account-management/account-linking-with-dapper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Once it's installed, you'll need to initialize Flow in your Next.js project. Fro
9090
flow init --config-only
9191
```
9292

93-
The `--config-only` flag [initializes a project] with the just the config file. This allows the Flow CLI to interact with your project without adding any unnecessary files.
93+
The `--config-only` flag [initializes a project] with the just the config file. This allows the Flow CLI to interact with your project without adding adding the other files you want for most projects.
9494

9595
Next, you'll need to do a little bit of config work so that your project knows how to read Cadence files. Install the Flow Cadence Plugin:
9696

docs/blockchain-development-tutorials/cadence/cadence-advantages/compose-with-cadence-transactions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Create a [new project] with the [Flow CLI]:
5050
flow init
5151
```
5252

53-
Follow the prompts and create your project. You do **not** need to install any dependencies.
53+
Follow the prompts and create a `Basic Cadence project (no dependencies)`.
5454

5555
### Install dependencies
5656

docs/blockchain-development-tutorials/cadence/getting-started/cadence-environment-setup.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ You'll work with a `Counter` contract—a simple but comprehensive example that
4646

4747
**Time Commitment:** Approximately 30-45 minutes
4848

49-
**Prerequisites:**
49+
**Prerequisites:**
50+
5051
- Basic command line familiarity
5152
- Code editor (VSCode recommended)
5253
- Node.js installed (for future frontend development)
@@ -91,8 +92,9 @@ flow init
9192
```
9293

9394
When prompted:
95+
9496
1. **Project name:** Enter your preferred project name
95-
2. **Install core contracts:** Select `No` for this tutorial
97+
2. Select `Basic Cadence project (no dependencies)`.
9698

9799
The `flow init` command creates:
98100

@@ -182,7 +184,6 @@ access(all) contract Counter {
182184
- **Events**: `CounterIncremented` and `CounterDecremented` notify listeners when changes occur
183185
- **Initializer**: `init()` sets the initial count to 0 when the contract is deployed
184186
- **Public Functions**:
185-
186187
- `increment()`: Increases count by 1 and emits an event
187188
- `decrement()`: Decreases count by 1 and emits an event
188189
- `getCount()`: Returns the current count (read-only, marked with `view`)
@@ -219,18 +220,18 @@ This shows which networks your configured accounts are accessible on:
219220
🌐 Network 🟢 Local (running) 🔴 Local (stopped) ✓ Found ✗ Error
220221
─────────────────────────────────────────────────────
221222

222-
🟢 emulator
223+
🟢 emulator
223224
✓ default (f3fcd2c1a78f5eee): 0.00100000 FLOW
224225
✓ emulator-account (f8d6e0586b0a20c7): 999999999.99300000 FLOW
225226
✓ test-account (e03daebed8ca0615): 0.00100000 FLOW
226227

227-
🌐 mainnet
228+
🌐 mainnet
228229
No accounts found
229230

230-
🌐 testnet
231+
🌐 testnet
231232
No accounts found
232233

233-
🟢 testing
234+
🟢 testing
234235
✓ default (f3fcd2c1a78f5eee): 0.00100000 FLOW
235236
✓ emulator-account (f8d6e0586b0a20c7): 999999999.99300000 FLOW
236237
✓ test-account (e03daebed8ca0615): 0.00100000 FLOW
@@ -239,7 +240,7 @@ This shows which networks your configured accounts are accessible on:
239240
💡 Tip: To fund testnet accounts, run: flow accounts fund
240241
```
241242

242-
This is a great tool to visualize your different accounts and balances when you are developing.
243+
This is a great tool to visualize your different accounts and balances when you are developing.
243244

244245
### Configure Contract Deployment
245246

@@ -250,6 +251,7 @@ flow config add deployment
250251
```
251252

252253
Follow the prompts:
254+
253255
1. **Network:** Select `emulator`
254256
2. **Account:** Select `test-account`
255257
3. **Contract:** Select `Counter`
@@ -390,15 +392,18 @@ If you want to learn more about writing transactions, please read the docs for [
390392
You've successfully established a solid foundation for building on Flow. Let's recap what you've accomplished and learned. Through this hands-on tutorial, you've successfully built a complete Flow development foundation:
391393

392394
**Complete Flow Development Environment**
395+
393396
- Flow CLI installed and configured for project management
394397
- Local Flow emulator running and ready for development
395398
- Project creation and management workflow with `flow init`
396399

397400
**Smart Contract Deployment Skills**
401+
398402
- Counter contract successfully deployed to your local emulator
399403
- Account creation and contract deployment configuration mastered
400404

401405
**Blockchain Interactions**
406+
402407
- Scripts to query contract state (reading blockchain data)
403408
- Transactions to modify contract state (writing to blockchain)
404409
- Real-time interaction with blockchain data through CLI commands
@@ -429,4 +434,4 @@ Welcome to the Flow developer community—you're ready to build the future of di
429434
[configuration docs]: ../../../build/tools/flow-cli/flow.json/configuration.md
430435
[Flow Discord Community]: https://discord.com/invite/flow
431436
[Cadence Language Reference]: https://cadence-lang.org
432-
[Flow GitHub]: https://github.com/onflow
437+
[Flow GitHub]: https://github.com/onflow

docs/blockchain-development-tutorials/forte/scheduled-transactions/scheduled-transactions-introduction.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Flow fixes this problem with **scheduled transactions**. Scheduled Transactions
3838
After completing this tutorial, you will be able to:
3939

4040
- Understand the concept of scheduled transactions and how they solve blockchain limitations
41-
- Explain the key components of the FlowTransactionScheduler system
41+
- Explain the key components of the `FlowTransactionScheduler` system
4242
- Implement a basic scheduled transaction using the provided scaffold
4343
- Analyze the structure and flow of scheduled transaction transactions
4444
- Create custom scheduled transaction contracts and handlers
@@ -52,9 +52,9 @@ This tutorial assumes you have a modest knowledge of [Cadence]. If you don't, yo
5252

5353
## Getting Started
5454

55-
Begin by creating a new repo using the [Scheduled Transactions Scaffold] as a template.
55+
Begin by running `flow init` and select `Scheduled Transactions project`. Open the project.
5656

57-
This repository has a robust quickstart in the readme. Complete that first. It doesn't seem like much at first. The counter was at `0`, you ran a transaction, now it's at `1`. What's the big deal?
57+
The readme has a robust getting started guide. Complete that to set up and run the demo scheduled transaction. It doesn't seem like much at first. The counter was at `0`, you ran a transaction, now it's at `1`. What's the big deal?
5858

5959
Let's try again to make it clearer what's happening. Open `cadence/transactions/ScheduleIncrementIn.cdc` and look at the arguments for the transaction:
6060

@@ -339,7 +339,7 @@ transaction() {
339339
// Create and save the Manager resource
340340
let manager <- FlowTransactionSchedulerUtils.createManager()
341341
signer.storage.save(<-manager, to: FlowTransactionSchedulerUtils.managerStoragePath)
342-
342+
343343
// Create a capability for the Manager
344344
let managerCap = signer.capabilities.storage.issue<&FlowTransactionSchedulerUtils.Manager>(FlowTransactionSchedulerUtils.managerStoragePath)
345345
@@ -364,6 +364,7 @@ manager.schedule(
364364
```
365365

366366
The Manager also provides utility methods for:
367+
367368
- Scheduling another transaction with a previously used handler
368369
- Getting scheduled transaction information in many different ways
369370
- Canceling scheduled transactions
@@ -503,7 +504,7 @@ assert(
503504
if RickRollTransactionHandler.account.storage.borrow<&AnyResource>(from: /storage/RickRollTransactionHandler) == nil {
504505
let handler <- RickRollTransactionHandler.createHandler()
505506
RickRollTransactionHandler.account.storage.save(<-handler, to: /storage/RickRollTransactionHandler)
506-
507+
507508
// Issue a non-entitled public capability for the handler that is publicly accessible
508509
let publicCap = RickRollTransactionHandler.account.capabilities.storage
509510
.issue<&{FlowTransactionScheduler.TransactionHandler}>(/storage/RickRollTransactionHandler)

docs/blockchain-development-tutorials/tokens/fungible-token-cadence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Once you have the Flow CLI installed, you can set up a new project using the `fl
102102
flow init FooToken
103103
```
104104

105-
> Note: Select "No" when it asks you to install core contracts for the purposes of this tutorial.
105+
Select `Basic Cadence project (no dependencies)`.
106106

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

docs/blockchain-development-tutorials/tokens/nft-cadence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Once you have the Flow CLI installed, you can set up a new project using the `fl
6161
flow init foobar-nft
6262
```
6363

64-
> Note: Select "No" when it asks you to install core contracts for the purposes of this tutorial.
64+
Select `Basic Cadence project (no dependencies)`.
6565

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

docs/build/tools/flow-cli/flow.json/initialize-configuration.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,12 @@ flow init
1313
```
1414

1515
This command will:
16+
1617
- Create a new `flow.json` configuration file
1718
- Set up default networks (emulator, testnet, mainnet)
1819
- Create an emulator service account
1920
- Generate a basic project structure with `cadence/` directories
20-
21-
## Example Output
22-
23-
```shell
24-
> flow init
25-
26-
Configuration initialized
27-
Service account: 0xf8d6e0586b0a20c7
28-
29-
Start emulator by running: 'flow emulator'
30-
Reset configuration using: 'flow init --reset'
31-
```
21+
- Give you options for project scaffolding
3222

3323
## Project Structure
3424

@@ -54,6 +44,7 @@ flow init --config-only
5444
```
5545

5646
This is useful when:
47+
5748
- You already have a project structure
5849
- You want to add Flow configuration to an existing project
5950
- You're setting up configuration for a specific environment
@@ -67,10 +58,12 @@ flow init --global
6758
```
6859

6960
**Global configuration locations:**
61+
7062
- **macOS/Linux:** `~/flow.json`
7163
- **Windows:** `C:\Users\$USER\flow.json`
7264

7365
**Priority order:**
66+
7467
1. Local `flow.json` (highest priority)
7568
2. Global `flow.json` (lowest priority)
7669

@@ -85,6 +78,7 @@ If a `flow.json` file already exists, you'll see this error:
8578
```
8679

8780
**Solutions:**
81+
8882
- Delete the existing `flow.json` file first
8983
- Initialize in a different directory
9084
- Use `--config-only` to create a new config in a different location
@@ -99,8 +93,6 @@ flow init --config-only
9993

10094
Creates only the `flow.json` file without project structure.
10195

102-
103-
10496
### Global Flags
10597

10698
The following global flags are also available:
@@ -133,9 +125,3 @@ After initializing your configuration:
133125
- [`flow config add`](./manage-configuration.md) - Add configuration items
134126
- [`flow accounts create`](../accounts/create-accounts.md) - Create new accounts
135127
- [`flow project deploy`](../deployment/deploy-project-contracts.md) - Deploy contracts
136-
137-
138-
139-
140-
141-

0 commit comments

Comments
 (0)