Skip to main content

ds-fetch-cli

aic-fetch: the command line for AI Commons Fetch. Run SQL and natural-language queries over your tenant's data lake from the terminal. Built on ds-fetch-py-sdk.

uv tool install ds-fetch-cli    # or: pipx install ds-fetch-cli
aic-fetch --install-completion  # optional: tab completion for your shell

Usage

aic-fetch -e dev login                       # browser sign-in, including SSO
aic-fetch -e dev login --email me@aic.no     # email and password; prompts for MFA if enabled
aic-fetch -e dev datasets                    # what you can query, with files, rows and size
aic-fetch -e dev datasets -n gold.5003105c-8a84-5f77-ab74-5e57003112b8   # only these datasets
aic-fetch -e dev datasets -l silver -l bronze  # only these layers
aic-fetch -e dev dataset gold.5003105c-8a84-5f77-ab74-5e57003112b8
aic-fetch -e dev query 'SELECT department, count(*) FROM gold."5003105c-8a84-5f77-ab74-5e57003112b8" GROUP BY 1'
aic-fetch -e dev query - < report.sql        # SQL from a file or pipe
aic-fetch -e dev validate - < report.sql     # check the SQL without reading any data
aic-fetch -e dev ask "Headcount per department?" -d gold.5003105c-8a84-5f77-ab74-5e57003112b8
aic-fetch -e dev ask "Headcount per department?" --sql-only
aic-fetch -e dev tools                       # ds-tools you can invoke
aic-fetch -e local health
aic-fetch -e dev logout
Option Effect
-e, --env local, dev or prod. Default: $AIC_ENV, then prod
--json JSON on stdout for scripts, e.g. `aic-fetch --json query '…'
--fresh On datasets, dataset, query, validate, ask: read S3 directly, bypassing the index and cache. Default: $AIC_FRESH. Needed locally without ds-fetch-indexer
--version CLI and SDK versions

Tables go to stdout; progress, the generated SQL and row counts go to stderr, so output pipes cleanly. Errors print one line and exit with code 1. Text from the service and the data lake is shown literally, with control characters replaced, so data cannot drive your terminal.

Credentials

The CLI uses the first of these it finds:

  1. AIC_TOKEN: a platform JWT.
  2. AIC_CLIENT_ID and AIC_CLIENT_SECRET: client credentials, for CI and machines.
  3. AIC_EMAIL and AIC_PASSWORD (plus AIC_MFA_CODE): email and password sign-in.
  4. The session from aic-fetch login, cached in ~/.config/aic/credentials.json.

local and dev sign in at https://auth-dev.grasp-daas.com, prod at https://auth.grasp-daas.com.

AIC_FETCH_URL, AIC_TOOLS_URL and AIC_ISSUER override single URLs of the chosen environment.

License

Apache 2.0

Metadata

Release files for ds-fetch-cli 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ds-fetch-cli 1.1.0
File Size Uploaded Provenance
ds_fetch_cli-1.1.0.tar.gz 13.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ds-fetch-cli 1.1.0
File Interpreter ABI Platform
ds_fetch_cli-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.4 kB

Release files / ds_fetch_cli-1.1.0.tar.gz

Download URL ds_fetch_cli-1.1.0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
13aacbca59cdfe47d6fdc9eb30bd6f57c86364f301ab15251261614bea98864f
BLAKE2b-256 checksum
How to use checksums
d911485bbd8e7263e14111d0e0b0643c4992360d7fcd7407f4d397a01ddc62d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / ds_fetch_cli-1.1.0-py3-none-any.whl

Download URL ds_fetch_cli-1.1.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
502d402de55b9e0a9b48b1989491326de75fc0f5bfa9d3766d6287ef782d78bd
BLAKE2b-256 checksum
How to use checksums
22e0210d440c579c0079c5e4dcb84901cad8c09699a951c5e625978d6d57a9da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for ds-fetch-cli 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ds_fetch_cli-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page