Skip to main content

Lightweight CLI wrapper for Dimensions DSL queries via dimcli

Project description

Shortwing

Lightweight CLI wrapper for Dimensions DSL queries via dimcli.

Installation

uv pip install .

Usage

# Query as argument
shortwing "search grants for \"malaria\" return researchers"

# Query from stdin
echo 'search grants for "malaria"' | shortwing

# With subcommand
shortwing query "search grants return grants"

# Compact JSON output
shortwing --compact "search grants"

# Use a specific instance from dsl.ini
shortwing --instance test "search grants"

Configuration

Credentials are loaded in the following order of priority:

  1. CLI flags (--key, --endpoint)
  2. Environment variables (DIMENSIONS_KEY, DIMENSIONS_ENDPOINT)
  3. dsl.ini file (default)

Using dsl.ini (Recommended)

Shortwing uses the same dsl.ini configuration file as dimcli. Create the file at ~/.dimensions/dsl.ini:

[instance.live]
url=https://app.dimensions.ai
login=
password=
key=your-api-key

You can define multiple instances and select them with --instance:

[instance.live]
url=https://app.dimensions.ai
key=your-live-key

[instance.test]
url=https://test.dimensions.ai
key=your-test-key
shortwing --instance test "search grants"

Using Environment Variables

export DIMENSIONS_KEY=your-api-key
export DIMENSIONS_ENDPOINT=https://app.dimensions.ai  # optional

Using CLI Flags

shortwing --key your-api-key "search grants"
shortwing --key your-api-key --endpoint https://custom.endpoint.com "search grants"

Exit Codes

  • 0: Success
  • 1: Query/API error
  • 2: Configuration/authentication error

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shortwing-0.2.0.tar.gz (75.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shortwing-0.2.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file shortwing-0.2.0.tar.gz.

File metadata

  • Download URL: shortwing-0.2.0.tar.gz
  • Upload date:
  • Size: 75.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shortwing-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9f33fcdb900f5ee548210bde524c61b096c76da4740840204691eb4845014268
MD5 39ab735915dac056363576c875a06f69
BLAKE2b-256 78352c1315b7f3f7f567dcdebea89405e4f06a5317bbf32d1940282673e5f366

See more details on using hashes here.

Provenance

The following attestation bundles were made for shortwing-0.2.0.tar.gz:

Publisher: python-publish.yml on kjgarza/shortwing

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shortwing-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: shortwing-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shortwing-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 995f6ca51f74bbf63873a4b847efb4d07d55ca7d05a8bd6c2a0879b75ea67988
MD5 e024fa7d31e5a217bf0c88343147a1a9
BLAKE2b-256 b869e993916234cda9c2745f714312cd8199101981124892156b16ed7c59a4f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for shortwing-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on kjgarza/shortwing

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page