sqlsaber 0.17.0__tar.gz → 0.19.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.17.0 → sqlsaber-0.19.0}/PKG-INFO +2 -1
  2. sqlsaber-0.19.0/docs/CLAUDE.md +40 -0
  3. sqlsaber-0.19.0/docs/astro.config.mjs +57 -0
  4. sqlsaber-0.17.0/CHANGELOG.md → sqlsaber-0.19.0/docs/src/content/docs/changelog.md +80 -59
  5. sqlsaber-0.19.0/docs/src/content/docs/guides/authentication.mdx +135 -0
  6. sqlsaber-0.19.0/docs/src/content/docs/guides/database-setup.mdx +151 -0
  7. sqlsaber-0.19.0/docs/src/content/docs/guides/getting-started.mdx +161 -0
  8. sqlsaber-0.19.0/docs/src/content/docs/guides/memory.mdx +127 -0
  9. sqlsaber-0.19.0/docs/src/content/docs/guides/models.mdx +78 -0
  10. sqlsaber-0.19.0/docs/src/content/docs/guides/queries.mdx +144 -0
  11. sqlsaber-0.19.0/docs/src/content/docs/guides/threads.md +69 -0
  12. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/src/content/docs/index.mdx +6 -6
  13. sqlsaber-0.19.0/docs/src/content/docs/installation.mdx +72 -0
  14. sqlsaber-0.19.0/docs/src/content/docs/reference/commands.md +360 -0
  15. sqlsaber-0.19.0/legislators.db +0 -0
  16. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/pyproject.toml +2 -2
  17. sqlsaber-0.19.0/sqlsaber.gif +0 -0
  18. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/commands.py +51 -32
  19. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/interactive.py +45 -9
  20. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/database/connection.py +4 -1
  21. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/uv.lock +906 -904
  22. sqlsaber-0.17.0/docs/astro.config.mjs +0 -38
  23. sqlsaber-0.17.0/docs/src/content/docs/guides/example.md +0 -11
  24. sqlsaber-0.17.0/docs/src/content/docs/reference/example.md +0 -11
  25. sqlsaber-0.17.0/sqlsaber.gif +0 -0
  26. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/.github/workflows/claude-code-review.yml +0 -0
  27. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/.github/workflows/claude.yml +0 -0
  28. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/.github/workflows/deploy-docs.yml +0 -0
  29. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/.github/workflows/publish.yml +0 -0
  30. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/.github/workflows/test.yml +0 -0
  31. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/.gitignore +0 -0
  32. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/.python-version +0 -0
  33. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/AGENT.md +0 -0
  34. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/CLAUDE.md +0 -0
  35. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/LICENSE +0 -0
  36. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/README.md +0 -0
  37. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/.gitignore +0 -0
  38. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/.vscode/extensions.json +0 -0
  39. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/.vscode/launch.json +0 -0
  40. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/package-lock.json +0 -0
  41. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/package.json +0 -0
  42. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/public/CNAME +0 -0
  43. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/public/favicon.svg +0 -0
  44. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/src/assets/sqlsaber-hero.svg +0 -0
  45. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/src/content.config.ts +0 -0
  46. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/src/styles/global.css +0 -0
  47. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/docs/tsconfig.json +0 -0
  48. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/pytest.ini +0 -0
  49. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/sqlsaber.svg +0 -0
  50. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/__init__.py +0 -0
  51. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/__main__.py +0 -0
  52. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/agents/__init__.py +0 -0
  53. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/agents/base.py +0 -0
  54. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/agents/mcp.py +0 -0
  55. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/agents/pydantic_ai_agent.py +0 -0
  56. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/__init__.py +0 -0
  57. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/auth.py +0 -0
  58. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/completers.py +0 -0
  59. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/database.py +0 -0
  60. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/display.py +0 -0
  61. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/memory.py +0 -0
  62. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/models.py +0 -0
  63. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/streaming.py +0 -0
  64. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/cli/threads.py +0 -0
  65. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/config/__init__.py +0 -0
  66. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/config/api_keys.py +0 -0
  67. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/config/auth.py +0 -0
  68. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/config/database.py +0 -0
  69. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/config/oauth_flow.py +0 -0
  70. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/config/oauth_tokens.py +0 -0
  71. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/config/providers.py +0 -0
  72. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/config/settings.py +0 -0
  73. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/database/__init__.py +0 -0
  74. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/database/resolver.py +0 -0
  75. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/database/schema.py +0 -0
  76. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/mcp/__init__.py +0 -0
  77. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/mcp/mcp.py +0 -0
  78. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/memory/__init__.py +0 -0
  79. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/memory/manager.py +0 -0
  80. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/memory/storage.py +0 -0
  81. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/threads/__init__.py +0 -0
  82. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/threads/storage.py +0 -0
  83. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/tools/__init__.py +0 -0
  84. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/tools/base.py +0 -0
  85. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/tools/enums.py +0 -0
  86. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/tools/instructions.py +0 -0
  87. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/tools/registry.py +0 -0
  88. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/src/sqlsaber/tools/sql_tools.py +0 -0
  89. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/__init__.py +0 -0
  90. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/conftest.py +0 -0
  91. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_cli/__init__.py +0 -0
  92. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_cli/test_auth_reset.py +0 -0
  93. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_cli/test_commands.py +0 -0
  94. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_cli/test_threads.py +0 -0
  95. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_config/__init__.py +0 -0
  96. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_config/test_database.py +0 -0
  97. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_config/test_oauth.py +0 -0
  98. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_config/test_providers.py +0 -0
  99. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_config/test_settings.py +0 -0
  100. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_database/__init__.py +0 -0
  101. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_database/test_connection.py +0 -0
  102. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_database_resolver.py +0 -0
  103. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_threads_storage.py +0 -0
  104. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_tools/__init__.py +0 -0
  105. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_tools/test_base.py +0 -0
  106. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_tools/test_instructions.py +0 -0
  107. {sqlsaber-0.17.0 → sqlsaber-0.19.0}/tests/test_tools/test_registry.py +0 -0
  108. {sqlsaber-0.17.0 → sqlsaber-0.19.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.17.0
3
+ Version: 0.19.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,12 +1,34 @@
1
- # Changelog
1
+ ---
2
+ title: Changelog
3
+ description: Release history and notable changes to SQLsaber
4
+ ---
2
5
 
3
- All notable changes to SQLsaber will be documented in this file.
6
+ All notable changes to SQLsaber will be documented here.
4
7
 
5
- ## [Unreleased]
8
+ ### Unreleased
6
9
 
7
- ## [0.17.0] - 2025-09-08
10
+ ---
8
11
 
9
- ### Added
12
+ ### v0.19.0 - 2025-09-09
13
+
14
+ #### Added
15
+
16
+ - Notable improvements to user prompt interface
17
+ - Ctrl+D to exit the application without having to use "/exit" or "/quit" slash command
18
+ - Display multiline input submission info as bottom toolbar
19
+ - Pressing up and down arrow keys now help navigate through prior user prompts
20
+ - Visual improvements to user prompt area
21
+ - Added mouse support - users can now click around text to edit
22
+
23
+ ### v0.18.0 - 2025-09-08
24
+
25
+ #### Changed
26
+
27
+ - Improved CLI startup time
28
+
29
+ ### v0.17.0 - 2025-09-08
30
+
31
+ #### Added
10
32
 
11
33
  - Conversation threads system for storing, displaying, and resuming conversations
12
34
  - Automatic thread creation for both interactive and non-interactive sessions
@@ -17,28 +39,28 @@ All notable changes to SQLsaber will be documented in this file.
17
39
  - Thread persistence with metadata (title, model, database, last activity)
18
40
  - Seamless resumption of conversation context and history
19
41
 
20
- ### Removed
42
+ #### Removed
21
43
 
22
44
  - Removed visualization tools and plotting capabilities
23
45
  - Removed PlotDataTool and uniplot dependency
24
46
  - Cleaned up visualization-related code from CLI, registry, and instructions
25
47
 
26
- ## [0.16.1] - 2025-09-04
48
+ ### v0.16.1 - 2025-09-04
27
49
 
28
- ### Added
50
+ #### Added
29
51
 
30
52
  - Compile python byte code during installation
31
53
  - Updated CLI help string
32
54
 
33
- ## [0.16.0] - 2025-09-04
55
+ ### v0.16.0 - 2025-09-04
34
56
 
35
- ### Added
57
+ #### Added
36
58
 
37
59
  - Migrated to Pydantic-AI agent runtime with model-agnostic interfaces
38
60
  - Added multi-provider model support: Anthropic, OpenAI, Google, Groq, Mistral, Cohere, Hugging Face
39
61
  - Provider registry tests to ensure invariants and alias normalization
40
62
 
41
- ### Changed
63
+ #### Changed
42
64
 
43
65
  - Reworked agents to use new pydantic-ai-based agent implementation
44
66
  - Updated CLI modules and settings to integrate provider selection and authentication
@@ -49,28 +71,28 @@ All notable changes to SQLsaber will be documented in this file.
49
71
  - Centralized provider definitions in `sqlsaber.config.providers` and refactored CLI, config, and agent code to use the registry (single source of truth)
50
72
  - Normalized provider aliases (e.g., `google-gla` → `google`) for consistent behavior across modules
51
73
 
52
- ### Removed
74
+ #### Removed
53
75
 
54
76
  - Deprecated custom `clients` module and Anthropic-specific client code
55
77
  - Removed legacy streaming and events modules and related tests
56
78
 
57
- ## [0.15.0] - 2025-08-18
79
+ ### v0.15.0 - 2025-08-18
58
80
 
59
- ### Added
81
+ #### Added
60
82
 
61
83
  - Tool abstraction system with centralized registry (new `Tool` base class, `ToolRegistry`, decorators)
62
84
  - Dynamic instruction generation system (`InstructionBuilder`)
63
85
  - Comprehensive test suite for the tools module
64
86
 
65
- ### Changed
87
+ #### Changed
66
88
 
67
89
  - Refactored agents to use centralized tool registry instead of hardcoded tools
68
90
  - Enhanced MCP server with dynamic tool registration
69
91
  - Moved core SQL functionality to dedicated tool classes
70
92
 
71
- ## [0.14.0] - 2025-08-01
93
+ ### v0.14.0 - 2025-08-01
72
94
 
73
- ### Added
95
+ #### Added
74
96
 
75
97
  - Local conversation storage between user and agent
76
98
  - Store conversation history persistently
@@ -79,49 +101,49 @@ All notable changes to SQLsaber will be documented in this file.
79
101
  - New GitHub Actions workflow for running tests
80
102
  - Updated code review workflow
81
103
 
82
- ### Fixed
104
+ #### Fixed
83
105
 
84
106
  - Fixed CLI commands test suite (#11)
85
107
 
86
- ### Changed
108
+ #### Changed
87
109
 
88
110
  - Removed schema caching from SchemaManager
89
111
  - Simplified schema introspection by removing cache logic
90
112
  - Direct database queries for schema information
91
113
 
92
- ## [0.13.0] - 2025-07-26
114
+ ### v0.13.0 - 2025-07-26
93
115
 
94
- ### Added
116
+ #### Added
95
117
 
96
118
  - Database resolver abstraction for unified connection handling
97
119
  - Extended `-d` flag to accept PostgreSQL and MySQL connection strings (e.g., `postgresql://user:pass@host:5432/db`)
98
120
  - Support for direct connection strings alongside existing file path and configured database support
99
121
  - Examples: `saber -d "postgresql://user:pass@host:5432/db" "show users"`
100
122
 
101
- ## [0.12.0] - 2025-07-23
123
+ ### v0.12.0 - 2025-07-23
102
124
 
103
- ### Added
125
+ #### Added
104
126
 
105
127
  - Add support for ad-hoc SQLite files via `--database`/`-d` flag
106
128
 
107
- ## [0.11.0] - 2025-07-09
129
+ ### v0.11.0 - 2025-07-09
108
130
 
109
- ### Changed
131
+ #### Changed
110
132
 
111
133
  - Removed row counting from `list_tables` tool for all database types
112
134
 
113
- ## [0.10.0] - 2025-07-08
135
+ ### v0.10.0 - 2025-07-08
114
136
 
115
- ### Added
137
+ #### Added
116
138
 
117
139
  - Support for reading queries from stdin via pipe operator
118
140
  - `echo 'show me all users' | saber` now works
119
141
  - `cat query.txt | saber` reads query from file via stdin
120
142
  - Allows integration with other command-line tools and scripts
121
143
 
122
- ## [0.9.0] - 2025-07-08
144
+ ### v0.9.0 - 2025-07-08
123
145
 
124
- ### Changed
146
+ #### Changed
125
147
 
126
148
  - Migrated from Typer to Cyclopts for CLI framework
127
149
  - Improved command structure and parameter handling
@@ -131,22 +153,22 @@ All notable changes to SQLsaber will be documented in this file.
131
153
  - `saber "question"` executes a single query (previously `saber query "question"`)
132
154
  - Removed the `query` subcommand for a cleaner interface
133
155
 
134
- ## [0.8.2] - 2025-07-08
156
+ ### v0.8.2 - 2025-07-08
135
157
 
136
- ## Changed
158
+ #### Changed
137
159
 
138
160
  - Updated formatting for final answer display
139
161
  - New ASCII art in interactive mode
140
162
 
141
- ## [0.8.1] - 2025-07-07
163
+ ### v0.8.1 - 2025-07-07
142
164
 
143
- ### Fixed
165
+ #### Fixed
144
166
 
145
167
  - Fixed OAuth validation logic to not require API key when Claude Pro OAuth is configured
146
168
 
147
- ## [0.8.0] - 2025-07-07
169
+ ### v0.8.0 - 2025-07-07
148
170
 
149
- ### Added
171
+ #### Added
150
172
 
151
173
  - OAuth support for Claude Pro/Max subscriptions
152
174
  - Authentication management with `saber auth` command
@@ -158,28 +180,27 @@ All notable changes to SQLsaber will be documented in this file.
158
180
  - New `clients` module with custom Anthropic API client
159
181
  - `AnthropicClient` for direct API communication
160
182
 
161
- ### Changed
183
+ #### Changed
162
184
 
163
185
  - Enhanced authentication system to support both API keys and OAuth tokens
164
186
  - Replaced Anthropic SDK with direct API implementation using httpx
165
187
  - Modernized type annotations throughout the codebase
166
188
  - Refactored query streaming into smaller, more maintainable functions
167
189
 
168
- ## [0.7.0] - 2025-07-01
190
+ ### v0.7.0 - 2025-07-01
169
191
 
170
- ### Added
192
+ #### Added
171
193
 
172
194
  - Table name autocomplete with "@" prefix in interactive mode
173
-
174
195
  - Type "@" followed by table name to get fuzzy matching completions
175
196
  - Supports schema-aware completions (e.g., "@sample" matches "public.sample")
176
197
 
177
198
  - Rich markdown display for assistant responses
178
199
  - After streaming completes, the final response is displayed as formatted markdown
179
200
 
180
- ## [0.6.0] - 2025-06-30
201
+ ### v0.6.0 - 2025-06-30
181
202
 
182
- ### Added
203
+ #### Added
183
204
 
184
205
  - Slash command autocomplete in interactive mode
185
206
  - Commands now use slash prefix: `/clear`, `/exit`, `/quit`
@@ -189,7 +210,7 @@ All notable changes to SQLsaber will be documented in this file.
189
210
  - Press Ctrl+C during query execution to gracefully cancel ongoing operations
190
211
  - Preserves conversation history up to the interruption point
191
212
 
192
- ### Changed
213
+ #### Changed
193
214
 
194
215
  - Updated table display for better readability: limit to first 15 columns on wide tables
195
216
  - Shows warning when columns are truncated
@@ -199,47 +220,47 @@ All notable changes to SQLsaber will be documented in this file.
199
220
  - `quit` → `/quit`
200
221
  - Removed default limit of 100. Now model will decide it.
201
222
 
202
- ## [0.5.0] - 2025-06-27
223
+ ### v0.5.0 - 2025-06-27
203
224
 
204
- ### Added
225
+ #### Added
205
226
 
206
227
  - Added support for plotting data from query results.
207
228
  - The agent can decide if plotting will useful and create a plot with query results.
208
229
  - Small updates to system prompt
209
230
 
210
- ## [0.4.1] - 2025-06-26
231
+ ### v0.4.1 - 2025-06-26
211
232
 
212
- ### Added
233
+ #### Added
213
234
 
214
235
  - Show connected database information at the start of a session
215
236
  - Update welcome message for clarity
216
237
 
217
- ## [0.4.0] - 2025-06-25
238
+ ### v0.4.0 - 2025-06-25
218
239
 
219
- ### Added
240
+ #### Added
220
241
 
221
242
  - MCP (Model Context Protocol) server support
222
243
  - `saber-mcp` console script for running MCP server
223
244
  - MCP tools: `get_databases()`, `list_tables()`, `introspect_schema()`, `execute_sql()`
224
245
  - Instructions and documentation for configuring MCP clients (Claude Code, etc.)
225
246
 
226
- ## [0.3.0] - 2025-06-25
247
+ ### v0.3.0 - 2025-06-25
227
248
 
228
- ### Added
249
+ #### Added
229
250
 
230
251
  - Support for CSV files as a database option: `saber query -d mydata.csv`
231
252
 
232
- ### Changed
253
+ #### Changed
233
254
 
234
255
  - Extracted tools to BaseSQLAgent for better inheritance across SQLAgents
235
256
 
236
- ### Fixed
257
+ #### Fixed
237
258
 
238
259
  - Fixed getting row counts for SQLite
239
260
 
240
- ## [0.2.0] - 2025-06-24
261
+ ### v0.2.0 - 2025-06-24
241
262
 
242
- ### Added
263
+ #### Added
243
264
 
244
265
  - SSL support for database connections during configuration
245
266
  - Memory feature similar to Claude Code
@@ -250,7 +271,7 @@ All notable changes to SQLsaber will be documented in this file.
250
271
  - Interactive questionary for all user interactions
251
272
  - Test suite implementation
252
273
 
253
- ### Changed
274
+ #### Changed
254
275
 
255
276
  - Package renamed from original name to sqlsaber
256
277
  - Better configuration handling
@@ -260,20 +281,20 @@ All notable changes to SQLsaber will be documented in this file.
260
281
  - Extracted table display functionality
261
282
  - Refactored and cleaned up codebase structure
262
283
 
263
- ### Fixed
284
+ #### Fixed
264
285
 
265
286
  - Fixed list_tables tool functionality
266
287
  - Fixed introspect schema tool
267
288
  - Fixed minor type checking errors
268
289
  - Check before adding new database to prevent duplicates
269
290
 
270
- ### Removed
291
+ #### Removed
271
292
 
272
293
  - Removed write support completely for security
273
294
 
274
- ## [0.1.0] - 2025-06-19
295
+ ### v0.1.0 - 2025-06-19
275
296
 
276
- ### Added
297
+ #### Added
277
298
 
278
299
  - First working version of SQLSaber
279
300
  - 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)