npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@asushares/cli

v3.1.1

Published

ASU SHARES CLI aimed at supporting CQL (Clinical Quality Language) operations on FHIR servers.

Readme

ASU SHARES CLI

Command-line utilities aimed at supporting FHIR Consent management and CQL (Clinical Quality Language) operations on FHIR servers. Written and maintained in TypeScript using the Commander library.

CLI Usage

asushares --version for CLI utility version information asushares --help for subcommand documentation and examples

Subcommands

1. convert <filePath> [outputPath]

Converts a .cql file to a base64 encoded string.

  • Arguments:
    • <filePath>: Path to the .cql file.
    • [outputPath] (optional): Path to save the base64 encoded output.
  • Usage:
    ts-node asushares.ts convert myfile.cql output.txt
    • If outputPath is omitted, it outputs the base64 string to the console.

2. create-fhir-bundle <filePath> <outputPath> <description> [ipUrl]

Creates a FHIR bundle from a .cql file and saves it as a JSON file.

  • Arguments:
    • <filePath>: Path to the .cql file.
    • <outputPath>: Path to save the generated FHIR bundle JSON file.
    • <description>: Description of the library.
    • [ipUrl] (optional): Base URL for the FHIR Library (default is http://localhost:8080/fhir/Library/).
  • Usage:
    ts-node asushares.ts create-fhir-bundle myfile.cql bundle.json "Description of the CQL library"

3. post-fhir <filePath> <url>

Posts a FHIR bundle JSON file to a specified FHIR server.

  • Arguments:

    • <filePath>: Path to the JSON file containing the FHIR bundle.
    • <url>: Base URL of the FHIR server.
  • Usage:

    ts-node asushares.ts post-fhir bundle.json http://localhost:8080/fhir

4. create-and-post <filePath> <outputPath> <description> <url>

Creates a FHIR bundle from a .cql file, saves it as a JSON file, and posts it to a specified URL.

  • Arguments:

    • <filePath>: Path to the .cql file.
    • <outputPath>: Path to save the generated FHIR bundle JSON file.
    • <description>: Description of the library.
    • <url>: URL of the server to post the FHIR bundle.
  • Usage:

    ts-node asushares.ts create-and-post myfile.cql bundle.json "Description of the CQL library" http://localhost:8080/fhir

5. synthea-upload <directory> <url> --dry-run -d

Upload a directory of Synthea-generated FHIR resources to a FHIR URL using Synthea file naming conventions and loading order.

  • Arguments:

    • <directory>: Directory with Synthea-generate "fhir" resource files.
    • <url>: URL of the FHIR server to upload the resources to.
    • --dry-run -d: Perform a dry run without uploading any resources.
  • Usage:

    ts-node asushares.ts synthea-upload /dir/to/synthea-files http://localhost:8080/fhir 

6. verify-codes <fhirPath> <csvFilePath> --delete

Verifies JSON files for relevant codes based on a provided CSV and deletes irrelevant files if the delete flag is set.

  • Arguments:

    • <fhirPath>: Path to the directory containing JSON files.
    • <csvFilePath>: Path to the CSV file containing relevant codes. The following columns are expected, with no empty rows - Index,Code_Type,Code,Description,Category. The code maps code types eg. SNOWMED-CT to the required URL in the backend. A sample csv is present in the assets folder for reference purposes.
    • --delete: URL of the server to post the FHIR bundle. Optional.
  • Usage:

    ts-node asushares.ts verify-codes /Users/username/Documents/synthea/output/fhir /Users/username/Documents/synthea/Verification_CSV.csv

7. valueset <ids...> [options]

Downloads VSAC ValueSets and optionally uploads them to a HAPI-FHIR server.

  • Arguments:

    • <ids...>: VSAC OIDs or canonical URLs to process.
  • Options:

    • --mode <m>: Specify the operation mode (definition, expansion, or both). Default: expansion.
    • --version <yyyymmdd>: Specify a specific VSAC ValueSet version.
    • --filter <text>: Apply a server-side filter for $expand (optional).
    • --out <dir>: Output directory for downloaded files. Default: ./valuesets.
    • --post <fhirBaseUrl>: Post the downloaded ValueSets to a FHIR server.
    • --post-mode <m>: Specify the upload mode (definition or expanded). Default: expanded.
    • --bundle: Wrap uploads in a transaction Bundle.
    • --umls-key <key>: UMLS API key (overrides the UMLS_API_KEY environment variable).
    • --count <n>: Expansion page size. Default: 1000.
    • --concurrency <n>: Number of concurrent OIDs to fetch. Default: 4.
    • --retry <n>: Maximum retries for transient errors. Default: 3.
    • --cache <dir>: Cache directory for fetched pages. Default: .vsac_cache.
    • --dry-run: Print actions without making changes. Default: false.
  • Usage:

    ts-node asushares.ts valueset 2.16.840.1.113762.1.4.1110.71 2.16.840.1.113883.3.464.1003.106.11.1001 --out ./valuesets
    ts-node asushares.ts valueset 2.16.840.1.113762.1.4.1110.71 --mode both --post http://hapi.fhir.server/baseR4
    ts-node asushares.ts valueset 2.16.840.1.113762.1.4.1110.71 --umls-key your-umls-key --cache ./custom_cache

## Dependencies

 - commander: Command-line argument parsing.
 - fs: File system operations.
 - axios: Making HTTP requests.
 - ts-progress: Simple progress bar.
 - csv-parser: Used for parsing input csvs.

## Attribution

Authors:

- Abhishek Dhadwal
- Preston Lee

Released under the Apache 2.0 license.