sqlsaber 0.11.0__py3-none-any.whl → 0.12.0__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 CHANGED
@@ -43,7 +43,7 @@ def meta_handler(
43
43
  str | None,
44
44
  cyclopts.Parameter(
45
45
  ["--database", "-d"],
46
- help="Database connection name (uses default if not specified)",
46
+ help="Database connection name or direct file path for CSV/SQLite files (uses default if not specified)",
47
47
  ),
48
48
  ] = None,
49
49
  ):
@@ -54,6 +54,8 @@ def meta_handler(
54
54
  saber # Start interactive mode
55
55
  saber "show me all users" # Run a single query with default database
56
56
  saber -d mydb "show me users" # Run a query with specific database
57
+ saber -d data.csv "show me users" # Run a query with ad-hoc CSV file
58
+ saber -d data.db "show me users" # Run a query with ad-hoc SQLite file
57
59
  echo "show me all users" | saber # Read query from stdin
58
60
  cat query.txt | saber # Read query from file via stdin
59
61
  """
@@ -73,7 +75,7 @@ def query(
73
75
  str | None,
74
76
  cyclopts.Parameter(
75
77
  ["--database", "-d"],
76
- help="Database connection name (uses default if not specified)",
78
+ help="Database connection name or direct file path for CSV/SQLite files (uses default if not specified)",
77
79
  ),
78
80
  ] = None,
79
81
  ):
@@ -88,6 +90,8 @@ def query(
88
90
  Examples:
89
91
  saber # Start interactive mode
90
92
  saber "show me all users" # Run a single query
93
+ saber -d data.csv "show users" # Run a query with ad-hoc CSV file
94
+ saber -d data.db "show users" # Run a query with ad-hoc SQLite file
91
95
  echo "show me all users" | saber # Read query from stdin
92
96
  """
93
97
 
@@ -101,7 +105,7 @@ def query(
101
105
  # If stdin was empty, fall back to interactive mode
102
106
  actual_query = None
103
107
 
104
- # Get database configuration or handle direct CSV file
108
+ # Get database configuration or handle direct file paths
105
109
  if database:
106
110
  # Check if this is a direct CSV file path
107
111
  if database.endswith(".csv"):
@@ -110,6 +114,13 @@ def query(
110
114
  raise CLIError(f"CSV file '{database}' not found.")
111
115
  connection_string = f"csv:///{csv_path}"
112
116
  db_name = csv_path.stem
117
+ # Check if this is a direct SQLite file path
118
+ elif database.endswith((".db", ".sqlite", ".sqlite3")):
119
+ sqlite_path = Path(database).expanduser().resolve()
120
+ if not sqlite_path.exists():
121
+ raise CLIError(f"SQLite file '{database}' not found.")
122
+ connection_string = f"sqlite:///{sqlite_path}"
123
+ db_name = sqlite_path.stem
113
124
  else:
114
125
  # Look up configured database connection
115
126
  db_config = config_manager.get_database(database)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlsaber
3
- Version: 0.11.0
3
+ Version: 0.12.0
4
4
  Summary: SQLSaber - Agentic SQL assistant like Claude Code
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.12
@@ -21,6 +21,15 @@ Description-Content-Type: text/markdown
21
21
 
22
22
  # SQLSaber
23
23
 
24
+ ```
25
+ ███████ ██████ ██ ███████ █████ ██████ ███████ ██████
26
+ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
27
+ ███████ ██ ██ ██ ███████ ███████ ██████ █████ ██████
28
+ ██ ██ ▄▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
29
+ ███████ ██████ ███████ ███████ ██ ██ ██████ ███████ ██ ██
30
+ ▀▀
31
+ ```
32
+
24
33
  > Use the agent Luke!
25
34
 
26
35
  SQLSaber is an agentic SQL assistant. Think Claude Code but for SQL.
@@ -7,7 +7,7 @@ sqlsaber/agents/mcp.py,sha256=FKtXgDrPZ2-xqUYCw2baI5JzrWekXaC5fjkYW1_Mg50,827
7
7
  sqlsaber/agents/streaming.py,sha256=LaSeMTlxuJFRArJVqDly5-_KgcePiCCKPKfMxfB4oGs,521
8
8
  sqlsaber/cli/__init__.py,sha256=qVSLVJLLJYzoC6aj6y9MFrzZvAwc4_OgxU9DlkQnZ4M,86
9
9
  sqlsaber/cli/auth.py,sha256=1yvawtS5NGj9dWMRZ8I5T6sqBiRqZpPsjEPrJSQBJAs,4979
10
- sqlsaber/cli/commands.py,sha256=84KpBtrcoprWVuQjlGuzR6D34Ep2fCf8G1pmxrThswE,6329
10
+ sqlsaber/cli/commands.py,sha256=rhbfpXNrWLQbiEEqn4GDwE175vhOWrfPiTRP32Ui7NM,7156
11
11
  sqlsaber/cli/completers.py,sha256=HsUPjaZweLSeYCWkAcgMl8FylQ1xjWBWYTEL_9F6xfU,6430
12
12
  sqlsaber/cli/database.py,sha256=tJ8rqGrafZpg3VgDmSiq7eZoPscoGAW3XLTYGoQw8LE,12910
13
13
  sqlsaber/cli/display.py,sha256=HtXwPe3VPUh2EJpyvpJVWyisCanu9O7w-rkqq7Y4UaY,9791
@@ -39,8 +39,8 @@ sqlsaber/memory/storage.py,sha256=ne8szLlGj5NELheqLnI7zu21V8YS4rtpYGGC7tOmi-s,57
39
39
  sqlsaber/models/__init__.py,sha256=RJ7p3WtuSwwpFQ1Iw4_DHV2zzCtHqIzsjJzxv8kUjUE,287
40
40
  sqlsaber/models/events.py,sha256=89SXKb5GGpH01yTr2kPEBhzp9xv35RFIYuFdAZSIPoE,721
41
41
  sqlsaber/models/types.py,sha256=w-zk81V2dtveuteej36_o1fDK3So428j3P2rAejU62U,862
42
- sqlsaber-0.11.0.dist-info/METADATA,sha256=WUEZEKsBOJDuB63AZi-Ra51JvZ7tBTlUYYHKH7RBYuQ,6150
43
- sqlsaber-0.11.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
- sqlsaber-0.11.0.dist-info/entry_points.txt,sha256=qEbOB7OffXPFgyJc7qEIJlMEX5RN9xdzLmWZa91zCQQ,162
45
- sqlsaber-0.11.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
46
- sqlsaber-0.11.0.dist-info/RECORD,,
42
+ sqlsaber-0.12.0.dist-info/METADATA,sha256=k_OjB22bXlyVvH_nPTEIBjLwwzmdsAntYs6_rl7LSzg,6877
43
+ sqlsaber-0.12.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
+ sqlsaber-0.12.0.dist-info/entry_points.txt,sha256=qEbOB7OffXPFgyJc7qEIJlMEX5RN9xdzLmWZa91zCQQ,162
45
+ sqlsaber-0.12.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
46
+ sqlsaber-0.12.0.dist-info/RECORD,,