sqlsaber 0.18.0__tar.gz → 0.20.0__tar.gz

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.

Files changed (108) hide show
  1. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/PKG-INFO +2 -1
  2. sqlsaber-0.20.0/docs/CLAUDE.md +40 -0
  3. sqlsaber-0.20.0/docs/astro.config.mjs +57 -0
  4. sqlsaber-0.18.0/CHANGELOG.md → sqlsaber-0.20.0/docs/src/content/docs/changelog.md +83 -60
  5. sqlsaber-0.20.0/docs/src/content/docs/guides/authentication.mdx +135 -0
  6. sqlsaber-0.20.0/docs/src/content/docs/guides/database-setup.mdx +151 -0
  7. sqlsaber-0.20.0/docs/src/content/docs/guides/getting-started.mdx +161 -0
  8. sqlsaber-0.20.0/docs/src/content/docs/guides/memory.mdx +127 -0
  9. sqlsaber-0.20.0/docs/src/content/docs/guides/models.mdx +78 -0
  10. sqlsaber-0.20.0/docs/src/content/docs/guides/queries.mdx +144 -0
  11. sqlsaber-0.20.0/docs/src/content/docs/guides/threads.md +69 -0
  12. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/src/content/docs/index.mdx +6 -6
  13. sqlsaber-0.20.0/docs/src/content/docs/installation.mdx +72 -0
  14. sqlsaber-0.20.0/docs/src/content/docs/reference/commands.md +360 -0
  15. sqlsaber-0.20.0/legislators.db +0 -0
  16. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/pyproject.toml +2 -1
  17. sqlsaber-0.20.0/sqlsaber.gif +0 -0
  18. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/commands.py +11 -41
  19. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/database.py +3 -1
  20. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/interactive.py +61 -20
  21. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/threads.py +14 -7
  22. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_cli/test_threads.py +12 -8
  23. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/uv.lock +906 -904
  24. sqlsaber-0.18.0/docs/astro.config.mjs +0 -38
  25. sqlsaber-0.18.0/docs/src/content/docs/guides/example.md +0 -11
  26. sqlsaber-0.18.0/docs/src/content/docs/reference/example.md +0 -11
  27. sqlsaber-0.18.0/sqlsaber.gif +0 -0
  28. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/.github/workflows/claude-code-review.yml +0 -0
  29. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/.github/workflows/claude.yml +0 -0
  30. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/.github/workflows/deploy-docs.yml +0 -0
  31. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/.github/workflows/publish.yml +0 -0
  32. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/.github/workflows/test.yml +0 -0
  33. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/.gitignore +0 -0
  34. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/.python-version +0 -0
  35. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/AGENT.md +0 -0
  36. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/CLAUDE.md +0 -0
  37. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/LICENSE +0 -0
  38. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/README.md +0 -0
  39. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/.gitignore +0 -0
  40. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/.vscode/extensions.json +0 -0
  41. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/.vscode/launch.json +0 -0
  42. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/package-lock.json +0 -0
  43. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/package.json +0 -0
  44. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/public/CNAME +0 -0
  45. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/public/favicon.svg +0 -0
  46. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/src/assets/sqlsaber-hero.svg +0 -0
  47. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/src/content.config.ts +0 -0
  48. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/src/styles/global.css +0 -0
  49. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/docs/tsconfig.json +0 -0
  50. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/pytest.ini +0 -0
  51. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/sqlsaber.svg +0 -0
  52. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/__init__.py +0 -0
  53. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/__main__.py +0 -0
  54. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/agents/__init__.py +0 -0
  55. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/agents/base.py +0 -0
  56. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/agents/mcp.py +0 -0
  57. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/agents/pydantic_ai_agent.py +0 -0
  58. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/__init__.py +0 -0
  59. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/auth.py +0 -0
  60. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/completers.py +0 -0
  61. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/display.py +0 -0
  62. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/memory.py +0 -0
  63. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/models.py +0 -0
  64. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/cli/streaming.py +0 -0
  65. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/config/__init__.py +0 -0
  66. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/config/api_keys.py +0 -0
  67. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/config/auth.py +0 -0
  68. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/config/database.py +0 -0
  69. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/config/oauth_flow.py +0 -0
  70. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/config/oauth_tokens.py +0 -0
  71. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/config/providers.py +0 -0
  72. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/config/settings.py +0 -0
  73. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/database/__init__.py +0 -0
  74. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/database/connection.py +0 -0
  75. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/database/resolver.py +0 -0
  76. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/database/schema.py +0 -0
  77. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/mcp/__init__.py +0 -0
  78. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/mcp/mcp.py +0 -0
  79. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/memory/__init__.py +0 -0
  80. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/memory/manager.py +0 -0
  81. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/memory/storage.py +0 -0
  82. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/threads/__init__.py +0 -0
  83. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/threads/storage.py +0 -0
  84. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/tools/__init__.py +0 -0
  85. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/tools/base.py +0 -0
  86. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/tools/enums.py +0 -0
  87. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/tools/instructions.py +0 -0
  88. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/tools/registry.py +0 -0
  89. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/src/sqlsaber/tools/sql_tools.py +0 -0
  90. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/__init__.py +0 -0
  91. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/conftest.py +0 -0
  92. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_cli/__init__.py +0 -0
  93. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_cli/test_auth_reset.py +0 -0
  94. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_cli/test_commands.py +0 -0
  95. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_config/__init__.py +0 -0
  96. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_config/test_database.py +0 -0
  97. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_config/test_oauth.py +0 -0
  98. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_config/test_providers.py +0 -0
  99. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_config/test_settings.py +0 -0
  100. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_database/__init__.py +0 -0
  101. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_database/test_connection.py +0 -0
  102. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_database_resolver.py +0 -0
  103. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_threads_storage.py +0 -0
  104. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_tools/__init__.py +0 -0
  105. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_tools/test_base.py +0 -0
  106. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_tools/test_instructions.py +0 -0
  107. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_tools/test_registry.py +0 -0
  108. {sqlsaber-0.18.0 → sqlsaber-0.20.0}/tests/test_tools/test_sql_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlsaber
3
- Version: 0.18.0
3
+ Version: 0.20.0
4
4
  Summary: SQLsaber - Open-source agentic SQL assistant
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.12
@@ -13,6 +13,7 @@ Requires-Dist: httpx>=0.28.1
13
13
  Requires-Dist: keyring>=25.6.0
14
14
  Requires-Dist: pandas>=2.0.0
15
15
  Requires-Dist: platformdirs>=4.0.0
16
+ Requires-Dist: prompt-toolkit>3.0.51
16
17
  Requires-Dist: pydantic-ai
17
18
  Requires-Dist: questionary>=2.1.0
18
19
  Requires-Dist: rich>=13.7.0
@@ -0,0 +1,40 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Commands
6
+
7
+ - **Development server**: `npm run dev` or `npm start`
8
+ - **Build documentation**: `npm run build`
9
+ - **Preview built site**: `npm run preview`
10
+
11
+ ## Architecture
12
+
13
+ - **Documentation Site**: Built with Astro and Starlight for SQLsaber project documentation
14
+ - **Framework**: Astro 5.x with Starlight integration for documentation structure
15
+ - **Styling**: TailwindCSS 4.x with Starlight-specific Tailwind integration
16
+ - **Content**: MDX files in `src/content/docs/` for documentation pages
17
+ - **Assets**: Static images and SVGs in `src/assets/` and `public/`
18
+
19
+ ## Project Context
20
+
21
+ This is the documentation website (`/docs`) for SQLsaber, an open-source agentic SQL assistant. The main SQLsaber Python project is in the parent directory with its own development workflow using uv/Python.
22
+
23
+ Key documentation areas:
24
+ - Landing page: `src/content/docs/index.mdx` (splash template with hero section)
25
+ - Guides: `src/content/docs/guides/` (tutorial content)
26
+ - Reference: `src/content/docs/reference/` (API and technical reference)
27
+
28
+ ## Configuration Files
29
+
30
+ - `astro.config.mjs`: Main Astro configuration with Starlight integration
31
+ - `package.json`: Node.js dependencies and scripts
32
+ - `tsconfig.json`: TypeScript configuration for the Astro project
33
+ - Site URL configured for https://sqlsaber.com
34
+
35
+ ## Content Structure
36
+
37
+ - Starlight sidebar automatically generates from `src/content/docs/` structure
38
+ - Use `.mdx` extension for components in markdown
39
+ - Use components available via `@astrojs/starlight/components`
40
+ - Asciinema integration for terminal recordings/demos
@@ -0,0 +1,57 @@
1
+ // @ts-check
2
+
3
+ import starlight from "@astrojs/starlight";
4
+ import tailwindcss from "@tailwindcss/vite";
5
+ import { defineConfig } from "astro/config";
6
+
7
+ // https://astro.build/config
8
+ export default defineConfig({
9
+ integrations: [
10
+ starlight({
11
+ title: "SQLsaber",
12
+ customCss: ["./src/styles/global.css"],
13
+ social: [
14
+ {
15
+ icon: "github",
16
+ label: "GitHub",
17
+ href: "https://github.com/SarthakJariwala/sqlsaber",
18
+ },
19
+ ],
20
+ sidebar: [
21
+ {
22
+ label: "Getting Started",
23
+ items: [
24
+ { label: "Installation", slug: "installation" },
25
+ { label: "Quick Start", slug: "guides/getting-started" },
26
+ ],
27
+ },
28
+ {
29
+ label: "Guides",
30
+ items: [
31
+ { label: "Database Setup", slug: "guides/database-setup" },
32
+ { label: "Authentication", slug: "guides/authentication" },
33
+ { label: "Models", slug: "guides/models" },
34
+ { label: "Running Queries", slug: "guides/queries" },
35
+ { label: "Conversation Threads", slug: "guides/threads" },
36
+ { label: "Memory Management", slug: "guides/memory" },
37
+ ],
38
+ },
39
+ {
40
+ label: "Reference",
41
+ items: [
42
+ { label: "Commands", slug: "reference/commands" },
43
+ ],
44
+ },
45
+ {
46
+ label: "Project",
47
+ items: [
48
+ { label: "Changelog", slug: "changelog" },
49
+ ],
50
+ },
51
+ ],
52
+ }),
53
+ ],
54
+ vite: { plugins: [tailwindcss()] },
55
+
56
+ site: "https://sqlsaber.com",
57
+ });
@@ -1,18 +1,42 @@
1
- # Changelog
1
+ ---
2
+ title: Changelog
3
+ description: Release history and notable changes to SQLsaber
4
+ ---
2
5
 
3
6
  All notable changes to SQLsaber will be documented here.
4
7
 
5
- ## [Unreleased]
8
+ ### Unreleased
6
9
 
7
- ## [0.18.0] - 2025-09-08
10
+ ---
8
11
 
9
- ### Changed
12
+ ### v0.20.0 - 2025-09-10
13
+
14
+ #### Fixed
15
+
16
+ - Subcommand help visibility for nested apps
17
+ - Removed mouse support for user prompt
18
+ - Enabling mouse support disables terminal scrolling when user prompt is focused
19
+
20
+ ### v0.19.0 - 2025-09-09
21
+
22
+ #### Added
23
+
24
+ - Notable improvements to user prompt interface
25
+ - Ctrl+D to exit the application without having to use "/exit" or "/quit" slash command
26
+ - Display multiline input submission info as bottom toolbar
27
+ - Pressing up and down arrow keys now help navigate through prior user prompts
28
+ - Visual improvements to user prompt area
29
+ - Added mouse support - users can now click around text to edit
30
+
31
+ ### v0.18.0 - 2025-09-08
32
+
33
+ #### Changed
10
34
 
11
35
  - Improved CLI startup time
12
36
 
13
- ## [0.17.0] - 2025-09-08
37
+ ### v0.17.0 - 2025-09-08
14
38
 
15
- ### Added
39
+ #### Added
16
40
 
17
41
  - Conversation threads system for storing, displaying, and resuming conversations
18
42
  - Automatic thread creation for both interactive and non-interactive sessions
@@ -23,28 +47,28 @@ All notable changes to SQLsaber will be documented here.
23
47
  - Thread persistence with metadata (title, model, database, last activity)
24
48
  - Seamless resumption of conversation context and history
25
49
 
26
- ### Removed
50
+ #### Removed
27
51
 
28
52
  - Removed visualization tools and plotting capabilities
29
53
  - Removed PlotDataTool and uniplot dependency
30
54
  - Cleaned up visualization-related code from CLI, registry, and instructions
31
55
 
32
- ## [0.16.1] - 2025-09-04
56
+ ### v0.16.1 - 2025-09-04
33
57
 
34
- ### Added
58
+ #### Added
35
59
 
36
60
  - Compile python byte code during installation
37
61
  - Updated CLI help string
38
62
 
39
- ## [0.16.0] - 2025-09-04
63
+ ### v0.16.0 - 2025-09-04
40
64
 
41
- ### Added
65
+ #### Added
42
66
 
43
67
  - Migrated to Pydantic-AI agent runtime with model-agnostic interfaces
44
68
  - Added multi-provider model support: Anthropic, OpenAI, Google, Groq, Mistral, Cohere, Hugging Face
45
69
  - Provider registry tests to ensure invariants and alias normalization
46
70
 
47
- ### Changed
71
+ #### Changed
48
72
 
49
73
  - Reworked agents to use new pydantic-ai-based agent implementation
50
74
  - Updated CLI modules and settings to integrate provider selection and authentication
@@ -55,28 +79,28 @@ All notable changes to SQLsaber will be documented here.
55
79
  - Centralized provider definitions in `sqlsaber.config.providers` and refactored CLI, config, and agent code to use the registry (single source of truth)
56
80
  - Normalized provider aliases (e.g., `google-gla` → `google`) for consistent behavior across modules
57
81
 
58
- ### Removed
82
+ #### Removed
59
83
 
60
84
  - Deprecated custom `clients` module and Anthropic-specific client code
61
85
  - Removed legacy streaming and events modules and related tests
62
86
 
63
- ## [0.15.0] - 2025-08-18
87
+ ### v0.15.0 - 2025-08-18
64
88
 
65
- ### Added
89
+ #### Added
66
90
 
67
91
  - Tool abstraction system with centralized registry (new `Tool` base class, `ToolRegistry`, decorators)
68
92
  - Dynamic instruction generation system (`InstructionBuilder`)
69
93
  - Comprehensive test suite for the tools module
70
94
 
71
- ### Changed
95
+ #### Changed
72
96
 
73
97
  - Refactored agents to use centralized tool registry instead of hardcoded tools
74
98
  - Enhanced MCP server with dynamic tool registration
75
99
  - Moved core SQL functionality to dedicated tool classes
76
100
 
77
- ## [0.14.0] - 2025-08-01
101
+ ### v0.14.0 - 2025-08-01
78
102
 
79
- ### Added
103
+ #### Added
80
104
 
81
105
  - Local conversation storage between user and agent
82
106
  - Store conversation history persistently
@@ -85,49 +109,49 @@ All notable changes to SQLsaber will be documented here.
85
109
  - New GitHub Actions workflow for running tests
86
110
  - Updated code review workflow
87
111
 
88
- ### Fixed
112
+ #### Fixed
89
113
 
90
114
  - Fixed CLI commands test suite (#11)
91
115
 
92
- ### Changed
116
+ #### Changed
93
117
 
94
118
  - Removed schema caching from SchemaManager
95
119
  - Simplified schema introspection by removing cache logic
96
120
  - Direct database queries for schema information
97
121
 
98
- ## [0.13.0] - 2025-07-26
122
+ ### v0.13.0 - 2025-07-26
99
123
 
100
- ### Added
124
+ #### Added
101
125
 
102
126
  - Database resolver abstraction for unified connection handling
103
127
  - Extended `-d` flag to accept PostgreSQL and MySQL connection strings (e.g., `postgresql://user:pass@host:5432/db`)
104
128
  - Support for direct connection strings alongside existing file path and configured database support
105
129
  - Examples: `saber -d "postgresql://user:pass@host:5432/db" "show users"`
106
130
 
107
- ## [0.12.0] - 2025-07-23
131
+ ### v0.12.0 - 2025-07-23
108
132
 
109
- ### Added
133
+ #### Added
110
134
 
111
135
  - Add support for ad-hoc SQLite files via `--database`/`-d` flag
112
136
 
113
- ## [0.11.0] - 2025-07-09
137
+ ### v0.11.0 - 2025-07-09
114
138
 
115
- ### Changed
139
+ #### Changed
116
140
 
117
141
  - Removed row counting from `list_tables` tool for all database types
118
142
 
119
- ## [0.10.0] - 2025-07-08
143
+ ### v0.10.0 - 2025-07-08
120
144
 
121
- ### Added
145
+ #### Added
122
146
 
123
147
  - Support for reading queries from stdin via pipe operator
124
148
  - `echo 'show me all users' | saber` now works
125
149
  - `cat query.txt | saber` reads query from file via stdin
126
150
  - Allows integration with other command-line tools and scripts
127
151
 
128
- ## [0.9.0] - 2025-07-08
152
+ ### v0.9.0 - 2025-07-08
129
153
 
130
- ### Changed
154
+ #### Changed
131
155
 
132
156
  - Migrated from Typer to Cyclopts for CLI framework
133
157
  - Improved command structure and parameter handling
@@ -137,22 +161,22 @@ All notable changes to SQLsaber will be documented here.
137
161
  - `saber "question"` executes a single query (previously `saber query "question"`)
138
162
  - Removed the `query` subcommand for a cleaner interface
139
163
 
140
- ## [0.8.2] - 2025-07-08
164
+ ### v0.8.2 - 2025-07-08
141
165
 
142
- ## Changed
166
+ #### Changed
143
167
 
144
168
  - Updated formatting for final answer display
145
169
  - New ASCII art in interactive mode
146
170
 
147
- ## [0.8.1] - 2025-07-07
171
+ ### v0.8.1 - 2025-07-07
148
172
 
149
- ### Fixed
173
+ #### Fixed
150
174
 
151
175
  - Fixed OAuth validation logic to not require API key when Claude Pro OAuth is configured
152
176
 
153
- ## [0.8.0] - 2025-07-07
177
+ ### v0.8.0 - 2025-07-07
154
178
 
155
- ### Added
179
+ #### Added
156
180
 
157
181
  - OAuth support for Claude Pro/Max subscriptions
158
182
  - Authentication management with `saber auth` command
@@ -164,28 +188,27 @@ All notable changes to SQLsaber will be documented here.
164
188
  - New `clients` module with custom Anthropic API client
165
189
  - `AnthropicClient` for direct API communication
166
190
 
167
- ### Changed
191
+ #### Changed
168
192
 
169
193
  - Enhanced authentication system to support both API keys and OAuth tokens
170
194
  - Replaced Anthropic SDK with direct API implementation using httpx
171
195
  - Modernized type annotations throughout the codebase
172
196
  - Refactored query streaming into smaller, more maintainable functions
173
197
 
174
- ## [0.7.0] - 2025-07-01
198
+ ### v0.7.0 - 2025-07-01
175
199
 
176
- ### Added
200
+ #### Added
177
201
 
178
202
  - Table name autocomplete with "@" prefix in interactive mode
179
-
180
203
  - Type "@" followed by table name to get fuzzy matching completions
181
204
  - Supports schema-aware completions (e.g., "@sample" matches "public.sample")
182
205
 
183
206
  - Rich markdown display for assistant responses
184
207
  - After streaming completes, the final response is displayed as formatted markdown
185
208
 
186
- ## [0.6.0] - 2025-06-30
209
+ ### v0.6.0 - 2025-06-30
187
210
 
188
- ### Added
211
+ #### Added
189
212
 
190
213
  - Slash command autocomplete in interactive mode
191
214
  - Commands now use slash prefix: `/clear`, `/exit`, `/quit`
@@ -195,7 +218,7 @@ All notable changes to SQLsaber will be documented here.
195
218
  - Press Ctrl+C during query execution to gracefully cancel ongoing operations
196
219
  - Preserves conversation history up to the interruption point
197
220
 
198
- ### Changed
221
+ #### Changed
199
222
 
200
223
  - Updated table display for better readability: limit to first 15 columns on wide tables
201
224
  - Shows warning when columns are truncated
@@ -205,47 +228,47 @@ All notable changes to SQLsaber will be documented here.
205
228
  - `quit` → `/quit`
206
229
  - Removed default limit of 100. Now model will decide it.
207
230
 
208
- ## [0.5.0] - 2025-06-27
231
+ ### v0.5.0 - 2025-06-27
209
232
 
210
- ### Added
233
+ #### Added
211
234
 
212
235
  - Added support for plotting data from query results.
213
236
  - The agent can decide if plotting will useful and create a plot with query results.
214
237
  - Small updates to system prompt
215
238
 
216
- ## [0.4.1] - 2025-06-26
239
+ ### v0.4.1 - 2025-06-26
217
240
 
218
- ### Added
241
+ #### Added
219
242
 
220
243
  - Show connected database information at the start of a session
221
244
  - Update welcome message for clarity
222
245
 
223
- ## [0.4.0] - 2025-06-25
246
+ ### v0.4.0 - 2025-06-25
224
247
 
225
- ### Added
248
+ #### Added
226
249
 
227
250
  - MCP (Model Context Protocol) server support
228
251
  - `saber-mcp` console script for running MCP server
229
252
  - MCP tools: `get_databases()`, `list_tables()`, `introspect_schema()`, `execute_sql()`
230
253
  - Instructions and documentation for configuring MCP clients (Claude Code, etc.)
231
254
 
232
- ## [0.3.0] - 2025-06-25
255
+ ### v0.3.0 - 2025-06-25
233
256
 
234
- ### Added
257
+ #### Added
235
258
 
236
259
  - Support for CSV files as a database option: `saber query -d mydata.csv`
237
260
 
238
- ### Changed
261
+ #### Changed
239
262
 
240
263
  - Extracted tools to BaseSQLAgent for better inheritance across SQLAgents
241
264
 
242
- ### Fixed
265
+ #### Fixed
243
266
 
244
267
  - Fixed getting row counts for SQLite
245
268
 
246
- ## [0.2.0] - 2025-06-24
269
+ ### v0.2.0 - 2025-06-24
247
270
 
248
- ### Added
271
+ #### Added
249
272
 
250
273
  - SSL support for database connections during configuration
251
274
  - Memory feature similar to Claude Code
@@ -256,7 +279,7 @@ All notable changes to SQLsaber will be documented here.
256
279
  - Interactive questionary for all user interactions
257
280
  - Test suite implementation
258
281
 
259
- ### Changed
282
+ #### Changed
260
283
 
261
284
  - Package renamed from original name to sqlsaber
262
285
  - Better configuration handling
@@ -266,20 +289,20 @@ All notable changes to SQLsaber will be documented here.
266
289
  - Extracted table display functionality
267
290
  - Refactored and cleaned up codebase structure
268
291
 
269
- ### Fixed
292
+ #### Fixed
270
293
 
271
294
  - Fixed list_tables tool functionality
272
295
  - Fixed introspect schema tool
273
296
  - Fixed minor type checking errors
274
297
  - Check before adding new database to prevent duplicates
275
298
 
276
- ### Removed
299
+ #### Removed
277
300
 
278
301
  - Removed write support completely for security
279
302
 
280
- ## [0.1.0] - 2025-06-19
303
+ ### v0.1.0 - 2025-06-19
281
304
 
282
- ### Added
305
+ #### Added
283
306
 
284
307
  - First working version of SQLSaber
285
308
  - Streaming tool response and status messages
@@ -0,0 +1,135 @@
1
+ ---
2
+ title: Authentication
3
+ description: Configure LLM provider authentication for SQLsaber
4
+ ---
5
+
6
+ import { Aside } from '@astrojs/starlight/components';
7
+
8
+ SQLsaber supports multiple LLM providers.
9
+
10
+ ### Providers
11
+
12
+ SQLsaber supports the following LLM providers and authentication methods:
13
+
14
+ - **Anthropic** - API key or Claude Pro/Max subscription
15
+ - **OpenAI** - API key
16
+ - **Google** - API key
17
+ - **Groq** - API key
18
+ - **Mistral** - API key
19
+ - **Cohere** - API key
20
+ - **Hugging Face** - API key
21
+
22
+ <Aside type="note">
23
+ API keys and OAuth tokens securely using your operating system's credentials store.
24
+ </Aside>
25
+
26
+ ### Quick Setup
27
+
28
+ The fastest way to configure authentication:
29
+
30
+ ```bash
31
+ saber auth setup
32
+ ```
33
+
34
+ This interactive command will:
35
+ 1. Let you choose your AI provider
36
+ 2. Guide you through the authentication process
37
+ 3. Securely store your credentials
38
+
39
+ #### Anthropic
40
+
41
+ SQLsaber uses Claude Sonnet 4 by default and supports two authentication methods:
42
+
43
+ ##### Claude Pro/Max subscription (Recommended)
44
+
45
+ > If you have a Claude Pro or Max subscription, you can use it with SQLsaber:
46
+
47
+ 1. Run the setup:
48
+ ```bash
49
+ saber auth setup
50
+ ```
51
+ 2. Choose "Anthropic" as your provider
52
+ 3. Select "Claude Pro/Max (OAuth)" as the authentication method
53
+ 4. Follow the browser-based OAuth flow
54
+
55
+ ##### API Key
56
+
57
+ 1. Get an API key from [Anthropic Console](https://console.anthropic.com/)
58
+ 2. Run the setup:
59
+ ```bash
60
+ saber auth setup
61
+ ```
62
+ 3. Choose "Anthropic" as your provider
63
+ 4. Select "API key" as the authentication method
64
+ 5. Enter your API key when prompted
65
+
66
+ <Aside type="note">
67
+ Follow the same steps for setting up other providers.
68
+ </Aside>
69
+
70
+
71
+ ### Managing Authentication
72
+
73
+ #### Check Authentication Status
74
+
75
+ See which providers are configured:
76
+
77
+ ```bash
78
+ saber auth status
79
+ ```
80
+
81
+ This shows:
82
+ - Currently configured providers
83
+ - Authentication methods (API key vs OAuth)
84
+
85
+ #### Reset Authentication
86
+
87
+ To remove stored credentials for a provider:
88
+
89
+ ```bash
90
+ saber auth reset
91
+ ```
92
+
93
+ This will:
94
+ 1. Ask you to select which provider to reset
95
+ 2. Remove API keys from your OS credentials store
96
+
97
+ ### Multiple Providers
98
+
99
+ You can configure multiple providers and switch between them when selecting models. Each provider's credentials are stored securely and independently.
100
+
101
+ ### Environment Variables
102
+
103
+ You can also use environment variables for setting API keys.
104
+
105
+ Example:
106
+ ```bash
107
+ # Anthropic
108
+ export ANTHROPIC_API_KEY="your-api-key"
109
+
110
+ # OpenAI
111
+ export OPENAI_API_KEY="your-api-key"
112
+
113
+ # Google
114
+ export GOOGLE_API_KEY="your-api-key"
115
+ ```
116
+
117
+ Environment variables take precedence over stored credentials.
118
+
119
+ ### Getting Help
120
+
121
+ Check authentication status and configuration:
122
+
123
+ ```bash
124
+ saber auth status
125
+ saber auth --help
126
+ ```
127
+
128
+ ### What's Next?
129
+
130
+ After setting up authentication:
131
+
132
+ 1. [Configure your preferred models](/guides/models)
133
+ 2. [Set up database connections](/guides/database-setup)
134
+ 3. [Start querying your data](/guides/getting-started)
135
+ 4. [Learn about different query modes](/guides/queries)