From 7f181f2a5d78f6281c4b7447c9ce76ce8bcaf643 Mon Sep 17 00:00:00 2001 From: Jane Wang Date: Mon, 6 Jan 2025 16:33:31 -0500 Subject: [PATCH] Update cli command in getting started guide and closes #1138 --- docs/build/smart-contracts/getting-started/storing-data.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/build/smart-contracts/getting-started/storing-data.mdx b/docs/build/smart-contracts/getting-started/storing-data.mdx index 0bb27a74d..b69164724 100644 --- a/docs/build/smart-contracts/getting-started/storing-data.mdx +++ b/docs/build/smart-contracts/getting-started/storing-data.mdx @@ -27,12 +27,12 @@ This tutorial assumes that you've already completed the previous steps in Gettin ## Adding the increment contract -The `stellar contract init` command allows us to initialize a new project with any of the example contracts from the [soroban-examples](https://github.com/stellar/soroban-examples) repo, using the `--with-example` (or `-w`) flag. +The `stellar contract init` command allows us to initialize a new project with any of the example contracts from the [soroban-examples](https://github.com/stellar/soroban-examples) repo, using the `--name` flag, to specify a new contract's name. -It will not overwrite existing files, so we can also use this command to add a new contract to an existing project. Run the command again with a `--with-example` flag to add an `increment` contract to our project. From inside our `soroban-hello-world` directory, run: +It will not overwrite existing files unless we explicily pass in `--ovewrite` flag. Run the command with a `--name` flag to add an `increment` contract to our project. From inside our `soroban-hello-world` directory, run: ```sh -stellar contract init ./ --with-example increment +stellar contract init . --name increment ``` This will create a new `contracts/increment` directory with the following files: