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
Astra CLI provides a command line interface in a terminal to operate DataStax Astra. The goal is to offer access to any feature without accessing the user interface.
6
+
Astra CLI provides a terminal interface to operate DataStax Astra. The goal is to offer access to any feature without accessing the user interface.
7
+
8
+

7
9
8
10
> This is the README for the new 1.0.0 (beta) version of the Astra CLI. See the README for the previous version [here](https://github.com/datastax/astra-cli/tree/0.x?tab=readme-ov-file#astra-cli).
9
11
@@ -18,8 +20,8 @@ Astra CLI provides a command line interface in a terminal to operate DataStax As
18
20
-[Customization](#customization)
19
21
-[Home folder location](#home-folder-location)
20
22
-[`.astrarc` location](#astrarc-location)
21
-
-[Response format](#response-format)
22
-
-[Output level](#output-level)
23
+
-[Output format](#output-format)
24
+
-[Output style](#output-style)
23
25
-[What's new](#whats-new)
24
26
-[Windows support](#windows-support)
25
27
-[Improved output and interactivity](#improved-output-and-interactivity)
@@ -83,7 +85,7 @@ You can also download a specific version, or the latest prerelease version, usin
83
85
84
86
```bash
85
87
# Upgrade (or downgrade!) to a specific version
86
-
astra upgrade --version 1.0.0-rc-2
88
+
astra upgrade --version 1.0.0-rc.4
87
89
88
90
# Upgrade to the latest prerelease version
89
91
astra upgrade --pre
@@ -120,7 +122,7 @@ After installation, run `astra setup` to interactively set up your credentials i
120
122
astra setup
121
123
```
122
124
123
-
The `astra config` subcommands can be further used to manager your configuration profiles.
125
+
The `astra config` subcommands can be further used to manage your configuration profiles.
124
126
125
127
### Using the CLI without a credentials file
126
128
@@ -145,18 +147,18 @@ astra db list --token <your_token> [--env <your_env>]
145
147
146
148
### Home folder location
147
149
148
-
The Astra CLI uses a singular home folder to store various data, such as downloaded programs, secure connect bundles, completions caches, etc.
150
+
The Astra CLI uses a single home folder to store various data, such as downloaded programs, secure connect bundles, completions caches, etc.
149
151
150
152
By default, this folder is located at either `$XDG_DATA_HOME/astra` (if the `XDG_DATA_HOME` environment variable is set), or at `~/.astra` (if not).
151
153
152
154
You can override this location by setting the `ASTRA_HOME` environment variable to your desired path.
@@ -565,6 +567,14 @@ Some commands, namely the ones that build on `cqlsh`, `dsbulk`, and `pulsar-shel
565
567
566
568
<details>
567
569
<summary><strong>pulsar-shell</strong></summary>
570
+
571
+
Similar to `cqlsh` and `dsbulk`, the pulsar-shell commands have been organized under the `astra streaming pulsar` subcommand.
572
+
573
+
The available commands include:
574
+
- `astra streaming pulsar shell` – Launch an interactive Apache Pulsar shell session for a streaming tenant
575
+
- Supports `-e <statement>` and `-f <file>` flags for non-interactive execution
576
+
- `astra streaming pulsar version` – Prints the version of `pulsar-shell` that is used by the CLI
577
+
- `astra streaming pulsar path` – Prints the path to the `pulsar-shell` binary, installing it if necessary
568
578
</details>
569
579
570
580
### XDG spec compliance
@@ -575,18 +585,63 @@ The Astra CLI will now respect the `$XDG_DATA_HOME` and `$XDG_CONFIG_HOME` envir
575
585
576
586
<details>
577
587
<summary>Other minor changes (not exhaustive)</summary>
578
-
<li> automatically patch cqlsh script to work on machines with a newer python version as default by testing for older python versions explicitly
579
-
<li> consistent support of the `--output` flag across all commands–either a format is supported, or the command will error out before doing anything
580
-
<li> removed `astra-init` script in favor of the `astra compgen`command
581
-
<li> removed `astra login` since it was just an alias of `astra setup`
582
-
<li>`setup`command has been completely rewritten and improved to be much more interactive and user-friendly
583
-
<li> fewer API calls will be made due to better internal caching and logic (commands may be much faster now!)
584
-
<li> fixed inconsistent shell coloring in places (--no-color now definitively works everywhere)
585
-
<li> fixed issues with not being able to use IDs in place of names in some places (e.g. `db delete [id]`)
586
-
<li> timeout durations can now be parsed using iso8601 durations or with simple time units (ms, s, m, h)
587
-
<li> .astrarc parsing is stricter now
588
-
<li> improved .env + .ini parsing + printing
589
-
<li> and more.
588
+
<ul>
589
+
<li>automatically patch cqlsh script to work on machines with a newer python version as default by testing for older python versions explicitly</li>
590
+
<li>consistent support of the `--output` flag across all commands–either a format is supported, or the command will error out before doing anything</li>
591
+
<li>removed `astra-init` script in favor of the `astra compgen` command</li>
592
+
<li>removed `astra login` since it was just an alias of `astra setup`</li>
593
+
<li>`setup`command has been completely rewritten and improved to be much more interactive and user-friendly</li>
594
+
<li>fewer API calls will be made due to better internal caching and logic (commands may be much faster now!)</li>
595
+
<li>fixed inconsistent shell coloring in places (--no-color now definitively works everywhere)</li>
596
+
<li>fixed issues with not being able to use IDs in place of names in some places (e.g. `db delete [id]`)</li>
597
+
<li>timeout durations can now be parsed using iso8601 durations or with simple time units (ms, s, m, h)</li>
598
+
<li>.astrarc parsing is stricter now</li>
599
+
<li>improved .env + .ini parsing + printing</li>
600
+
<li>and more.</li>
601
+
</ul>
590
602
</details>
591
603
592
604
## Troubleshooting
605
+
606
+
### Common issues
607
+
608
+
**MacOS security warnings**
609
+
610
+
If you get an "unidentified developer" error on macOS, see the [macOS warning section](#-macos-warning) above.
611
+
612
+
**Authentication failures**
613
+
614
+
If commands fail with authentication errors:
615
+
- Verify your token is valid and hasn't expired
616
+
- Check that you're using the correct environment (`--env` flag)
617
+
- Run `astra config list` to verify your configuration profile settings
618
+
- Try running `astra setup` again to reconfigure your credentials
619
+
620
+
**External programs not working (cqlsh, dsbulk, pulsar-shell)**
621
+
622
+
If external programs fail to download or execute:
623
+
- Check your internet connection
624
+
- Verify you have write permissions to your `ASTRA_HOME` directory
625
+
- Try removing the cached binary and letting the CLI re-download it:
626
+
```bash
627
+
# Find the path first
628
+
astra db cqlsh path # (or dsbulk path, or streaming pulsar path)
629
+
# Then remove the parent directory and try again
630
+
```
631
+
632
+
**Finding your configuration files**
633
+
634
+
If you're unsure where your `.astrarc` file or home folder is located, or if you're getting warnings about multiple paths:
635
+
- Run `astra config path` to see where your `.astrarc` file is (or would be) located
636
+
- Run `astra config home path` to see where your Astra home folder is located
637
+
- If you see warnings about multiple `.astrarc` files or home folders existing in different locations:
638
+
- Remove or migrate the lower priority files/folders (priority: custom env var > XDG spec > default home directory)
639
+
- Or, suppress the warning by setting `ASTRA_IGNORE_MULTIPLE_PATHS=true`
640
+
641
+
**General debugging**
642
+
643
+
For any issues:
644
+
- Use the `--verbose` flag to see detailed output
645
+
- Use the `--dump-logs` flag to save logs to a file for later inspection
646
+
- Check the [GitHub issues](https://github.com/datastax/astra-cli/issues) for similar problems
647
+
- Open a new issue if your problem isn't already reported
Write-Host"Error: An existing astra installation was already found."-ForegroundColor Red
190
-
Write-Host"An existing installation was found at $(Tildify (Split-Path$existingInstallPath))`n"
190
+
Write-Host"An existing installation was found at $(Tildify (Split-Path$existingInstallPath))`n"
191
191
Write-MultiColor-Texts @("-> ","(< astra-cli 1.x)"," Remove the existing installation manually and re-run this installer.") -Colors @("DarkCyan","DarkGray","Gray")
192
192
Write-MultiColor-Texts @("-> ","(> astra-cli 1.x)"," Run ","astra upgrade"," to automatically update to the latest version.") -Colors @("DarkCyan","DarkGray","Gray","DarkCyan","Gray")
193
193
Write-MultiColor-Texts @("-> ","(> astra-cli 1.x)"," Run ","astra nuke"," to completely remove the CLI and then re-run this installer.") -Colors @("DarkCyan","DarkGray","Gray","DarkCyan","Gray")
Copy file name to clipboardExpand all lines: src/main/java/com/dtsx/astra/cli/commands/ShellEnvCmd.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@
29
29
" @|blue:300 *|@ Enable shell completions",
30
30
" @|blue:300 *|@ Optionally set any other configuration environment variables.",
31
31
"",
32
-
"Intended to be added to your shell profile (@|code .zshrc|@, @|code .zprofile|@, @|code .bashrc|@, etc.), but you can technically just eval it in any shell session to get completions and update your PATH for that session.",
32
+
"Intended to be added to your shell profile (@|code .zprofile|@, @|code .bash_profile|@, @|code .profile|@, etc.), but you can technically just eval it in any shell session to get completions and update your PATH for that session.",
0 commit comments