Skip to content

Commit

Permalink
[CLI][doc] refactor aptos cli doc site (aptos-labs#9072)
Browse files Browse the repository at this point in the history
* refactor aptos cli doc site

* Fix broken links

* Require permission check before running run-indexer-tests

---------

Co-authored-by: Christian Sahar <[email protected]>
Co-authored-by: Stelian Ionescu <[email protected]>
  • Loading branch information
3 people authored Jul 20, 2023
1 parent a2c3c84 commit d15f47d
Show file tree
Hide file tree
Showing 53 changed files with 229 additions and 181 deletions.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The aptos node release tags are created for validator/fullnode deployment of the
The aptos framework release tags are created to facilitate the on-chain framework upgrade of the given release branch. The minor number *Z* will increment when a new hot-fix release or a new framework update is required on this release branch.

### aptos-cli-v*X.Y.Z* release tag
The aptos cli release tags are created to track the CLI versions for community to use when developing on the Aptos network. It's always recommended to upgrade your CLI when a new version is released, for the best user experience. Learn how to update to the [latest CLI version](https://aptos.dev/tools/install-cli/install-from-brew/#upgrading-the-cli).
The aptos cli release tags are created to track the CLI versions for community to use when developing on the Aptos network. It's always recommended to upgrade your CLI when a new version is released, for the best user experience. Learn how to update to the [latest CLI version](https://aptos.dev/tools/aptos-cli/install-cli/install-from-brew/#upgrading-the-cli).

## Aptos Release Lifecycle
(The time length here is a rough estimate, it varies depends on each release.)
Expand Down
2 changes: 1 addition & 1 deletion aptos-move/framework/FRAMEWORK-PROVER-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This guide gives some hints to troubleshoot issues when using the prover for spe

## Installation

Please refer to the [doc](https://aptos.dev/tools/install-cli/install-move-prover/).
Please refer to the [doc](https://aptos.dev/tools/aptos-cli/install-cli/install-move-prover/).

## Timeout

Expand Down
4 changes: 2 additions & 2 deletions aptos-move/move-examples/move-tutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You should obtain a copy of the content of the directory in which this `README.m
step_1 step_2 step_2_sol step_3 ...
```

You also need a recent version of the [Aptos CLI](../../../developer-docs-site/docs/tools/install-cli/index.md). This tutorial is written using the following version:
You also need a recent version of the [Aptos CLI](../../../developer-docs-site/docs/tools/aptos-cli/install-cli/index.md). This tutorial is written using the following version:

```shell
> aptos --version
Expand Down Expand Up @@ -492,7 +492,7 @@ Read more about [phantom type](../../../developer-docs-site/docs/move/book/gener
## Step 7: Use the Move Prover
> NOTE: Before running the Move Prover, ensure that the [Move Prover](../../../developer-docs-site/docs/tools/install-cli/install-move-prover.md) and associated tools are installed.
> NOTE: Before running the Move Prover, ensure that the [Move Prover](../../../developer-docs-site/docs/tools/aptos-cli/install-cli/install-move-prover.md) and associated tools are installed.
Smart contracts deployed on the blockchain may manipulate high-value assets. As a technique that uses strict
mathematical methods to describe behavior and reason correctness of computer systems, formal verification
Expand Down
2 changes: 1 addition & 1 deletion crates/aptos/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aptos Command Line Interface (CLI) Tool

The `aptos` tool is a command line interface (CLI) for debugging, development, and node operation.
See [Aptos CLI Documentation](https://aptos.dev/cli-tools/aptos-cli-tool/install-aptos-cli) for how to install the `aptos` CLI tool and how to use it.
See [Aptos CLI Documentation](https://aptos.dev/cli-tools/aptos-cli/use-cli/install-aptos-cli) for how to install the `aptos` CLI tool and how to use it.
2 changes: 1 addition & 1 deletion developer-docs-site/docs/guides/building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import TabItem from '@theme/TabItem';

# Building Aptos From Source

[Binary releases are available](../tools/install-cli/index.md), but if you want to build from source or develop on the Aptos tools, this is how.
[Binary releases are available](../tools/aptos-cli/install-cli/index.md), but if you want to build from source or develop on the Aptos tools, this is how.

## Supported operating systems

Expand Down
4 changes: 2 additions & 2 deletions developer-docs-site/docs/guides/nfts/mint-nft-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This tutorial assumes you have:

* a [GitHub account](https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account)
* the [GitHub CLI](https://cli.github.com/)
* the [Aptos CLI](../../tools/install-cli/index.md) (or you can run from [aptos-core](https://github.com/aptos-labs/aptos-core) source via `cargo run`)
* the [Aptos CLI](../../tools/aptos-cli/install-cli/index.md) (or you can run from [aptos-core](https://github.com/aptos-labs/aptos-core) source via `cargo run`)
* the `aptos-core` repository checked out: `git clone https://github.com/aptos-labs/aptos-core.git`

Then:
Expand Down Expand Up @@ -44,7 +44,7 @@ In this section, we create a collection and token. This work maps to the demonst

### Create an account

1. [Install the Aptos CLI](../../tools/install-cli/index.md).
1. [Install the Aptos CLI](../../tools/aptos-cli/install-cli/index.md).

2. Create a default (typical) account on Aptos devnet to receive the NFT by running the following command and selecting `devnet`:
```shell
Expand Down
2 changes: 1 addition & 1 deletion developer-docs-site/docs/guides/nfts/mint-onchain-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
You, as a developer, maybe also a game fancier, recently starts to develop a game and hope to
integrate it with some web3 experience. You spontaneously think Aptos supports fungible tokens
with abundant APIs in the token standard. So you wanna give a try to issue an in-game currency
called *silver coin* by using the [Aptos command line interface (CLI)](../../tools/install-cli/index.md). There is only two requirements:
called *silver coin* by using the [Aptos command line interface (CLI)](../../tools/aptos-cli/install-cli/index.md). There is only two requirements:
- The token is fungible
- The token is associated with a URL that points to the coin image.

Expand Down
2 changes: 1 addition & 1 deletion developer-docs-site/docs/guides/nfts/nft-minting-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The Aptos Non-Fungible Token (NFT) Minting Tool allows NFT creators to upload as

### Install Aptos CLI

[Install the Aptos CLI](../../tools/install-cli/index.md). The Aptos CLI is needed for compiling and deploying the minting contract.
[Install the Aptos CLI](../../tools/aptos-cli/install-cli/index.md). The Aptos CLI is needed for compiling and deploying the minting contract.

### Configure Aptos account

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cargo run -p aptos-faucet-cli -- --amount 10 --accounts <account_address> --key
:::tip Faucet and Aptos CLI
See more on how the faucet works in the [README](https://github.com/aptos-labs/aptos-core/tree/main/crates/aptos-faucet).

Also see how to use the [Aptos CLI](../tools/aptos-cli-tool/use-aptos-cli.md#account-examples) with an existing faucet.
Also see how to use the [Aptos CLI](../tools/aptos-cli/use-cli/use-aptos-cli.md#account-examples) with an existing faucet.
:::

## Validator fullnodes
Expand Down
8 changes: 4 additions & 4 deletions developer-docs-site/docs/guides/system-integrators-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ See [Aptos Blockchain Deployments](../nodes/deployments.md) for full details on

There are two options for running a local testnet:
* Directly [run a local testnet](../nodes/local-testnet/run-a-local-testnet.md) using either the [Aptos-core source code](../nodes/local-testnet/run-a-local-testnet.md#using-the-aptos-core-source-code) or a [Docker image](../nodes/local-testnet/run-a-local-testnet.md#using-docker). These paths are useful for testing changes to the Aptos-core codebase or framework, or for building services on top of the Aptos blockchain, respectively.
* [Install the Aptos CLI](../tools/install-cli/index.md) and 2) start a [local node with a faucet](../nodes/local-testnet/using-cli-to-run-a-local-testnet.md#starting-a-local-testnet-with-a-faucet). This path is useful for developing on the Aptos blockchain, debugging Move contracts, and testing node operations.
* [Install the Aptos CLI](../tools/aptos-cli/install-cli/index.md) and 2) start a [local node with a faucet](../nodes/local-testnet/using-cli-to-run-a-local-testnet.md#starting-a-local-testnet-with-a-faucet). This path is useful for developing on the Aptos blockchain, debugging Move contracts, and testing node operations.

Either of these methods will expose a [REST API service](../integration/aptos-apis.md) at `http://127.0.0.1:8080` and a Faucet API service at `http://127.0.0.1:8000` for option 1 run a local testnet or `http://127.0.0.1:8081` for option 2 install the Aptos CLI. The applications will output the location of the services.

Expand Down Expand Up @@ -84,7 +84,7 @@ Aptos currently provides three SDKs:
2. [Python](../sdks/python-sdk.md)
3. [Rust](../sdks/rust-sdk.md)

Almost all developers will benefit from exploring the CLI. [Using the CLI](../tools/aptos-cli-tool/use-aptos-cli.md) demonstrates how the CLI can be used to which includes creating accounts, transferring coins, and publishing modules.
Almost all developers will benefit from exploring the CLI. [Using the CLI](../tools/aptos-cli/use-cli/use-aptos-cli.md) demonstrates how the CLI can be used to which includes creating accounts, transferring coins, and publishing modules.

## Accounts on Aptos

Expand All @@ -98,7 +98,7 @@ At creation, an [Aptos account](https://github.com/aptos-labs/aptos-core/blob/88
* An [event handle](../concepts/events.md) for all new types of coins added to the account.
* An event handle for all key rotations for the account.

Read more about [Accounts](../concepts/accounts.md) and [set one up](../tools/aptos-cli-tool/use-aptos-cli#initialize-local-configuration-and-create-an-account).
Read more about [Accounts](../concepts/accounts.md) and [set one up](../tools/aptos-cli/use-cli/use-aptos-cli#initialize-local-configuration-and-create-an-account).

## Transactions

Expand Down Expand Up @@ -502,7 +502,7 @@ To learn more about coin creation, make ["Your First Coin"](../tutorials/first-c

## Integrating with the faucet

This tutorial is for SDK and wallet developers who want to integrate with the [Aptos Faucet](https://github.com/aptos-labs/aptos-core/tree/main/crates/aptos-faucet). If you are a dapp developer, you should access the faucet through an existing [SDK](../tutorials/first-transaction.md) or [CLI](../tools/aptos-cli-tool/use-aptos-cli#initialize-local-configuration-and-create-an-account) instead.
This tutorial is for SDK and wallet developers who want to integrate with the [Aptos Faucet](https://github.com/aptos-labs/aptos-core/tree/main/crates/aptos-faucet). If you are a dapp developer, you should access the faucet through an existing [SDK](../tutorials/first-transaction.md) or [CLI](../tools/aptos-cli/use-cli/use-aptos-cli#initialize-local-configuration-and-create-an-account) instead.

### Differences between devnet and testnet
What are the differences between devnet and testnet? Effectively none. In the past, the testnet faucet had a Captcha in front of it, making it unqueryable by normal means. This is no longer true.
Expand Down
2 changes: 1 addition & 1 deletion developer-docs-site/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ See the newest Aptos releases in the [Latest Releases](./releases/index.md) list
<div class="col">
<div class="card h-100" >
<div class="card-body d-flex flex-column" >
<a href="/tools/aptos-cli-tool/use-aptos-cli" class="card-title card-link stretched-link"> <h2>CLI</h2></a>
<a href="/tools/aptos-cli/use-cli/use-aptos-cli" class="card-title card-link stretched-link"> <h2>CLI</h2></a>
<p class="card-text">CLI for developing and deploying on the Aptos blockchain.</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion developer-docs-site/docs/integration/aptos-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The view function operates like the [Aptos Simulation API](../guides/system-inte
A function does not have to be immutable to be tagged as `#[view]`, but if the function is mutable it will not result in state mutation when called from the API.
If you want to tag a mutable function as `#[view]`, consider making it private so that it cannot be maliciously called during runtime.

In order to use the View functions, you need to [publish the module](../move/move-on-aptos/cli.md#publishing-a-move-package-with-a-named-address) through the [Aptos CLI](../tools/install-cli/index.md).
In order to use the View functions, you need to [publish the module](../move/move-on-aptos/cli.md#publishing-a-move-package-with-a-named-address) through the [Aptos CLI](../tools/aptos-cli/install-cli/index.md).

In the Aptos CLI, a view function request would look like this:
```
Expand Down
2 changes: 1 addition & 1 deletion developer-docs-site/docs/move/book/package-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Aptos checks compatibility at the time a Move package is published via an Aptos
To upgrade already published Move code, simply attempt to republish the code at
the same address that it was previously published. This can be done by following the
instructions for code compilation and publishing using the
[Aptos CLI](../../tools/aptos-cli-tool/use-aptos-cli.md). For an example,
[Aptos CLI](../../tools/aptos-cli/use-cli/use-aptos-cli.md). For an example,
see the [Your First Move Module](../../tutorials/first-move-module.md) tutorial.

## Upgrade policies
Expand Down
4 changes: 2 additions & 2 deletions developer-docs-site/docs/move/move-on-aptos/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import CodeBlock from '@theme/CodeBlock';

# Use the Aptos Move CLI

The `aptos` tool is a command line interface (CLI) for developing on the Aptos blockchain, debugging, and for node operations. This document describes how to use the `aptos` CLI tool. To download or build the CLI, follow [Install Aptos CLI](../../tools/install-cli/index.md).
The `aptos` tool is a command line interface (CLI) for developing on the Aptos blockchain, debugging, and for node operations. This document describes how to use the `aptos` CLI tool. To download or build the CLI, follow [Install Aptos CLI](../../tools/aptos-cli/install-cli/index.md).

## Compiling Move

Expand Down Expand Up @@ -173,7 +173,7 @@ FAILURE proving 1 modules from package `hello_prover` in 0.067s
"Error": "Move Prover failed: No boogie executable set. Please set BOOGIE_EXE"
}
```
In this case, see [Install the dependencies of Move Prover](../../tools/install-cli/index.md#step-3-optional-install-the-dependencies-of-move-prover).
In this case, see [Install the dependencies of Move Prover](../../tools/aptos-cli/install-cli/index.md#step-3-optional-install-the-dependencies-of-move-prover).

## Profiling gas usage

Expand Down
4 changes: 2 additions & 2 deletions developer-docs-site/docs/move/move-on-aptos/move-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ Now that you know what you would like to accomplish, you need to determine:
- Do I need a `Move.toml`?
- How do I run my script with the CLI?

Let us run through how to execute a Move script with a step-by-step example using the [Aptos CLI](../../tools/aptos-cli-tool/use-aptos-cli.md).
Let us run through how to execute a Move script with a step-by-step example using the [Aptos CLI](../../tools/aptos-cli/use-cli/use-aptos-cli.md).

1. Make a new directory for your work:
```sh
mkdir testing
cd testing
```

2. Set up the Aptos CLI and [create an account](../../tools/aptos-cli-tool/use-aptos-cli#initialize-local-configuration-and-create-an-account):
2. Set up the Aptos CLI and [create an account](../../tools/aptos-cli/use-cli/use-aptos-cli#initialize-local-configuration-and-create-an-account):
```sh
aptos init --network devnet
```
Expand Down
2 changes: 1 addition & 1 deletion developer-docs-site/docs/move/prover/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The Move Prover exists to make contracts more *trustworthy*; it:

For more information, refer to the documentation:

- [Installation](../../tools/install-cli/install-move-prover.md)
- [Installation](../../tools/aptos-cli/install-cli/install-move-prover.md)
- [Move Prover User Guide](prover-guide.md)
- [Move Specification Language](spec-lang.md)
- [Move Prover Supporting Resources](supporting-resources.md)
4 changes: 2 additions & 2 deletions developer-docs-site/docs/move/prover/prover-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This is the user guide for the Move Prover. This document accompanies the

## Running the Move Prover

The Move Prover is invoked via the [Aptos CLI](../../tools/aptos-cli-tool/use-aptos-cli.md#move-examples). In order to call the CLI, you must have a [*Move package*](../book/packages.md) in place. In the simplest case, a Move package is defined by a directory with a set of `.move` files in it and a manifest of the name `Move.toml`. You can create a new Move package at a given location by running the command: `aptos move init --name <name>`
The Move Prover is invoked via the [Aptos CLI](../../tools/aptos-cli/use-cli/use-aptos-cli.md#move-examples). In order to call the CLI, you must have a [*Move package*](../book/packages.md) in place. In the simplest case, a Move package is defined by a directory with a set of `.move` files in it and a manifest of the name `Move.toml`. You can create a new Move package at a given location by running the command: `aptos move init --name <name>`

Once the package exists, call the Move Prover from the directory to be tested or by supplying its path to the `--package-dir` argument:

Expand All @@ -24,7 +24,7 @@ Once the package exists, call the Move Prover from the directory to be tested or
aptos move prove --package-dir <path>
```

See example output and other available options in the [Proving Move](../../tools/aptos-cli-tool/use-aptos-cli.md#proving-move) section of Use Aptos CLI.
See example output and other available options in the [Proving Move](../../tools/aptos-cli/use-cli/use-aptos-cli.md#proving-move) section of Use Aptos CLI.

### Target filtering

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Each type of data in the backup storage is organized as follows:

## Restore a DB using the public backup files

The [Aptos CLI](../../tools/aptos-cli-tool/use-aptos-cli.md) supports two kinds of restore operations by reading from the public backup files:
The [Aptos CLI](../../tools/aptos-cli/use-cli/use-aptos-cli.md) supports two kinds of restore operations by reading from the public backup files:
1. Recreating a database with minimal transaction history at a user-specified transaction version (or the latest version the backup has)
2. Restoring the database over a specific period. In addition to the above, this option ensures that the recreated database carries the ledger history of the user-designated version range.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Follow the below detailed steps:

**Using Aptos-core source code**

Run the [Aptos CLI](../../tools/aptos-cli-tool/use-aptos-cli.md) `aptos` to produce a hex encoded static x25519 private key. This will be the private key for your network identity.
Run the [Aptos CLI](../../tools/aptos-cli/use-cli/use-aptos-cli.md) `aptos` to produce a hex encoded static x25519 private key. This will be the private key for your network identity.

:::tip

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Completed generating configuration:
Aptos is running, press ctrl-c to exit
```

Use the [Aptos CLI tool](../../tools/install-cli/index.md) to interact with your local testnet. The above output contains information you will use for starting the [Aptos CLI tool](../../tools/aptos-cli-tool/use-aptos-cli.md):
Use the [Aptos CLI tool](../../tools/aptos-cli/install-cli/index.md) to interact with your local testnet. The above output contains information you will use for starting the [Aptos CLI tool](../../tools/aptos-cli/use-cli/use-aptos-cli.md):

* `Aptos root key path`: The root key (also known as the mint or faucet key) controls the account that can mint tokens. Available in the docker compose folder under `aptos_root_key`.
* `Waypoint`: A verifiable checkpoint of the blockchain (available in the docker compose folder under waypoint.txt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you want to use Docker or `aptos-core` source to start and run a local testne
You can run a local testnet of the Aptos blockchain. This local testnet will not be connected to the Aptos devnet. It will run on your local machine, independent of other Aptos networks. You can use this local testnet for testing and development purposes. A local testnet is a great tool for doing local development against a known version of the codebase without having to interact with a live network or deal with the real world costs of a live network.

:::tip Aptos CLI documentation
If you are new to the Aptos CLI, then see this comprehensive [Aptos CLI user documentation](../../tools/aptos-cli-tool/use-aptos-cli.md).
If you are new to the Aptos CLI, then see this comprehensive [Aptos CLI user documentation](../../tools/aptos-cli/use-cli/use-aptos-cli.md).
:::

## Starting a local testnet with a faucet
Expand Down
Loading

0 comments on commit d15f47d

Please sign in to comment.