From de862999f2e9c3ef415548b844170be3f448cc1c Mon Sep 17 00:00:00 2001 From: Gyan <61640241+gyan-sharma@users.noreply.github.com> Date: Sat, 19 Apr 2025 14:10:49 +0530 Subject: [PATCH] gyan/cli-documentation --- .../cli/command-reference.mdx | 1018 +++++++++++++ .../building-with-settlemint/cli/meta.json | 9 + .../cli/platform-components.mdx | 1351 +++++++++++++++++ .../docs/building-with-settlemint/meta.json | 3 +- 4 files changed, 2380 insertions(+), 1 deletion(-) create mode 100644 content/docs/building-with-settlemint/cli/command-reference.mdx create mode 100644 content/docs/building-with-settlemint/cli/meta.json create mode 100644 content/docs/building-with-settlemint/cli/platform-components.mdx diff --git a/content/docs/building-with-settlemint/cli/command-reference.mdx b/content/docs/building-with-settlemint/cli/command-reference.mdx new file mode 100644 index 00000000..817707a1 --- /dev/null +++ b/content/docs/building-with-settlemint/cli/command-reference.mdx @@ -0,0 +1,1018 @@ +--- +title: "Command reference" +description: CLI command reference for SettleMint platform +--- + +## Comprehensive Command Reference + +This reference provides detailed explanations of all SettleMint CLI commands, +their options, use cases, and examples. + +### Authentication Commands + +#### `settlemint login` + +This command authenticates your CLI session with the SettleMint platform. It is +the first command you should run before using any platform-specific +functionality. + +**Options:** + +- `--token-stdin`: Read the token from standard input instead of prompting. + + - **Valid values**: None (flag option) + - **Default**: Off (interactive prompt) + - **Usage guidance**: Use when automating deployments or in CI/CD pipelines. + +- `--accept-defaults`: Automatically accept default values without prompting. + + - **Valid values**: None (flag option) + - **Default**: Off (interactive prompts for confirmation) + - **Usage guidance**: Use in non-interactive scripts or to speed up login + process. + +- `--instance `: Specify which SettleMint instance to authenticate + with. + - **Valid values**: URL of your SettleMint instance + - **Default**: Value from .env file or the main SettleMint instance + - **Usage guidance**: Specify when logging into non-standard instances. + +**Example Usage:** + +```bash +# Interactive login +settlemint login + +# Non-interactive login with token from file +cat ~/my_token.txt | settlemint login --token-stdin --accept-defaults +``` + +#### `settlemint logout` + +This command terminates your authenticated session with the platform, removing +stored credentials and token information from your local environment. + +**Options:** + +- `--all`: Log out from all SettleMint instances you're currently authenticated + with. + - **Valid values**: None (flag option) + - **Default**: Off (logs out from the current/active instance only) + - **Usage guidance**: Use when switching between projects or instances, or + when you want to ensure all authentication tokens are removed from your + system. + +**Example Usage:** + +```bash +# Logout from current instance +settlemint logout + +# Logout from all instances +settlemint logout --all +``` + +### Project Setup Commands + +#### `settlemint connect` + +Links your local development environment to a specific SettleMint application, +enabling commands to target that application by default. + +**Options:** + +- `--prod`: Connect to production environment instead of development. + + - **Valid values**: None (flag option) + - **Default**: Off (connects to development environment) + - **Usage guidance**: Use when deploying to production or accessing production + resources. + +- `--accept-defaults`: Automatically accept default values without prompting. + + - **Valid values**: None (flag option) + - **Default**: Off (interactive prompts for confirmation) + - **Usage guidance**: Use in scripts or to speed up connection process. + +- `--instance `: Specify which SettleMint instance to connect to. + - **Valid values**: URL of your SettleMint instance + - **Default**: Value from .env file or the main SettleMint instance + - **Usage guidance**: Specify when connecting to non-standard instances. + +**Example Usage:** + +```bash +# Connect interactively +settlemint connect + +# Connect to production with defaults +settlemint connect --prod --accept-defaults +``` + +#### `settlemint create` + +Bootstraps a new project using SettleMint project templates, providing +pre-configured setups for various blockchain application types. + +**Options:** + +- `--project-name `: Name for the new project. + + - **Valid values**: Alphanumeric string (kebab-case recommended) + - **Default**: Interactive prompt + - **Usage guidance**: Choose a descriptive name that reflects your project's + purpose. + +- `--template