sqlsaber 0.4.0__py3-none-any.whl → 0.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of sqlsaber might be problematic. Click here for more details.
- sqlsaber/cli/commands.py +3 -0
- sqlsaber/cli/interactive.py +9 -6
- {sqlsaber-0.4.0.dist-info → sqlsaber-0.4.1.dist-info}/METADATA +36 -6
- {sqlsaber-0.4.0.dist-info → sqlsaber-0.4.1.dist-info}/RECORD +7 -7
- {sqlsaber-0.4.0.dist-info → sqlsaber-0.4.1.dist-info}/WHEEL +0 -0
- {sqlsaber-0.4.0.dist-info → sqlsaber-0.4.1.dist-info}/entry_points.txt +0 -0
- {sqlsaber-0.4.0.dist-info → sqlsaber-0.4.1.dist-info}/licenses/LICENSE +0 -0
sqlsaber/cli/commands.py
CHANGED
|
@@ -117,6 +117,9 @@ def query(
|
|
|
117
117
|
if query_text:
|
|
118
118
|
# Single query mode with streaming
|
|
119
119
|
streaming_handler = StreamingQueryHandler(console)
|
|
120
|
+
console.print(
|
|
121
|
+
f"[bold blue]Connected to:[/bold blue] {db_name} {agent._get_database_type_name()}\n"
|
|
122
|
+
)
|
|
120
123
|
await streaming_handler.execute_streaming_query(query_text, agent)
|
|
121
124
|
else:
|
|
122
125
|
# Interactive mode
|
sqlsaber/cli/interactive.py
CHANGED
|
@@ -20,21 +20,24 @@ class InteractiveSession:
|
|
|
20
20
|
|
|
21
21
|
def show_welcome_message(self):
|
|
22
22
|
"""Display welcome message for interactive mode."""
|
|
23
|
+
# Show database information
|
|
24
|
+
db_name = getattr(self.agent, "database_name", None) or "Unknown"
|
|
25
|
+
db_type = self.agent._get_database_type_name()
|
|
26
|
+
|
|
23
27
|
self.console.print(
|
|
24
28
|
Panel.fit(
|
|
25
29
|
"[bold green]SQLSaber - Use the agent Luke![/bold green]\n\n"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
30
|
+
"[bold]Your agentic SQL assistant.[/bold]\n\n\n"
|
|
31
|
+
"[dim]Use 'clear' to reset conversation, 'exit' or 'quit' to leave.[/dim]\n\n"
|
|
32
|
+
"[dim]Start a message with '#' to add something to agent's memory for this database.[/dim]",
|
|
29
33
|
border_style="green",
|
|
30
34
|
)
|
|
31
35
|
)
|
|
32
|
-
|
|
33
36
|
self.console.print(
|
|
34
|
-
"[
|
|
37
|
+
f"[bold blue]Connected to:[/bold blue] {db_name} ({db_type})\n"
|
|
35
38
|
)
|
|
36
39
|
self.console.print(
|
|
37
|
-
"[dim]
|
|
40
|
+
"[dim]Press Esc-Enter or Meta-Enter to submit your query.[/dim]\n"
|
|
38
41
|
)
|
|
39
42
|
|
|
40
43
|
async def run(self):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlsaber
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: SQLSaber - Agentic SQL assistant like Claude Code
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Requires-Python: >=3.12
|
|
@@ -24,7 +24,28 @@ Description-Content-Type: text/markdown
|
|
|
24
24
|
|
|
25
25
|
SQLSaber is an agentic SQL assistant. Think Claude Code but for SQL.
|
|
26
26
|
|
|
27
|
-
Ask your questions in natural language and it will gather the right context and answer your query by writing SQL and analyzing the results.
|
|
27
|
+
Ask your questions in natural language and it will gather the right context automatically and answer your query by writing SQL and analyzing the results.
|
|
28
|
+
|
|
29
|
+
## Table of Contents
|
|
30
|
+
|
|
31
|
+
- [Features](#features)
|
|
32
|
+
- [Installation](#installation)
|
|
33
|
+
- [Configuration](#configuration)
|
|
34
|
+
- [Database Connection](#database-connection)
|
|
35
|
+
- [AI Model Configuration](#ai-model-configuration)
|
|
36
|
+
- [Memory Management](#memory-management)
|
|
37
|
+
- [Usage](#usage)
|
|
38
|
+
- [Interactive Mode](#interactive-mode)
|
|
39
|
+
- [Single Query](#single-query)
|
|
40
|
+
- [Database Selection](#database-selection)
|
|
41
|
+
- [Examples](#examples)
|
|
42
|
+
- [MCP Server Integration](#mcp-server-integration)
|
|
43
|
+
- [Starting the MCP Server](#starting-the-mcp-server)
|
|
44
|
+
- [Configuring MCP Clients](#configuring-mcp-clients)
|
|
45
|
+
- [Available MCP Tools](#available-mcp-tools)
|
|
46
|
+
- [How It Works](#how-it-works)
|
|
47
|
+
- [Contributing](#contributing)
|
|
48
|
+
- [License](#license)
|
|
28
49
|
|
|
29
50
|
## Features
|
|
30
51
|
|
|
@@ -39,16 +60,25 @@ Ask your questions in natural language and it will gather the right context and
|
|
|
39
60
|
|
|
40
61
|
## Installation
|
|
41
62
|
|
|
63
|
+
### `uv`
|
|
64
|
+
|
|
42
65
|
```bash
|
|
43
66
|
uv tool install sqlsaber
|
|
44
67
|
```
|
|
45
68
|
|
|
46
|
-
|
|
69
|
+
### `pipx`
|
|
47
70
|
|
|
48
71
|
```bash
|
|
49
72
|
pipx install sqlsaber
|
|
50
73
|
```
|
|
51
74
|
|
|
75
|
+
### `brew`
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
brew install uv
|
|
79
|
+
uv tool install sqlsaber
|
|
80
|
+
```
|
|
81
|
+
|
|
52
82
|
## Configuration
|
|
53
83
|
|
|
54
84
|
### Database Connection
|
|
@@ -151,7 +181,7 @@ SQLSaber includes an MCP (Model Context Protocol) server that allows AI agents l
|
|
|
151
181
|
Run the MCP server using uvx:
|
|
152
182
|
|
|
153
183
|
```bash
|
|
154
|
-
uvx saber-mcp
|
|
184
|
+
uvx --from sqlsaber saber-mcp
|
|
155
185
|
```
|
|
156
186
|
|
|
157
187
|
### Configuring MCP Clients
|
|
@@ -161,12 +191,12 @@ uvx saber-mcp
|
|
|
161
191
|
Add SQLSaber as an MCP server in Claude Code:
|
|
162
192
|
|
|
163
193
|
```bash
|
|
164
|
-
claude mcp add -- uvx saber-mcp
|
|
194
|
+
claude mcp add -- uvx --from sqlsaber saber-mcp
|
|
165
195
|
```
|
|
166
196
|
|
|
167
197
|
#### Other MCP Clients
|
|
168
198
|
|
|
169
|
-
For other MCP clients, configure them to run the command: `uvx saber-mcp`
|
|
199
|
+
For other MCP clients, configure them to run the command: `uvx --from sqlsaber saber-mcp`
|
|
170
200
|
|
|
171
201
|
### Available MCP Tools
|
|
172
202
|
|
|
@@ -6,10 +6,10 @@ sqlsaber/agents/base.py,sha256=IuVyCaA7VsA92odfQS2_lYNzwIZwPxK55mL_xRewgwQ,6943
|
|
|
6
6
|
sqlsaber/agents/mcp.py,sha256=FKtXgDrPZ2-xqUYCw2baI5JzrWekXaC5fjkYW1_Mg50,827
|
|
7
7
|
sqlsaber/agents/streaming.py,sha256=_EO390-FHUrL1fRCNfibtE9QuJz3LGQygbwG3CB2ViY,533
|
|
8
8
|
sqlsaber/cli/__init__.py,sha256=qVSLVJLLJYzoC6aj6y9MFrzZvAwc4_OgxU9DlkQnZ4M,86
|
|
9
|
-
sqlsaber/cli/commands.py,sha256=
|
|
9
|
+
sqlsaber/cli/commands.py,sha256=Dw24W0jij-8t1lpk99C4PBTgzFSag6vU-FZcjAYGG54,5074
|
|
10
10
|
sqlsaber/cli/database.py,sha256=DUfyvNBDp47oFM_VAC_hXHQy_qyE7JbXtowflJpwwH8,12643
|
|
11
11
|
sqlsaber/cli/display.py,sha256=5J4AgJADmMwKi9Aq5u6_MKRO1TA6unS4F4RUfml_sfU,7651
|
|
12
|
-
sqlsaber/cli/interactive.py,sha256=
|
|
12
|
+
sqlsaber/cli/interactive.py,sha256=Kqe7kN9mhUiY_5z1Ki6apZ9ahs8uzhHp3xMZGiyTXpY,3912
|
|
13
13
|
sqlsaber/cli/memory.py,sha256=LW4ZF2V6Gw6hviUFGZ4ym9ostFCwucgBTIMZ3EANO-I,7671
|
|
14
14
|
sqlsaber/cli/models.py,sha256=3IcXeeU15IQvemSv-V-RQzVytJ3wuQ4YmWk89nTDcSE,7813
|
|
15
15
|
sqlsaber/cli/streaming.py,sha256=5QGAYTAvg9mzQLxDEVtdDH-TIbGfYYzMOLoOYPrHPu0,3788
|
|
@@ -28,8 +28,8 @@ sqlsaber/memory/storage.py,sha256=DvZBsSPaAfk_DqrNEn86uMD-TQsWUI6rQLfNw6PSCB8,57
|
|
|
28
28
|
sqlsaber/models/__init__.py,sha256=RJ7p3WtuSwwpFQ1Iw4_DHV2zzCtHqIzsjJzxv8kUjUE,287
|
|
29
29
|
sqlsaber/models/events.py,sha256=55m41tDwMsFxnKKA5_VLJz8iV-V4Sq3LDfta4VoutJI,737
|
|
30
30
|
sqlsaber/models/types.py,sha256=3U_30n91EB3IglBTHipwiW4MqmmaA2qfshfraMZyPps,896
|
|
31
|
-
sqlsaber-0.4.
|
|
32
|
-
sqlsaber-0.4.
|
|
33
|
-
sqlsaber-0.4.
|
|
34
|
-
sqlsaber-0.4.
|
|
35
|
-
sqlsaber-0.4.
|
|
31
|
+
sqlsaber-0.4.1.dist-info/METADATA,sha256=Jf17BrqK-2LdClq-VdYzhQ5jCsIN44rqsAsQ9kU4ClM,5938
|
|
32
|
+
sqlsaber-0.4.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
33
|
+
sqlsaber-0.4.1.dist-info/entry_points.txt,sha256=jmFo96Ylm0zIKXJBwhv_P5wQ7SXP9qdaBcnTp8iCEe8,195
|
|
34
|
+
sqlsaber-0.4.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
35
|
+
sqlsaber-0.4.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|