Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
98cec19
Restruture code to domain partitioning
Maxteabag Dec 30, 2025
c2c3990
Cleanup stale package level reexports / lazy shim
Maxteabag Dec 30, 2025
507bc22
Fix mypy
Maxteabag Dec 30, 2025
4bf33c9
solid refactoring
Maxteabag Dec 30, 2025
4c23d14
Support legacy connection json
Maxteabag Dec 30, 2025
f1aaf04
Refactor schema
Maxteabag Dec 30, 2025
ffffc63
Refactor schemas
Maxteabag Dec 30, 2025
88530d3
Refactoring
Maxteabag Dec 30, 2025
047d362
Refactor keybindings, add delete leader menu
Maxteabag Dec 30, 2025
473bebe
Keybindings refactoring
Maxteabag Dec 31, 2025
66de775
Add vim engine
Maxteabag Dec 31, 2025
47e963d
Polish on the deletion
Maxteabag Dec 31, 2025
1409e3b
Improve inside outside motions
Maxteabag Dec 31, 2025
1e219ce
Redo/Undo
Maxteabag Dec 31, 2025
35c135f
Refactor SSMTUI for dependency injection for mocks
Maxteabag Dec 31, 2025
6f59ff1
Fix warnings and pyright
Maxteabag Dec 31, 2025
37f2502
Fix formatting
Maxteabag Dec 31, 2025
043bdbe
_ for unused
Maxteabag Dec 31, 2025
a1e37ab
Refactoring for DI
Maxteabag Dec 31, 2025
d1b347e
Mock driver refactor
Maxteabag Dec 31, 2025
b63e04b
Textual reactivity - vim keybindings improvements - native python for…
Maxteabag Dec 31, 2025
60dee37
Split large files
Maxteabag Dec 31, 2025
fe3d9fc
Add commenting
Maxteabag Dec 31, 2025
de8d205
Copy encapsulated by leader menu
Maxteabag Dec 31, 2025
24afbc5
Cleanup
Maxteabag Dec 31, 2025
3c7e1c2
File picker and default connectons
Maxteabag Jan 1, 2026
9fade88
Little fix to save export
Maxteabag Jan 1, 2026
7248818
Fix misc. docker and refreshing of schema bugs
Maxteabag Jan 1, 2026
b3cdb86
Fix misc bugs and tests
Maxteabag Jan 1, 2026
33382f9
Query editor imporvements
Maxteabag Jan 1, 2026
fc9906b
Stacked results
Maxteabag Jan 1, 2026
2526bd4
Fix better multi results
Maxteabag Jan 1, 2026
5f1dd59
Better search explorer
Maxteabag Jan 1, 2026
35b36df
Improve UX
Maxteabag Jan 1, 2026
f10ace1
Add search to history
Maxteabag Jan 1, 2026
d09048c
Keyboard support for multitable
Maxteabag Jan 1, 2026
8f562bf
Improve autocomplete
Maxteabag Jan 1, 2026
381e290
Credentials retry
Maxteabag Jan 1, 2026
d6a29ed
Add TLS support
Maxteabag Jan 1, 2026
1c94fc1
Lifecycle hook refactor
Maxteabag Jan 1, 2026
b6f370b
Fix mypy
Maxteabag Jan 2, 2026
47b9c4e
Undo and redo vim style
Maxteabag Jan 2, 2026
35c7fd8
CTRL+a,c,v only in insert mdoe
Maxteabag Jan 2, 2026
8e2860f
Fix transaction persistance for multi statment and handle keyring fai…
Maxteabag Jan 2, 2026
9c50fd7
Code formatting
Maxteabag Jan 2, 2026
0b71f29
setup perforamnce testing
Maxteabag Jan 2, 2026
1f145e6
Merge main
Maxteabag Jan 2, 2026
9421380
Temporary compatibility mock layer
Maxteabag Jan 2, 2026
fd66191
fix headless tests
Maxteabag Jan 2, 2026
5ddf23c
Fix tesst
Maxteabag Jan 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,26 @@ venv/
.vscode/
*.swp
*.swo
.claude/

# Local caches
.cache/
.benchmarks/
.mypy_cache/
.pytest_cache/
.ruff_cache/
.sqlit/
.sqlit-config/

# OS
.DS_Store

# Demo files
docker-compose.yml
init.sql
*.tape
.tmp/
demos/drafts/
docs/demos/drafts/
infra/docker/docker-compose.yml
infra/sql/init.sql

# Database files
*.db
Expand Down Expand Up @@ -63,4 +68,5 @@ tests/.env

# Test artifacts
tests/integration/drivers/artifacts/
tests/integration/drivers/
__pycache__/
28 changes: 23 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,21 @@ Thank you for considering a contribution to sqlit! This guide walks you through
pip install -e ".[dev]"
```

For the full integration suite (all database drivers):
```bash
pip install -e ".[dev,all]"
```

## Running Tests

### CLI E2E Tests

CLI end-to-end tests run the entrypoint in a subprocess:

```bash
pytest tests/cli/ -v
```

### SQLite Tests (No Docker Required)

SQLite tests can run without any external dependencies:
Expand All @@ -27,22 +40,27 @@ pytest tests/ -v -k sqlite

### Full Test Suite (Requires Docker)

To run the complete test suite including SQL Server, PostgreSQL, MySQL, MariaDB, FirebirdSQL, Oracle, DuckDB, and CockroachDB tests:
To run the complete test suite including SQL Server, PostgreSQL, MySQL, MariaDB, FirebirdSQL, Oracle, ClickHouse, Turso (libsql), D1 (miniflare), SSH tunnel, DuckDB, and CockroachDB tests:

1. Start the test database containers:
```bash
docker compose -f docker-compose.test.yml up -d
docker compose -f infra/docker/docker-compose.test.yml up -d
```

2. Wait for the databases to be ready (about 30-45 seconds), then run tests:
```bash
pytest tests/ -v
```

To include Docker detection tests that spin up temporary containers:
```bash
pytest tests/integration/docker_detect/ -v --run-docker-container
```

You can leave the containers running between test runs - the test fixtures handle database setup/teardown automatically. Stop them when you're done developing:

```bash
docker compose -f docker-compose.test.yml down
docker compose -f infra/docker/docker-compose.test.yml down
```

### Running Tests for Specific Databases
Expand Down Expand Up @@ -114,7 +132,7 @@ The database tests can be configured with these environment variables:

1. Start the included CockroachDB container:
```bash
docker compose -f docker-compose.test.yml up -d cockroachdb
docker compose -f infra/docker/docker-compose.test.yml up -d cockroachdb
```
2. Create a connection (default container runs insecure mode on port `26257` with `root` user):
```bash
Expand All @@ -138,7 +156,7 @@ The project uses GitHub Actions for continuous integration:
- **Build**: Verifies the package builds on Python 3.10-3.13
- **SQLite Tests**: Runs SQLite integration tests (no external dependencies)
- **SQL Server Tests**: Runs SQL Server integration tests with Docker service
-
-

### Vision

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@
### Connect
Supports all major databases: SQL Server, PostgreSQL, MySQL, SQLite, MariaDB, FirebirdSQL, Oracle, DuckDB, CockroachDB, ClickHouse, Snowflake, Supabase, CloudFlare D1, Turso, Athena, BigQuery and Redshift.

![Database Providers](demos/demo-providers.gif)
![Database Providers](docs/demos/demo-providers.gif)

### Query
Syntax highlighting. History. Vim-style keybindings.

![Query History](demos/demo-history.gif)
![Query History](docs/demos/demo-history.gif)

### Results
Load millions of rows. Inspect data, filter by content, fuzzy search.

![Filter results](demos/demo-filter/demo-filter.gif)
![Filter results](docs/demos/demo-filter/demo-filter.gif)

### Docker Discovery
Automatically finds running database containers. Press 'Enter' to connect, sqlit figures out the details for you.

![Docker Discovery](demos/demo-docker-picker.gif)
![Docker Discovery](docs/demos/demo-docker-picker.gif)

---

Expand Down
2 changes: 1 addition & 1 deletion mock-ssh-missing.json → config/mock-ssh-missing.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_note": "Run: sqlit --settings mock-ssh-missing.json",
"_note": "Run: sqlit --settings config/mock-ssh-missing.json",
"mock": {
"enabled": true,
"profile": "empty",
Expand Down
File renamed without changes.
File renamed without changes.
Binary file removed demo-d1.gif
Binary file not shown.
4 changes: 0 additions & 4 deletions demos/demos/d1-demo.json

This file was deleted.

File renamed without changes
2 changes: 1 addition & 1 deletion demos/d1-demo.json → docs/demos/d1-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@
"conn:My D1 Database",
"conn:My D1 Database/folder:tables"
]
}
}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
23 changes: 19 additions & 4 deletions docker-compose.test.yml → infra/docker/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ services:
tmpfs:
- /var/lib/mysql

clickhouse:
image: clickhouse/clickhouse-server:latest
container_name: sqlit-test-clickhouse
environment:
CLICKHOUSE_USER: "default"
CLICKHOUSE_PASSWORD: "TestPassword123!"
ports:
- "8123:8123"
tmpfs:
- /var/lib/clickhouse

oracle:
image: gvenzl/oracle-free:23-slim
container_name: sqlit-test-oracle
Expand Down Expand Up @@ -148,7 +159,7 @@ services:
ports:
- "2222:2222"
volumes:
- ./tests/fixtures/99-fix-sshd-config.sh:/custom-cont-init.d/99-fix-sshd-config
- ../../tests/fixtures/99-fix-sshd-config.sh:/custom-cont-init.d/99-fix-sshd-config
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "2222"]
interval: 5s
Expand Down Expand Up @@ -179,14 +190,18 @@ services:

miniflare:
build:
context: ./tests/fixtures/d1
context: ../../tests/fixtures/d1
container_name: sqlit-test-miniflare
command: ["wrangler", "dev", "--local", "--ip", "0.0.0.0", "--port", "8787"]
environment:
D1_ACCOUNT_ID: "test-account"
D1_API_TOKEN: "test-token"
D1_DATABASE: "test-d1"
ports:
- "8787:8787"
volumes:
- ./tests/fixtures/d1/wrangler.toml:/app/wrangler.toml
- ./tests/fixtures/d1/index.js:/app/index.js
- ../../tests/fixtures/d1/wrangler.toml:/app/wrangler.toml
- ../../tests/fixtures/d1/index.js:/app/index.js
working_dir: /app
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:8787/').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"]
Expand Down
Loading