@sqlike/cli 0.1.1 → 0.2.0

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.
Files changed (2) hide show
  1. package/README.md +18 -17
  2. package/package.json +9 -7
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @sqlike/cli
2
2
 
3
- Command-line client for [sqlike](https://sqlike.com) — a deterministic SQL static analyzer and
4
- advisor (validity, anti-patterns, rewrites, schema advice) and query-equivalence checker for
5
- Postgres, MySQL, SQLite, and SQL Server.
3
+ Command-line client for [sqlike](https://sqlike.com), a deterministic SQL static analyzer and
4
+ advisor (validity, anti-patterns, rewrites, index and schema advice) and query-equivalence checker
5
+ for Postgres, MySQL, MariaDB, SQLite, and SQL Server.
6
6
 
7
- This package is a **thin remote client**: it tokenizes your SQL locally (identifiers and literals
8
- are replaced before anything leaves your machine) and forwards the tokenized query to the sqlike
9
- API. It contains no analysis engine.
7
+ This package is a **thin remote client**. It tokenizes your SQL locally, so identifiers and literals
8
+ are masked before anything leaves your machine, and forwards only the tokenized query to the sqlike
9
+ API. There is no analysis engine in it.
10
10
 
11
11
  ## Use it
12
12
 
@@ -16,7 +16,7 @@ npx @sqlike/cli check query.sql --remote https://api.sqlike.com
16
16
 
17
17
  # or install it
18
18
  npm i -g @sqlike/cli
19
- sqlike check query.sql --remote https://api.sqlike.com
19
+ brew install orifisher2/sqlike/sqlike
20
20
 
21
21
  # from stdin, machine-readable
22
22
  echo 'SELECT * FROM users WHERE id IN (SELECT uid FROM bans)' \
@@ -26,25 +26,26 @@ echo 'SELECT * FROM users WHERE id IN (SELECT uid FROM bans)' \
26
26
  sqlike diff before.sql after.sql --schema schema.sql
27
27
  ```
28
28
 
29
- Pass `--dialect postgres|mysql|sqlite|mssql` (default postgres), `--schema <ddl-file>` for
30
- column- and type-aware checks, and `--key <api-key>` for higher rate limits.
29
+ Pass `--dialect postgres|mysql|mariadb|sqlite|mssql` (default postgres), `--schema <ddl-file>` for
30
+ column and type aware checks, and `--key <api-key>` for higher rate limits. If you have the query's
31
+ `EXPLAIN` output, `--explain <file>` lets the real access paths confirm or dismiss the index
32
+ findings. The schema and the plan are tokenized too.
31
33
 
32
- Exit codes are a contract: `0` clean / equivalent, `1` advisory / differs, `2` blocking issue /
34
+ Exit codes are a contract: `0` clean or equivalent, `1` advisory or differs, `2` blocking issue or
33
35
  undecided, `3` operational error.
34
36
 
35
37
  ### Privacy
36
38
 
37
- A query is tokenized before it leaves your machine. A query that can't be parsed can't be
38
- tokenized, so `check`/`diff` refuse rather than send raw SQL; pass `--allow-raw` (with `--remote`)
39
- to override for a parse diagnostic.
39
+ A query is tokenized before it leaves your machine. One that cannot be parsed cannot be tokenized,
40
+ so `check` and `diff` refuse rather than send raw SQL. Pass `--allow-raw` (with `--remote`) to
41
+ override that for a parse diagnostic.
40
42
 
41
43
  ## How it ships
42
44
 
43
45
  The CLI is a native binary. Each platform's binary is published as its own optional-dependency
44
- package (`@sqlike/cli-linux-x64`, `@sqlike/cli-darwin-arm64`, …); npm installs only the one matching
45
- your OS and CPU. No install scripts run — this works with `--ignore-scripts` and in locked-down
46
- environments. Supported: linux x64/arm64, macOS x64/arm64, Windows x64. Also available via Homebrew
47
- (`brew install orifisher2/sqlike/sqlike`).
46
+ package (`@sqlike/cli-linux-x64`, `@sqlike/cli-darwin-arm64`, and so on), so npm installs only the
47
+ one matching your OS and CPU. No install scripts run, which means this works with `--ignore-scripts`
48
+ and in locked-down environments. Supported: linux x64 and arm64, macOS x64 and arm64, Windows x64.
48
49
 
49
50
  ## License
50
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqlike/cli",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "CLI for sqlike — deterministic SQL static analysis and query-equivalence checking. A thin remote client that tokenizes locally and forwards to the sqlike API.",
5
5
  "keywords": [
6
6
  "sql",
@@ -11,7 +11,9 @@
11
11
  "postgres",
12
12
  "mysql",
13
13
  "sqlite",
14
- "sqlserver"
14
+ "sqlserver",
15
+ "mariadb",
16
+ "duckdb"
15
17
  ],
16
18
  "homepage": "https://sqlike.com",
17
19
  "repository": {
@@ -30,10 +32,10 @@
30
32
  "node": ">=18"
31
33
  },
32
34
  "optionalDependencies": {
33
- "@sqlike/cli-darwin-arm64": "0.1.1",
34
- "@sqlike/cli-darwin-x64": "0.1.1",
35
- "@sqlike/cli-linux-arm64": "0.1.1",
36
- "@sqlike/cli-linux-x64": "0.1.1",
37
- "@sqlike/cli-win32-x64": "0.1.1"
35
+ "@sqlike/cli-darwin-arm64": "0.2.0",
36
+ "@sqlike/cli-darwin-x64": "0.2.0",
37
+ "@sqlike/cli-linux-arm64": "0.2.0",
38
+ "@sqlike/cli-linux-x64": "0.2.0",
39
+ "@sqlike/cli-win32-x64": "0.2.0"
38
40
  }
39
41
  }