NL-Cube is an offline-first, natural language analytics engine that transforms CSV and Parquet files into lightning-fast, pivotable data cubes powered by DuckDB — with full natural language querying built-in.
No cloud dependency. No setup hell. One binary. Your data, your control.
-
Natural Language Querying
Ask natural questions like "Show me top 5 regions by revenue in 2025" and get instant answers. -
Flexible Data Ingestion
Drop CSV or Parquet files into subject folders to populate your own database domains. -
Lightning-Fast Execution
Queries are translated into optimized DuckDB SQL and executed instantly. -
Embedded Visualization
Analyze, pivot, and visualize your data using an integrated FINOS Perspective front-end. -
Offline, Secure, Private
Runs entirely on your laptop or server. No mandatory cloud APIs. Full local control. -
Model Flexibility
Supports multiple LLM backends (local models via Ollama, or remote API access).
NL-Cube uses a modern architecture designed for performance and flexibility:
- Rust Backend: High-performance, reliable core functionality
- DuckDB: Lightning-fast embedded analytics database
- Multiple LLM Support: Ollama integration for local models, plus remote API options
- Axum Web Framework: Modern, async Rust web server
- Perspective Visualization: Interactive, high-performance data visualization
-
Create Subjects
Organize your datasets into logical domains called "Subjects." -
Drop Data
Add CSV or Parquet files. NL-Cube ingests them automatically. -
Ask Questions
Query your data in natural language. NL-Cube translates your question into SQL. -
Explore Results
Use the embedded Perspective UI to slice, dice, and visualize your answers.
Download the latest binary for your platform:
# Example for Linux
curl -L https://github.com/your-repo/nl-cube/releases/latest/download/nl-cube-linux-x86_64 -o nl-cube
chmod +x nl-cubeCreate a config.toml file or use command-line options:
data_dir = "data"
[database]
connection_string = "nl-cube.db"
pool_size = 5
[web]
host = "127.0.0.1"
port = 3000
[llm]
backend = "ollama"
model = "sqlcoder"
api_url = "http://localhost:11434/api/generate"./nl-cube --config config.tomlThen open your browser to http://localhost:3000
- Click "New Database" in the Databases dropdown
- Enter a name for your database (e.g., "sales")
- Upload CSV or Parquet files containing your data
- Select your database from the dropdown
- Type a natural language question in the query box
- Click "Run Query" or press Ctrl+Enter
Example questions:
- "What are the top 5 products by revenue?"
- "Show me monthly sales for 2024"
- "Compare average order value by region"
After running a query:
- Click on "Save Report" in the Reports dropdown
- Give your report a name and category
- Access saved reports from the Reports dropdown anytime
- Rust 1.75+ (2024 edition)
- Ollama for local LLM support
# Clone the repository
git clone https://github.com/your-repo/nl-cube.git
cd nl-cube
# Build in release mode
cargo build --release
# Run the application
./target/release/nl-cubesrc/- Rust source codeconfig.rs- Configuration managementdb/- DuckDB connection and schema managementingest/- File ingestion (CSV, Parquet)llm/- Language model integrationweb/- Web server and API
static/- Frontend assetsjs/- JavaScript modulescss/- Stylingindex.html- Main application page
NL-Cube supports multiple LLM backends:
For offline, local execution:
[llm]
backend = "ollama"
model = "sqlcoder" # or another SQL-oriented model
api_url = "http://localhost:11434/api/generate"For remote LLM APIs:
[llm]
backend = "remote"
model = "model-name"
api_key = "your-api-key"
api_url = "https://api.provider.com/v1/generate"NL-Cube is designed for data analysts, engineers, and builders who want:
- Zero cloud lock-in
- True local-first analytics
- Full control over how their data is queried and presented
- Natural language interface to technical data
If you can describe it in plain language, NL-Cube will help you analyze it.
NL-Cube is licensed under the Apache 2 License.
NL-Cube: "Your data. Your questions. Your machine."