diff --git a/docs-src/astra-cli-core/modules/ROOT/pages/getting-started.adoc b/docs-src/astra-cli-core/modules/ROOT/pages/getting-started.adoc index a2b03be..a2fb274 100644 --- a/docs-src/astra-cli-core/modules/ROOT/pages/getting-started.adoc +++ b/docs-src/astra-cli-core/modules/ROOT/pages/getting-started.adoc @@ -1,54 +1,58 @@ -= Getting Started with {astra_cli} += Getting started with {astra_cli} -Read this topic to learn how to get started with {astra_cli}. +Initialize the Astra CLI and run your first commands. -== Setup +[#get-credentials] +== Retrieve your application token -Before issuing CLI `astra` commands, initialize the configuration file `~/.astrarc`. -Run the following command. -You will be asked to provide your token, which begins with `AstraCS:\...`. -The token will be saved so that you're authorized to run the CLI commands. +The Astra CLI requires an _application token_ to authenticate with Astra. +For instructions on how to create an application token, see xref:astra-db-serverless:administration:manage-application-tokens.adoc[]. -[source,bash] +To increase the security of your Astra account, DataStax recommends that you grant your application token only the bare minimum xref:astra-db-serverless:administration:manage-database-access.adoc[permissions] required to perform the tasks you'll be running in Astra. + +== Set up a new configuration + +Use the `astra setup` command to initialize the Astra CLI: + +[source,bash,subs="verbatim,quotes"] ---- -astra setup +astra setup --token *APPLICATION_TOKEN* ---- -Output: +Replace `*APPLICATION_TOKEN*` with your <>. +The token format is `AstraCS:` followed by a unique token string. +.Result +[%collapsible] +==== [source,bash] ---- - _____ __ - / _ \ _______/ |_____________ - / /_\ \ / ___/\ __\_ __ \__ \ -/ | \\___ \ | | | | \// __ \_ -\____|__ /____ > |__| |__| (____ / - \/ \/ \/ - - ------------------------ - --- SETUP --- - ------------------------ - -🔑 Enter token (starting with AstraCS...): +[OK] Configuration has been saved. +[OK] Setup completed. +[INFO] Enter 'astra help' to list available commands. ---- +==== + +The Astra CLI is now initialized and ready to use. -You are all set. -The configuration (mainly your token) is stored in file `~/.astrarc`. +The Astra CLI configuration, including your application token, is stored in `~/.astrarc`. +The information in this file is used whenever you run the `astra` command. +[#first-commands] == First commands -* Display current version of the cli, validating setup is complete. +* Display the current version of the CLI. [source,bash] ---- astra --version ---- -* Display your configuration list. +* Display your configuration list, validating setup is complete. [source,bash] ---- -bash astra config list +astra config list ---- Output: @@ -58,8 +62,7 @@ Output: +-----------------------------------------+ | configuration | +-----------------------------------------+ - | default (cedrick.lunven@datastax.com) | - | cedrick.lunven@datastax.com | + | alex@altostrat.com | +-----------------------------------------+ ----