Getting Started
This guide walks you through installing cqlsh-rs and connecting to your first Cassandra cluster.
Prerequisites
- A running Apache Cassandra, ScyllaDB, or compatible database
- Network access to the database’s native transport port (default: 9042)
Quick install
The fastest way to get started:
cargo install --git https://github.com/fruch/cqlsh-rs.git
See Installation for more options (Homebrew, Docker, pre-built binaries).
Connect to a cluster
# Connect to localhost:9042
cqlsh-rs
# Connect to a specific host
cqlsh-rs 10.0.0.1
# Connect to a specific host and port
cqlsh-rs 10.0.0.1 9043
Run your first query
Once connected, you’ll see the interactive prompt:
cqlsh>
Try a few commands:
-- Show cluster info
DESCRIBE CLUSTER;
-- List keyspaces
DESCRIBE KEYSPACES;
-- Query system tables
SELECT cluster_name, release_version FROM system.local;
Execute a single statement
Use -e to run a statement and exit:
cqlsh-rs -e "SELECT * FROM system.local"
Execute a CQL file
Use -f to run statements from a file:
cqlsh-rs -f schema.cql
Connect with authentication
cqlsh-rs -u cassandra -p cassandra
Connect with SSL/TLS
cqlsh-rs --ssl
See Configuration Reference for full SSL setup.
Use a specific keyspace
cqlsh-rs -k my_keyspace
Or switch keyspaces inside the shell:
USE my_keyspace;
Next steps
- CLI Reference — all command-line flags
- Command Reference — shell commands (DESCRIBE, COPY, etc.)
- Configuration Reference — cqlshrc file format
- Migration Guide — moving from Python cqlsh