Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ jobs:
uses: ./.github/workflows/actions/sign-files
with:
paths: |
./src/target/release/packager/*.exe
./src/target/release/packager/*.msi
./ggsql-cli/target/release/packager/*.exe
./ggsql-cli/target/release/packager/*.msi
env:
# environment variables required to sign with signtool
SM_HOST: ${{ secrets.SM_HOST }}
Expand All @@ -76,14 +76,14 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ggsql-windows-nsis
path: src/target/release/packager/*.exe
path: ggsql-cli/target/release/packager/*.exe
retention-days: 30

- name: Upload MSI installer
uses: actions/upload-artifact@v4
with:
name: ggsql-windows-msi
path: src/target/release/packager/*.msi
path: ggsql-cli/target/release/packager/*.msi
retention-days: 30

build-macos-x86_64:
Expand Down Expand Up @@ -162,10 +162,10 @@ jobs:
xargs -0 -I{} codesign --force --options runtime --timestamp --sign "$SIGN_ID" "{}"
# Then sign the executables with hardened runtime + entitlements
codesign --force --options runtime --timestamp \
--entitlements src/entitlements.plist \
--entitlements ggsql-cli/entitlements.plist \
--sign "$SIGN_ID" target/release/ggsql
codesign --force --options runtime --timestamp \
--entitlements src/entitlements.plist \
--entitlements ggsql-cli/entitlements.plist \
--sign "$SIGN_ID" target/release/ggsql-jupyter

- name: Build and notarize PKG installer (x86_64)
Expand Down Expand Up @@ -285,10 +285,10 @@ jobs:
xargs -0 -I{} codesign --force --options runtime --timestamp --sign "$SIGN_ID" "{}"
# Then sign the executables with hardened runtime + entitlements
codesign --force --options runtime --timestamp \
--entitlements src/entitlements.plist \
--entitlements ggsql-cli/entitlements.plist \
--sign "$SIGN_ID" target/release/ggsql
codesign --force --options runtime --timestamp \
--entitlements src/entitlements.plist \
--entitlements ggsql-cli/entitlements.plist \
--sign "$SIGN_ID" target/release/ggsql-jupyter

- name: Build and notarize PKG installer (aarch64)
Expand Down Expand Up @@ -377,7 +377,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ggsql-linux-deb-x86_64
path: src/target/release/packager/*.deb
path: ggsql-cli/target/release/packager/*.deb
retention-days: 30

build-linux-aarch64:
Expand Down Expand Up @@ -428,7 +428,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ggsql-linux-deb-aarch64
path: src/target/release/packager/*.deb
path: ggsql-cli/target/release/packager/*.deb
retention-days: 30

build-cargo:
Expand Down Expand Up @@ -485,6 +485,14 @@ jobs:
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

- name: Wait for crates.io index update
run: sleep 30

- name: Publish ggsql-cli
run: cargo publish --package ggsql-cli
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

build-wasm:
name: Build Wasm Package (wasm32)
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ skill for llms through the `skill` command (#361)
- Rendering of inline plots in Positron had a bad interaction with how we
handled auto-resizing in the plot pane. We now have a per-output-location path
in the Jupyter kernel (#360)
- Passing the shape aesthetic via `SETTING` now correctly translates named
- Passing the shape aesthetic via `SETTING` now correctly translates named
shapes (#368)

### Changed
Expand All @@ -24,6 +24,7 @@ shapes (#368)
before registering them back to the backend. We now keep the data purely on the
backend until the layer query as was always intended (#363)
- Simplified internal approach to DataFrame with DuckDB reader (#365)
- Moved the CLI to its own module rather than be part of the main crate (#379)

### Removed

Expand Down
16 changes: 13 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
members = [
"tree-sitter-ggsql",
"src",
"ggsql-cli",
"ggsql-jupyter",
"ggsql-wasm"
]
default-members = [
"tree-sitter-ggsql",
"src",
"ggsql-cli",
"ggsql-jupyter"
]
resolver = "2"
Expand Down
2 changes: 1 addition & 1 deletion doc/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ uv tool install ggsql-jupyter
ggsql-jupyter --install

# CLI (crates.io)
cargo install ggsql
cargo install ggsql-cli
```
:::
:::
Expand Down
74 changes: 74 additions & 0 deletions ggsql-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[package]
name = "ggsql-cli"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Command-line interface for ggsql"
build = "build.rs"

[[bin]]
name = "ggsql"
path = "src/main.rs"

[dependencies]
ggsql = { workspace = true }

# CLI and error handling
clap.workspace = true
anyhow.workspace = true

# Serialization (used by `parse --format json`)
serde_json.workspace = true

# Regex (used by `docs` markdown post-processing)
regex.workspace = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# Terminal markdown rendering for `ggsql docs` (native targets only;
# crossterm 0.29 doesn't compile on wasm32)
termimad = "0.31"

[build-dependencies]
regex.workspace = true
ureq = "3"

[features]
default = ["duckdb", "sqlite", "vegalite", "ipc", "parquet", "builtin-data", "odbc"]
ipc = ["ggsql/ipc"]
duckdb = ["ggsql/duckdb"]
parquet = ["ggsql/parquet"]
postgres = ["ggsql/postgres"]
sqlite = ["ggsql/sqlite"]
odbc = ["ggsql/odbc"]
vegalite = ["ggsql/vegalite"]
ggplot2 = ["ggsql/ggplot2"]
builtin-data = ["ggsql/builtin-data"]
all-readers = ["duckdb", "postgres", "sqlite", "odbc"]
all-writers = ["vegalite", "ggplot2"]

# cargo-packager configuration for cross-platform installers
[package.metadata.packager]
product-name = "ggsql"
identifier = "com.ggsql.app"
category = "DeveloperTool"
publisher = "ggsql Team"
authors = ["ggsql Team"]
icons = ["../doc/assets/logo.png"]
license-file = "../LICENSE.md"
out-dir = "target/release/packager"
homepage = "https://ggsql.org/"
description = "SQL extension for declarative data visualization"
long-description = "ggsql extends SQL with a VISUALISE clause for declarative data visualization based on Grammar of Graphics principles. Combine SQL queries with visualization specifications to create charts directly from your data."
copyright = "Copyright (c) 2026 ggsql Team"

# Binaries to include in the package
binaries = [
{ path = "ggsql", main = true },
{ path = "ggsql-jupyter", main = false },
]

# Resources to bundle (optional)
resources = [{ src = "../libs/", target = "libs" }]
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 1 addition & 41 deletions src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ license.workspace = true
repository.workspace = true
homepage.workspace = true
description.workspace = true
build = "build.rs"

[lib]
name = "ggsql"
path = "lib.rs"

[[bin]]
name = "ggsql"
path = "cli.rs"

[dependencies]
# Parsing
tree-sitter.workspace = true
Expand Down Expand Up @@ -45,9 +40,7 @@ plotters = { workspace = true, optional = true }
serde.workspace = true
serde_json.workspace = true

# CLI and error handling
clap.workspace = true
anyhow.workspace = true
# Error handling
thiserror.workspace = true

# Utilities
Expand All @@ -58,15 +51,6 @@ sprintf = "0.4"
const_format.workspace = true
uuid.workspace = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# Terminal markdown rendering for `ggsql docs` (native targets only;
# crossterm 0.29 doesn't compile on wasm32)
termimad = "0.31"

[build-dependencies]
regex.workspace = true
ureq = "3"

[dev-dependencies]
jsonschema = "0.44"
proptest.workspace = true
Expand All @@ -86,27 +70,3 @@ ggplot2 = []
builtin-data = []
all-readers = ["duckdb", "postgres", "sqlite", "odbc"]
all-writers = ["vegalite", "ggplot2", "plotters"]

# cargo-packager configuration for cross-platform installers
[package.metadata.packager]
product-name = "ggsql"
identifier = "com.ggsql.app"
category = "DeveloperTool"
publisher = "ggsql Team"
authors = ["ggsql Team"]
icons = ["../doc/assets/logo.png"]
license-file = "../LICENSE.md"
out-dir = "target/release/packager"
homepage = "https://ggsql.org/"
description = "SQL extension for declarative data visualization"
long-description = "ggsql extends SQL with a VISUALISE clause for declarative data visualization based on Grammar of Graphics principles. Combine SQL queries with visualization specifications to create charts directly from your data."
copyright = "Copyright (c) 2026 ggsql Team"

# Binaries to include in the package
binaries = [
{ path = "ggsql", main = true },
{ path = "ggsql-jupyter", main = false },
]

# Resources to bundle (optional)
resources = [{ src = "../libs/", target = "libs" }]
Loading