Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

cqlsh

$ cqlsh Foundation High Risk
Apache Software Foundation · Database & Data · Apache-2.0 · macos / linux / windows

cqlsh is the official Python CQL command-line shell for Apache Cassandra and compatible databases such as ScyllaDB. It supports -e / --execute one-shot queries, --no-color, and SELECT JSON in CQL, though driver version constraints and interactive ergonomics make it heavier for agents.

FCRS-1.0 Score
69 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
pip install cqlsh
CLI vs MCP Decision CLI Preferred vs MCP

cqlsh speaks native CQL directly over port 9042 and handles bulk COPY TO/COPY FROM CSV transfers without MCP translation overhead.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 14 / 25

Supports -e / --execute and --no-color, but lacks a CLI --json flag (requires CQL SELECT JSON) and relies on text table output otherwise.

  • Supports -e and --no-color; structured JSON requires CQL SELECT JSON
Trust & Safety 17 / 25

Supports .cqlshrc credential isolation and TLS config, but has no --dry-run or --read-only CLI flag.

  • No --read-only or --dry-run flag; destructive CQL runs immediately
Setup & Portability 10 / 15

Installable via pip install cqlsh or bundled with Cassandra, though Python runtime and cassandra-driver compatibility frequently break across Python versions.

  • PyPI package cqlsh is sensitive to Python version and driver deps
Utility & Efficiency 12 / 15

Standard tool for quick CQL inspection and COPY TO/FROM CSV tasks, though startup is noticeably slow.

  • Supports CQL queries, DESCRIBE, and COPY CSV export/import
Maintenance & Lineage 9 / 10

Maintained by the Apache Software Foundation (apache/cassandra) under Apache-2.0.

  • Official Apache Cassandra project component
Docs & Verifiability 7 / 10

Documented in Apache Cassandra official docs and --help, though standalone PyPI cqlsh packaging lags behind server releases.

  • Official reference at cassandra.apache.org

Security, Auth & Guardrails

Auth Modes
No Auth Config File Env API Key
Credential Storage

Reads host, port, username, password, and TLS settings from ~/.cassandra/cqlshrc or --cqlshrc; supports CQLSH_HOST and CQLSH_PORT.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

100% free and Apache-2.0 open-source.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# cqlsh Agent Rules
- Always pass `-e "<cql>"` and `--no-color` so `cqlsh` exits after execution without ANSI noise.
- Use CQL `SELECT JSON ...` when structured output is needed.
- Never execute `TRUNCATE`, `DROP KEYSPACE`, or `DROP TABLE` without explicit approval.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run a one-shot CQL JSON query
cqlsh 127.0.0.1 9042 --no-color -e "SELECT JSON * FROM system_schema.keyspaces;"

Executes a read-only SELECT JSON CQL statement non-interactively with ANSI colors disabled.

Strengths for Agents

  • + Supports -e one-shot queries, --no-color, and CQL SELECT JSON for structured rows.
  • + Works consistently across Apache Cassandra, ScyllaDB, and Astra/managed CQL endpoints.

Caveats & Pitfalls

  • ! Standalone PyPI cqlsh often hits Python version and C-extension compatibility issues.
  • ! Lacks a native CLI --json flag and has noticeable Python startup latency.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI