You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-src/astra-cli-core/modules/ROOT/pages/getting-started.adoc
+32-29Lines changed: 32 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,54 +1,58 @@
1
-
= Getting Started with {astra_cli}
1
+
= Getting started with {astra_cli}
2
2
3
-
Read this topic to learn how to get started with {astra_cli}.
3
+
Initialize the Astra CLI and run your first commands.
4
4
5
-
== Setup
5
+
[#get-credentials]
6
+
== Retrieve your application token
6
7
7
-
Before issuing CLI `astra` commands, initialize the configuration file `~/.astrarc`.
8
-
Run the following command.
9
-
You will be asked to provide your token, which begins with `AstraCS:\...`.
10
-
The token will be saved so that you're authorized to run the CLI commands.
8
+
The Astra CLI requires an _application token_ to authenticate with Astra.
9
+
For instructions on how to create an application token, see xref:astra-db-serverless:administration:manage-application-tokens.adoc[].
11
10
12
-
[source,bash]
11
+
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.
12
+
13
+
== Set up a new configuration
14
+
15
+
Use the `astra setup` command to initialize the Astra CLI:
16
+
17
+
[source,bash,subs="verbatim,quotes"]
13
18
----
14
-
astra setup
19
+
astra setup --token *APPLICATION_TOKEN*
15
20
----
16
21
17
-
Output:
22
+
Replace `*APPLICATION_TOKEN*` with your <<get-credentials,application token>>.
23
+
The token format is `AstraCS:` followed by a unique token string.
18
24
25
+
.Result
26
+
[%collapsible]
27
+
====
19
28
[source,bash]
20
29
----
21
-
_____ __
22
-
/ _ \ _______/ |_____________
23
-
/ /_\ \ / ___/\ __\_ __ \__ \
24
-
/ | \\___ \ | | | | \// __ \_
25
-
\____|__ /____ > |__| |__| (____ /
26
-
\/ \/ \/
27
-
28
-
------------------------
29
-
--- SETUP ---
30
-
------------------------
31
-
32
-
🔑 Enter token (starting with AstraCS...):
30
+
[OK] Configuration has been saved.
31
+
[OK] Setup completed.
32
+
[INFO] Enter 'astra help' to list available commands.
33
33
----
34
+
====
35
+
36
+
The Astra CLI is now initialized and ready to use.
34
37
35
-
You are all set.
36
-
The configuration (mainly your token) is stored in file `~/.astrarc`.
38
+
The Astra CLI configuration, including your application token, is stored in `~/.astrarc`.
39
+
The information in this file is used whenever you run the `astra` command.
37
40
41
+
[#first-commands]
38
42
== First commands
39
43
40
-
* Display current version of the cli, validating setup is complete.
44
+
* Display the current version of the CLI.
41
45
42
46
[source,bash]
43
47
----
44
48
astra --version
45
49
----
46
50
47
-
* Display your configuration list.
51
+
* Display your configuration list, validating setup is complete.
0 commit comments