diff --git a/FULL_HELP_DOCS.md b/FULL_HELP_DOCS.md index 689ce3036..0900ab0a5 100644 --- a/FULL_HELP_DOCS.md +++ b/FULL_HELP_DOCS.md @@ -4,13 +4,15 @@ This document contains the help content for the `stellar` command-line program. ## `stellar` -With the Stellar CLI you can: +Work seamlessly with Stellar accounts, contracts, and assets from the command line. -- build, deploy and interact with contracts -- set identities to sign with -- configure networks -- generate keys -- more! +- Generate and manage keys and accounts +- Build, deploy, and interact with contracts +- Deploy asset contracts +- Stream events +- Start local testnets +- Decode, encode XDR +- More! For additional information see: @@ -18,21 +20,21 @@ For additional information see: - Smart Contract Docs: https://developers.stellar.org/docs/build/smart-contracts/overview - CLI Docs: https://developers.stellar.org/docs/tools/stellar-cli -The easiest way to get started is to generate a new identity: +To get started generate a new identity: stellar keys generate alice -You can use identities with the `--source` flag in other commands later. +Use keys with the `--source` flag in other commands. -Commands that relate to smart contract interactions are organized under the `contract` subcommand. List them: +Commands that work with contracts are organized under the `contract` subcommand. List them: stellar contract --help -A Soroban contract has its interface schema types embedded in the binary that gets deployed on-chain, making it possible to dynamically generate a custom CLI for each. The invoke subcommand makes use of this: +Use contracts like a CLI: stellar contract invoke --id CCR6QKTWZQYW6YUJ7UP7XXZRLWQPFRV6SWBLQS4ZQOSAF4BOUD77OTE2 --source alice --network testnet -- --help -Anything after the `--` double dash (the "slop") is parsed as arguments to the contract-specific CLI, generated on-the-fly from the embedded schema. For the hello world example, with a function called `hello` that takes one string argument `to`, here's how you invoke it: +Anything after the `--` double dash (the "slop") is parsed as arguments to the contract-specific CLI, generated on-the-fly from the contract schema. For the hello world example, with a function called `hello` that takes one string argument `to`, here's how you invoke it: stellar contract invoke --id CCR6QKTWZQYW6YUJ7UP7XXZRLWQPFRV6SWBLQS4ZQOSAF4BOUD77OTE2 --source alice --network testnet -- hello --to world @@ -41,15 +43,15 @@ Anything after the `--` double dash (the "slop") is parsed as arguments to the c ###### **Subcommands:** -* `completion` — Print shell completion code for the specified shell * `contract` — Tools for smart contract developers * `events` — Watch the network for contract events * `keys` — Create and manage identities including keys and addresses -* `xdr` — Decode and encode XDR * `network` — Start and configure networks -* `version` — Print version information * `tx` — Sign, Simulate, and Send transactions +* `xdr` — Decode and encode XDR +* `completion` — Print shell completion code for the specified shell * `cache` — Cache for transactions and contract specs +* `version` — Print version information ###### **Options:** @@ -64,28 +66,6 @@ Anything after the `--` double dash (the "slop") is parsed as arguments to the c -## `stellar completion` - -Print shell completion code for the specified shell - -Ensure the completion package for your shell is installed, e.g. bash-completion for bash. - -To enable autocomplete in the current bash shell, run: `source <(stellar completion --shell bash)` - -To enable autocomplete permanently, run: `echo "source <(stellar completion --shell bash)" >> ~/.bashrc` - - -**Usage:** `stellar completion --shell ` - -###### **Options:** - -* `--shell ` — The shell type - - Possible values: `bash`, `elvish`, `fish`, `powershell`, `zsh` - - - - ## `stellar contract` Tools for smart contract developers @@ -818,169 +798,6 @@ Given an identity return its private key -## `stellar xdr` - -Decode and encode XDR - -**Usage:** `stellar xdr [CHANNEL] ` - -###### **Subcommands:** - -* `types` — View information about types -* `guess` — Guess the XDR type -* `decode` — Decode XDR -* `encode` — Encode XDR -* `version` — Print version information - -###### **Arguments:** - -* `` — Channel of XDR to operate on - - Default value: `+curr` - - Possible values: `+curr`, `+next` - - - - -## `stellar xdr types` - -View information about types - -**Usage:** `stellar xdr types ` - -###### **Subcommands:** - -* `list` — -* `schema` — - - - -## `stellar xdr types list` - -**Usage:** `stellar xdr types list [OPTIONS]` - -###### **Options:** - -* `--output ` - - Default value: `plain` - - Possible values: `plain`, `json`, `json-formatted` - - - - -## `stellar xdr types schema` - -**Usage:** `stellar xdr types schema [OPTIONS] --type ` - -###### **Options:** - -* `--type ` — XDR type to decode -* `--output ` - - Default value: `json-schema-draft201909` - - Possible values: `json-schema-draft7`, `json-schema-draft201909` - - - - -## `stellar xdr guess` - -Guess the XDR type - -**Usage:** `stellar xdr guess [OPTIONS] [FILE]` - -###### **Arguments:** - -* `` — File to decode, or stdin if omitted - -###### **Options:** - -* `--input ` - - Default value: `single-base64` - - Possible values: `single`, `single-base64`, `stream`, `stream-base64`, `stream-framed` - -* `--output ` - - Default value: `list` - - Possible values: `list` - -* `--certainty ` — Certainty as an arbitrary value - - Default value: `2` - - - -## `stellar xdr decode` - -Decode XDR - -**Usage:** `stellar xdr decode [OPTIONS] --type [FILES]...` - -###### **Arguments:** - -* `` — Files to decode, or stdin if omitted - -###### **Options:** - -* `--type ` — XDR type to decode -* `--input ` - - Default value: `stream-base64` - - Possible values: `single`, `single-base64`, `stream`, `stream-base64`, `stream-framed` - -* `--output ` - - Default value: `json` - - Possible values: `json`, `json-formatted`, `rust-debug`, `rust-debug-formatted` - - - - -## `stellar xdr encode` - -Encode XDR - -**Usage:** `stellar xdr encode [OPTIONS] --type [FILES]...` - -###### **Arguments:** - -* `` — Files to encode, or stdin if omitted - -###### **Options:** - -* `--type ` — XDR type to encode -* `--input ` - - Default value: `json` - - Possible values: `json` - -* `--output ` - - Default value: `single-base64` - - Possible values: `single`, `single-base64` - - - - -## `stellar xdr version` - -Print version information - -**Usage:** `stellar xdr version` - - - ## `stellar network` Start and configure networks @@ -1189,14 +1006,6 @@ Stop a network started with `network container start`. For example, if you ran ` -## `stellar version` - -Print version information - -**Usage:** `stellar version` - - - ## `stellar tx` Sign, Simulate, and Send transactions @@ -1227,6 +1036,191 @@ Simulate a transaction envelope from stdin +## `stellar xdr` + +Decode and encode XDR + +**Usage:** `stellar xdr [CHANNEL] ` + +###### **Subcommands:** + +* `types` — View information about types +* `guess` — Guess the XDR type +* `decode` — Decode XDR +* `encode` — Encode XDR +* `version` — Print version information + +###### **Arguments:** + +* `` — Channel of XDR to operate on + + Default value: `+curr` + + Possible values: `+curr`, `+next` + + + + +## `stellar xdr types` + +View information about types + +**Usage:** `stellar xdr types ` + +###### **Subcommands:** + +* `list` — +* `schema` — + + + +## `stellar xdr types list` + +**Usage:** `stellar xdr types list [OPTIONS]` + +###### **Options:** + +* `--output ` + + Default value: `plain` + + Possible values: `plain`, `json`, `json-formatted` + + + + +## `stellar xdr types schema` + +**Usage:** `stellar xdr types schema [OPTIONS] --type ` + +###### **Options:** + +* `--type ` — XDR type to decode +* `--output ` + + Default value: `json-schema-draft201909` + + Possible values: `json-schema-draft7`, `json-schema-draft201909` + + + + +## `stellar xdr guess` + +Guess the XDR type + +**Usage:** `stellar xdr guess [OPTIONS] [FILE]` + +###### **Arguments:** + +* `` — File to decode, or stdin if omitted + +###### **Options:** + +* `--input ` + + Default value: `single-base64` + + Possible values: `single`, `single-base64`, `stream`, `stream-base64`, `stream-framed` + +* `--output ` + + Default value: `list` + + Possible values: `list` + +* `--certainty ` — Certainty as an arbitrary value + + Default value: `2` + + + +## `stellar xdr decode` + +Decode XDR + +**Usage:** `stellar xdr decode [OPTIONS] --type [FILES]...` + +###### **Arguments:** + +* `` — Files to decode, or stdin if omitted + +###### **Options:** + +* `--type ` — XDR type to decode +* `--input ` + + Default value: `stream-base64` + + Possible values: `single`, `single-base64`, `stream`, `stream-base64`, `stream-framed` + +* `--output ` + + Default value: `json` + + Possible values: `json`, `json-formatted`, `rust-debug`, `rust-debug-formatted` + + + + +## `stellar xdr encode` + +Encode XDR + +**Usage:** `stellar xdr encode [OPTIONS] --type [FILES]...` + +###### **Arguments:** + +* `` — Files to encode, or stdin if omitted + +###### **Options:** + +* `--type ` — XDR type to encode +* `--input ` + + Default value: `json` + + Possible values: `json` + +* `--output ` + + Default value: `single-base64` + + Possible values: `single`, `single-base64` + + + + +## `stellar xdr version` + +Print version information + +**Usage:** `stellar xdr version` + + + +## `stellar completion` + +Print shell completion code for the specified shell + +Ensure the completion package for your shell is installed, e.g. bash-completion for bash. + +To enable autocomplete in the current bash shell, run: `source <(stellar completion --shell bash)` + +To enable autocomplete permanently, run: `echo "source <(stellar completion --shell bash)" >> ~/.bashrc` + + +**Usage:** `stellar completion --shell ` + +###### **Options:** + +* `--shell ` — The shell type + + Possible values: `bash`, `elvish`, `fish`, `powershell`, `zsh` + + + + ## `stellar cache` Cache for transactions and contract specs @@ -1296,3 +1290,11 @@ Read cached action +## `stellar version` + +Print version information + +**Usage:** `stellar version` + + +