Skip to content
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
9 changes: 5 additions & 4 deletions docs/cli-reference/dfx-ping.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Reference"]}/>

Use the `dfx ping` command to check connectivity to the IC or a testnet. This command enables you to verify that you can connect to the environment where you want to deploy to.
Use the `dfx ping` command to check connectivity to a network. This command enables you to verify that you can connect to the environment where you want to deploy to.

To ping your local server, please note that you can only run this command from within the project directory structure. For example, if your project name is `hello_world`, your current working directory must be the `hello_world` top-level project directory or one of its subdirectories.

Expand All @@ -22,11 +22,11 @@ You can specify the following argument for the `dfx ping` command.

| Argument | Description |
|----------|---------------------------------------------------------------|
| provider | Specifies the IC or testnet URL that you want to use. |
| provider | Specifies the network URL that you want to use. |

## Examples

You can use the `dfx ping` command to check whether the IC is currently available at a specific network address by running a command similar to the following:
You can use the `dfx ping` command to check whether the mainnet is currently available at a specific network address by running a command similar to the following:

``` bash
dfx ping https://icp-api.io
Expand All @@ -36,6 +36,7 @@ If the IC is running on the specified network provider address, the command retu

```json
{
"ic_api_version": "0.8"
"replica_health_status": "healthy",
"root_key": [48, 129, 130, 48, 29, 6, 13, 43, 6, 1, 4, 1, 130, 220, 124, 5, 3, 1, 2, 1, 6, 12, 43, 6, 1, 4, 1, 130, 220, 124, 5, 3, 2, 1, 3, 97, 0, 129, 76, 14, 110, 199, 31, 171, 88, 59, 8, 189, 129, 55, 60, 37, 92, 60, 55, 27, 46, 132, 134, 60, 152, 164, 241, 224, 139, 116, 35, 93, 20, 251, 93, 156, 12, 213, 70, 217, 104, 95, 145, 58, 12, 11, 44, 197, 52, 21, 131, 191, 75, 67, 146, 228, 103, 219, 150, 214, 91, 155, 180, 203, 113, 113, 18, 248, 71, 46, 13, 90, 77, 20, 80, 95, 253, 116, 132, 176, 18, 145, 9, 28, 95, 135, 185, 136, 131, 70, 63, 152, 9, 26, 11, 170, 174]
}
```
21 changes: 9 additions & 12 deletions docs/cli-reference/dfx-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Reference"]} />

Use the `dfx quickstart` command to perform initial one time setup for your identity and/or wallet. This command
can be run anytime to repeat the setup process or to be used as an informational command, printing
information about
your ICP balance, current ICP to XDR conversion rate, and more.
Use the `dfx quickstart` command to perform initial one time setup for your identity and/or wallet. This command can be run anytime to repeat the setup process or to be used as an informational command, printing information about your ICP balance, current ICP to XDR conversion rate, and more.

## Basic usage

Expand All @@ -21,7 +18,7 @@ You can use the following optional flags with the `dfx quickstart` command.

| Flag | Description |
|-------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| `--identity` | The user identity to run this command as. It contains your principal as well as some things DFX associates with it such as the wallet. |
| `--identity` | The user identity to run this command as. It contains your principal as well as some things `dfx` associates with it such as the wallet. |

## Options

Expand All @@ -39,12 +36,12 @@ To run a guided setup, run `dfx quickstart`
``` bash
dfx quickstart
```

```shell
Your DFX user principal: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxx
Your ledger account address: xxxxx
Your ICP balance: 1234.567 ICP
Conversion rate: 1 ICP <> 3.7950 XDR
Import an existing wallet? no
Spend 2.63504611 ICP to create a new wallet with 10 TC? no
Run this command again at any time to continue from here.
Your DFX user principal: hoqq7-3eo6j-dee4s-aiabk-6rqxw-kwgyo-rhru7-bdgmk-k5ipv-chkhx-cqe
Your ledger account address: 594369ede58d796ee76912d66201409930c9528d804f49a8e3f432bff957eae9
Your ICP balance: 3.99910000 ICP
Conversion rate: 1 ICP <> 3.3357 XDR
Mainnet wallet canister: mwylj-4aaaa-aaaak-aflyq-cai
Mainnet wallet balance: 66.28 TC
```
2 changes: 1 addition & 1 deletion docs/cli-reference/dfx-replica.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Reference"]} />

**NOTE**: The replica command has been removed. Please use the [dfx start](./dfx-start.mdx) command instead.
The replica command has been removed. Please use the [dfx start](./dfx-start.mdx) command instead.
8 changes: 4 additions & 4 deletions docs/cli-reference/dfx-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can use the following option with the `dfx schema` command.

| Option | Description |
|------------------------|----------------------------------------------------------------------------|
| `--for <which>` | Display schema for which JSON file. (default: dfx) |
| `--for <which>` | Display schema for which JSON file. (default: `dfx`) |
| `--outfile <outfile>` | Specifies a file to output the schema to instead of printing it to stdout. |

The parameter passed to `--for` can be one of the following:
Expand All @@ -28,8 +28,8 @@ The parameter passed to `--for` can be one of the following:
| dfx | dfx.json |
| networks | networks.json |
| dfx-metadata | dfx-related metadata stored in canister and accessible with `dfx canister metadata <canister> dfx` |
| extension-manifest | extension.json [example][example-extension-json] |
| extension-dependencies | dependencies.json [example][example-dependencies-json] |
| extension-manifest | extension.json [View an example][example-extension-json] |
| extension-dependencies | dependencies.json [View an example][example-dependencies-json] |

## Examples

Expand All @@ -51,7 +51,7 @@ You can print the schema for the "dfx" metadata JSON (which contains fields such
dfx schema --for dfx-metadata
```

If you want to write the schema for dfx.json to `path/to/file/schema.json`, you can do so by running the following command:
If you want to write the schema for `dfx.json` to `path/to/file/schema.json`, you can do so by running the following command:

``` bash
dfx schema --outfile path/to/file/schema.json
Expand Down
23 changes: 15 additions & 8 deletions docs/cli-reference/dfx-sns.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
<MarkdownChipRow labels={["Reference"]} />

:::caution
The `dfx sns` command is no longer part of dfx, and has now been turned into the dfx extension. In order to obtain it, please run `dfx extension install sns`.
The `dfx sns` command is no longer part of dfx, and has now been turned into a `dfx` extension. In order to obtain it, please run `dfx extension install sns`.
:::

Use the `dfx sns` subcommands to simulate decentralizing a dapp.
Use the `dfx sns` subcommands to simulate handing a dapp off to the community for decentralized governance.

## Basic usage

The basic syntax for running `dfx sns` commands is:

Expand All @@ -31,10 +33,9 @@ To view usage information for a specific subcommand, specify the subcommand and
dfx sns validate --help
```


## dfx sns create

Use the `dfx sns create` command to create an SNS configuration file. The configuration file specifies important, legally and financially relevant details about dapp decentralization. The file leaves blank parameters such as token name; you will need to fill these in.
Use the `dfx sns create` command to create an SNS configuration file. The configuration file specifies important, legal and financial details about the dapp's decentralization. The file leaves blank parameters such as token name; you will need to fill these in.

### Basic usage

Expand Down Expand Up @@ -63,11 +64,12 @@ dfx sns validate

### Examples

You can use the `dfx sns validate` command to verify that a configuration template is valid. It is not; it needs details such as token name:
You can use the `dfx sns validate` command to verify that a configuration template is valid. It is not, it needs details such as token name:

``` bash
dfx sns config create
```

Fill in the blank fields, then:
``` bash
dfx sns config validate
Expand All @@ -77,26 +79,31 @@ dfx sns config validate

Use the `dfx sns deploy` command to create SNS canisters according to the local configuration file.

Note: Deploying SNS canisters does not require a proposal, however there is a hefty fee. Please don't create canisters on mainnet until you have tested your configuration locally and are sure that you are happy with it.
Note: Deploying SNS canisters on the mainnet does not require a proposal; however there is a hefty fee. Please don't create canisters on mainnet until you have tested your configuration locally and are sure that you are happy with it.

### Basic usage

``` bash
dfx sns deploy
dfx sns deploy --network=ic
```

### Examples

Create an SNS on the local testnet:

``` bash
dfx sns config create
```

Fill in the blank fields, then:

``` bash
dfx sns config validate
dfx sns deploy
```
You can now verify that the sns canisters have been created. E.g.:

You can now verify that the sns canisters have been created.

```
dfx canister info sns_root
dfx canister info sns_ledger
Expand Down
14 changes: 7 additions & 7 deletions docs/cli-reference/dfx-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

Use the `dfx start` command to start a local development environment and web server processes. This command must be run before you can deploy canisters to the local development environment and test your dapps during development.

By default, all local dfx projects will use PocketIC to create this local development environment. You can run `dfx start` and `dfx stop` from any directory. See [local server configuration](#local-server-configuration) and [project-specific local networks](#project-specific-local-networks) below for exceptions.
By default, all local `dfx` projects will use PocketIC to create this local development environment. You can run `dfx start` and `dfx stop` from any directory. See [local server configuration](#local-server-configuration) and [project-specific local networks](#project-specific-local-networks) below for exceptions.

## Basic usage

Expand All @@ -22,8 +22,8 @@ You can use the following optional flags with the `dfx start` command.
|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--background` | Starts the local development environment and web server processes in the background and waits for a reply before returning to the shell. |
| `--clean` | Starts the local development environment and web server processes in a clean state by removing checkpoints from your project cache. You can use this flag to set your project cache to a new state when troubleshooting or debugging. |
| `--enable-bitcoin` | Enables bitcoin integration. |
| `--enable-canister-http` | Enables canister HTTP requests. (deprecated: now enabled by default) |
| `--enable-bitcoin` | Enables Bitcoin integration. |
| `--enable-canister-http` | Deprecated and now enabled by default. |
| `--pocketic` | Runs [PocketIC](https://github.com/dfinity/pocketic) instead of the replica. PocketIC is the default if no flag is used. |

## Options
Expand All @@ -33,9 +33,9 @@ You can use the following option with the `dfx start` command.
| Option | Description |
|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--host host` | Specifies the host interface IP address and port number to bind the frontend to. The default for the local shared network is `127.0.0.1:4943`, while the default for a project-specific network is '127.0.0.1:8000'. |
| `--bitcoin-node host:port` | Specifies the address of a bitcoind node. Implies `--enable-bitcoin`. |
| `--bitcoin-node host:port` | Specifies the address of a `bitcoind` node. Implies `--enable-bitcoin`. |
| `--artificial-delay milliseconds` | Specifies the delay that an update call should incur. Default: 600ms |
| `--domain domain` | A domain that can be served. Can be specified more than once. These are used for canister resolution [default: localhost] |
| `--domain domain` | A domain that can be served. Can be specified more than once. These are used for canister resolution [default: localhost] |

## Examples

Expand Down Expand Up @@ -69,7 +69,7 @@ more .dfx/pid

`dfx start` manages a PocketIC server that provides a local development environment. Running `dfx deploy` and other commands will manage canisters on this local network in the same way that `dfx deploy --network ic` deploys projects to the mainnet.

If run from outside a dfx project directory, or if `dfx.json` does not define the `local` network, then `dfx start` looks for the `local` network definition in `$HOME/.config/dfx/networks.json`. If this file does not exist or does not contain a definition for the `local` network, then dfx uses the following default definition:
If run from outside a `dfx` project directory, or if `dfx.json` does not define the `local` network, then `dfx start` looks for the `local` network definition in `$HOME/.config/dfx/networks.json`. If this file does not exist or does not contain a definition for the `local` network, then `dfx` uses the following default definition:

```
{
Expand All @@ -80,7 +80,7 @@ If run from outside a dfx project directory, or if `dfx.json` does not define th
}
```

dfx stores data for the shared local network in one of the following locations, depending on your operating system:
`dfx` stores data for the shared local network in one of the following locations, depending on your operating system:
- `$HOME/.local/share/dfx/network/local` (Linux)
- `$HOME/Library/Application Support/org.dfinity.dfx/network/local` (macOS)

Expand Down
13 changes: 8 additions & 5 deletions docs/cli-reference/dfx-stop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Reference"]} />

Use the `dfx stop` command to stop the local development environment processes that you currently have running on your computer. In most cases, you run the canister execution environment locally so that you can deploy canisters and test your dapps during development. To simulate the connection to the IC, these processes run continuously either in a terminal shell where you started them or the in the background until you stop or kill them.
Use the `dfx stop` command to stop the local development environment processes that you currently have running on your computer. In most cases, you run the canister execution environment locally so that you can deploy canisters and test your dapps during development. To simulate the connection to the mainnet, these processes run continuously either in a terminal shell where you started them or the in the background until you stop or kill them.

You can run this command from any directory unless you are working with a dfx.json project that defines a project-specific local network. See [Local Server Configuration](dfx-start.mdx#local-server-configuration) for details.
You can run this command from any directory unless you are working with a `dfx.json` project that defines a project-specific local network. See [local server configuration](dfx-start.mdx#local-server-configuration) for details.

## Basic usage

Expand All @@ -27,16 +27,19 @@ If the local development environment is running in a current shell rather than i
The current process identifier (`pid`) for the canister execution environment process started by `dfx` is recorded in a file named `pid`. You can view the process identifier before running the `dfx stop` command by running one of the following commands:

For a project-specific local network:

``` bash
cat .dfx/network/local/pid
```

For the shared local network, on Linux:
For the shared local network on Linux:

``` bash
cat $HOME/.local/share/dfx/network/local/pid
```

For the shared local network, on MacOS:
For the shared local network on MacOS:

``` bash
cat '$HOME/Library/Application Support/org.dfinity.dfx/network/local/pid'
```
Expand All @@ -47,7 +50,7 @@ This command displays a process identifier similar to the following:
1896
```

If you are still having trouble with a persistent service running after attempting to stop, you can terminate all running jobs with:
If you are still having trouble with a persistent service running after attempting to stop, you can terminate all running processes with:

``` bash
dfx killall
Expand Down
2 changes: 1 addition & 1 deletion docs/cli-reference/dfx-upgrade.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Reference"]} />

> **NOTE**: The upgrade command has been removed. Please use the [dfx version manager][dfxvm] instead.
The upgrade command has been removed. Please use the [dfx version manager][dfxvm] instead.

[dfxvm]: https://github.com/dfinity/dfxvm
Loading