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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gravitate-health/lens-tool-bundler

v0.6.1

Published

CLI tool for creating, bundling, testing, and deploying FHIR-compliant Gravitate Health lenses - JavaScript enhancement functions that personalize electronic product information (ePI) for patients

Readme

Lens Tool Bundler

npm version License Node.js Version npm downloads

CLI tool for creating, bundling, testing, and deploying FHIR-compliant Gravitate Health lenses - JavaScript enhancement functions that personalize electronic product information (ePI) for patients.

Features

Create: Scaffold new lenses from templates or clone full repository with testing framework
📦 Bundle: Convert JavaScript lens functions into FHIR Library resources
🧪 Test: Run comprehensive validation and content preservation tests
🚀 Deploy: Upload lenses to FHIR servers with smart update/create logic
Validate: Check integrity between source code and bundles
List: Discover and list lenses with ls-like output (pipe-friendly)
�🔄 Batch Operations: Process multiple lenses at once with smart filtering

Quick Start

# Install globally
npm install -g @gravitate-health/lens-tool-bundler

# Create a new lens project
lens-tool-bundler new MyLens --template

# List all lenses (clean ls-like output)
lens-tool-bundler lslens ./lenses

# Bundle a lens
lens-tool-bundler bundle mylens.js -p

# Test the lens
lens-tool-bundler test mylens.json

# Upload to FHIR server
lens-tool-bundler upload mylens.json -d https://your-fhir-server.com/api/fhir

# Pipe-friendly batch processing
lens-tool-bundler lslens ./lenses | xargs -I {} lens-tool-bundler test {}

Table of Contents

Contributing

We welcome contributions! Please see our CONTRIBUTING.md for details on:

  • Code of conduct
  • Development setup
  • Submitting pull requests
  • Coding standards

Testing

The project has comprehensive test coverage with 143 tests, all passing:

  • 84 unit/integration tests: Models, controllers, batch operations, and encoding scenarios
  • 59 command tests: All CLI commands with proper oclif v4 patterns
npm test               # Run all tests (143 passing)
npm run lint           # Run ESLint

Testing Framework: @oclif/test v4.1.16 with Mocha + Chai

  • Uses runCommand() pattern for command testing
  • Proper exit code handling (0=success, 1=validation failure, 2=fatal error)
  • See test/README.md for detailed test documentation

Support

License

This project is licensed under the Apache License 2.0 - see the LICENSE.txt file for details.

Acknowledgments

This project is part of the Gravitate Health initiative, funded by the European Union.


Usage

$ npm install -g @gravitate-health/lens-tool-bundler
$ lens-tool-bundler COMMAND
running command...
$ lens-tool-bundler (--version)
@gravitate-health/lens-tool-bundler/0.6.1 win32-x64 node-v25.6.1
$ lens-tool-bundler --help [COMMAND]
USAGE
  $ lens-tool-bundler COMMAND
...
$ npm install -g @gravitate-health/lens-tool-bundler
$ lens-tool-bundler COMMAND
running command...
$ lens-tool-bundler (--version)
@gravitate-health/lens-tool-bundler/0.5.7 linux-x64 node-v18.19.1
$ lens-tool-bundler --help [COMMAND]
USAGE
  $ lens-tool-bundler COMMAND
...

Exit Codes

All commands use standard exit codes for CI/CD integration:

  • 0: Success - Command completed without errors
  • 1: Failure - Command encountered errors during execution
    • batch-bundle: One or more lenses failed to bundle
    • batch-check: One or more integrity checks failed
    • batch-test: One or more lens tests failed
    • batch-upload: One or more lenses failed to upload
    • bundle: Bundling operation failed
    • check: Integrity check failed
    • test: Lens test failed
    • upload: Upload operation failed
  • 2: Fatal error - Unexpected error during execution (used by batch-check)

Use these exit codes in scripts and CI/CD pipelines to determine command success:

# Example: Fail CI pipeline if tests fail
lens-tool-bundler batch-test ./lenses || exit 1

# Example: Check integrity and continue on success
if lens-tool-bundler check mylens.js; then
  echo "Integrity check passed"
fi

Source Encoding

Lens source files are decoded to Unicode before being stored as UTF-8 in the FHIR Library content. If a source file uses a non-UTF-8 encoding, pass --source-encoding to ensure consistent base64 content:

# Bundle a latin1-encoded source file
lens-tool-bundler bundle mylens.js -n MyLens --source-encoding latin1

# Check integrity with a specific source encoding
lens-tool-bundler check mylens.js --source-encoding windows-1252

FHIR Identifier Rules

For all commands that create, update, check, or upload FHIR Library resources (new, bundle, batch-bundle, upload, batch-upload, check, batch-check):

  • name remains human-readable and may contain spaces.
  • identifier[0].value is required and normalized to a FHIR-safe form (lowercase kebab-case, no spaces).
  • id is aligned with the normalized identifier value.
  • Default identifier system is http://gravitate-health.lst.tfo.upm.es.
  • You can override the system in creation/update/upload commands with --identifier-system.

Example:

  • Input name: Human Readable Lens
  • Stored identifier: human-readable-lens

Examples:

lens-tool-bundler new "My Lens" --default --identifier-system https://example.org/fhir/lens-ids
lens-tool-bundler bundle mylens.js -n "My Lens" --identifier-system https://example.org/fhir/lens-ids
lens-tool-bundler batch-bundle ./lenses --identifier-system https://example.org/fhir/lens-ids
lens-tool-bundler upload mylens.json -d https://your-fhir-server.com/api/fhir --identifier-system https://example.org/fhir/lens-ids
lens-tool-bundler batch-upload ./lenses -d https://your-fhir-server.com/api/fhir --identifier-system https://example.org/fhir/lens-ids

File Exclusions

Batch commands (batch-bundle, batch-check, batch-test, batch-upload) automatically exclude certain files and directories to optimize processing:

Default Exclusions:

  • node_modules/ - Dependencies directory
  • package.json - npm package configuration
  • package-lock.json - npm lockfile

You can add additional exclusion patterns using the --exclude flag (can be used multiple times):

# Exclude test files and draft lenses
lens-tool-bundler batch-bundle ./lenses --exclude "test.*" --exclude ".*\\.draft\\.json$"

# Exclude multiple patterns
lens-tool-bundler batch-test ./lenses --exclude "experimental" --exclude ".*\\.bak\\."

# Exclude specific directories
lens-tool-bundler batch-check ./lenses --exclude "archive/" --exclude "temp/"

Note: Exclusion patterns are applied to both filenames and directory names as regular expressions, preventing traversal into excluded directories for better performance.

Commands

lens-tool-bundler batch-bundle [DIRECTORY]

Batch process and bundle multiple lenses in a directory.

USAGE
  $ lens-tool-bundler batch-bundle [DIRECTORY] [-e <value>...] [-f] [-d] [-s] [--identifier-system <value>]
    [--source-encoding <value>]

ARGUMENTS
  DIRECTORY  [default: .] directory containing lenses to bundle

FLAGS
  -d, --skip-date                  do not update the date field when bundling
  -e, --exclude=<value>...         regex pattern to exclude files/directories (can be used multiple times)
  -f, --force                      force bundle all lenses even if content is up to date
  -s, --skip-valid                 skip lenses that already have valid base64 content
      --identifier-system=<value>  FHIR identifier system to set on processed resources
      --source-encoding=<value>    source file encoding (auto-detected if omitted)

DESCRIPTION
  Batch process and bundle multiple lenses in a directory.

EXAMPLES
  $ lens-tool-bundler batch-bundle

  $ lens-tool-bundler batch-bundle ./lenses

  $ lens-tool-bundler batch-bundle ./lenses --skip-valid

  $ lens-tool-bundler batch-bundle ./lenses --skip-date

  $ lens-tool-bundler batch-bundle ./lenses --exclude "test.*" --exclude ".*\.draft\.json$"

  $ lens-tool-bundler batch-bundle ./lenses --exclude "node_modules"

  $ lens-tool-bundler batch-bundle ./lenses --identifier-system https://example.org/fhir/lens-ids

See code: src/commands/batch-bundle.ts

lens-tool-bundler batch-check [DIRECTORY]

Batch check integrity between all lens JavaScript files and their FHIR Library bundles.

USAGE
  $ lens-tool-bundler batch-check [DIRECTORY] [-e <value>...] [-j] [-q] [--source-encoding <value>]

ARGUMENTS
  DIRECTORY  [default: .] directory to search for lens files

FLAGS
  -e, --exclude=<value>...       regex pattern to exclude files/directories (can be used multiple times)
  -j, --json                     output results as JSON
  -q, --quiet                    suppress output, only return exit code
      --source-encoding=<value>  source file encoding (auto-detected if omitted)

DESCRIPTION
  Batch check integrity between all lens JavaScript files and their FHIR Library bundles.

EXAMPLES
  $ lens-tool-bundler batch-check

  $ lens-tool-bundler batch-check ./lenses

  $ lens-tool-bundler batch-check -q

  $ lens-tool-bundler batch-check --json

  $ lens-tool-bundler batch-check ./lenses --exclude "test.*" --exclude ".*\.draft\.json$"

See code: src/commands/batch-check.ts

lens-tool-bundler batch-test [DIRECTORY]

Batch test multiple lenses in a directory.

USAGE
  $ lens-tool-bundler batch-test [DIRECTORY] [-e <value>] [-f] [-v]

ARGUMENTS
  DIRECTORY  [default: .] directory containing lenses to test

FLAGS
  -e, --exclude=<value>  regex pattern to exclude files (applied to filename)
  -f, --fail-fast        stop on first test failure
  -v, --verbose          show detailed test output for each lens

DESCRIPTION
  Batch test multiple lenses in a directory.

EXAMPLES
  $ lens-tool-bundler batch-test

  $ lens-tool-bundler batch-test ./lenses

  $ lens-tool-bundler batch-test ./lenses --exclude "test.*"

  $ lens-tool-bundler batch-test ./lenses --verbose

See code: src/commands/batch-test.ts

lens-tool-bundler batch-upload [DIRECTORY]

Batch process and upload multiple lenses to a FHIR server.

USAGE
  $ lens-tool-bundler batch-upload [DIRECTORY] -d <value> [-e <value>] [-f] [-t] [-s] [--identifier-system
    <value>] [--source-encoding <value>]

ARGUMENTS
  DIRECTORY  [default: .] directory containing lenses to upload

FLAGS
  -d, --domain=<value>             (required) domain where FHIR server is hosted (with http/https)
  -e, --exclude=<value>            regex pattern to exclude files (applied to filename)
  -f, --force                      force bundle all lenses even if content is up to date
  -s, --skip-valid                 skip lenses that already have valid base64 content
  -t, --skip-date                  do not update the date field when bundling
      --identifier-system=<value>  FHIR identifier system to set on processed resources
      --source-encoding=<value>    source file encoding (auto-detected if omitted)

DESCRIPTION
  Batch process and upload multiple lenses to a FHIR server.

EXAMPLES
  $ lens-tool-bundler batch-upload -d https://fosps.gravitatehealth.eu/epi/api/fhir

  $ lens-tool-bundler batch-upload ./lenses -d https://fosps.gravitatehealth.eu/epi/api/fhir

  $ lens-tool-bundler batch-upload ./lenses -d https://fosps.gravitatehealth.eu/epi/api/fhir --skip-valid

  $ lens-tool-bundler batch-upload ./lenses -d https://fosps.gravitatehealth.eu/epi/api/fhir --exclude "test.*"

  $ lens-tool-bundler batch-upload ./lenses -d https://fosps.gravitatehealth.eu/epi/api/fhir --identifier-system https://example.org/fhir/lens-ids

See code: src/commands/batch-upload.ts

lens-tool-bundler bundle FILE

Bundles raw lenses into a FHIR compliant single file.

USAGE
  $ lens-tool-bundler bundle FILE [-b <value>] [-d] [--identifier-system <value>] [-n <value>] [-p]
    [--source-encoding <value>] [-u]

ARGUMENTS
  FILE  file to read

FLAGS
  -b, --bundle=<value>             path to target Library json file (auto-detected if omitted)
  -d, --default                    use default values for the bundle
  -n, --name=<value>               name to apply to lens
  -p, --package-json               use values from package.json to populate FHIR library
  -u, --update                     update existing bundle file (content and date only)
      --identifier-system=<value>  FHIR identifier system to set on the resource
      --source-encoding=<value>    source file encoding (auto-detected if omitted)

DESCRIPTION
  Bundles raw lenses into a FHIR compliant single file.

EXAMPLES
  $ lens-tool-bundler bundle lens.js -n my-lens

  $ lens-tool-bundler bundle lens.js -n my-lens -d

  $ lens-tool-bundler bundle lens.js -p

  $ lens-tool-bundler bundle lens.js -u

  $ lens-tool-bundler bundle lens.js -u --bundle my-lens.json

  $ lens-tool-bundler bundle lens.js -n my-lens --bundle target-lens.json

  $ lens-tool-bundler bundle lens.js -n my-lens --source-encoding windows-1252

  $ lens-tool-bundler bundle lens.js -n "My Lens" --identifier-system https://example.org/fhir/lens-ids

See code: src/commands/bundle.ts

lens-tool-bundler check FILE

Check integrity between JavaScript file and FHIR Library bundle content.

USAGE
  $ lens-tool-bundler check FILE [-b <value>] [-n <value>] [-q] [--source-encoding <value>]

ARGUMENTS
  FILE  JavaScript file to check

FLAGS
  -b, --bundle=<value>           path to the bundle file to check
  -n, --name=<value>             name of the bundle to check (without .json extension)
  -q, --quiet                    suppress output, only return exit code
      --source-encoding=<value>  source file encoding (auto-detected if omitted)

DESCRIPTION
  Check integrity between JavaScript file and FHIR Library bundle content.

EXAMPLES
  $ lens-tool-bundler check mylens.js

  $ lens-tool-bundler check mylens.js -n MyLens

  $ lens-tool-bundler check mylens.js -b MyLens.json

See code: src/commands/check.ts

lens-tool-bundler help [COMMAND]

Display help for lens-tool-bundler.

USAGE
  $ lens-tool-bundler help [COMMAND...] [-n]

ARGUMENTS
  COMMAND...  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for lens-tool-bundler.

See code: @oclif/plugin-help

lens-tool-bundler lsenhancejs [DIRECTORY]

List valid enhance JavaScript files in a directory (similar to ls).

USAGE
  $ lens-tool-bundler lsenhancejs [DIRECTORY] [-d] [-j]

ARGUMENTS
  DIRECTORY  [default: .] directory to search for enhance JS files

FLAGS
  -d, --details  show details about matches (exact vs fallback)
  -j, --json     output as JSON format

DESCRIPTION
  List valid enhance JavaScript files in a directory (similar to ls).

EXAMPLES
  $ lens-tool-bundler lsenhancejs

  $ lens-tool-bundler lsenhancejs ./lenses

  $ lens-tool-bundler lsenhancejs -d

  $ lens-tool-bundler lsenhancejs ./lenses | xargs -I {} echo "Processing: {}"

See code: src/commands/lsenhancejs.ts

lens-tool-bundler lslens [DIRECTORY]

List valid FHIR lenses in a directory (similar to ls).

USAGE
  $ lens-tool-bundler lslens [DIRECTORY] [-a] [--almost-valid] [-j] [-r] [-v]

ARGUMENTS
  DIRECTORY  [default: .] directory to search for lenses

FLAGS
  -a, --all           include lenses that may be missing content (base64 data)
  -j, --json          output as JSON format
  -r, --show-reasons  show what is missing for full validation
  -v, --validate      include full validation report for each lens
      --almost-valid  show almost-valid lenses (missing only content or minor fields)

DESCRIPTION
  List valid FHIR lenses in a directory (similar to ls).

EXAMPLES
  $ lens-tool-bundler lslens

  $ lens-tool-bundler lslens ./lenses

  $ lens-tool-bundler lslens -a

  $ lens-tool-bundler lslens -v

  $ lens-tool-bundler lslens --almost-valid

  $ lens-tool-bundler lslens --show-reasons

  $ lens-tool-bundler lslens ./lenses | xargs -I {} echo "Processing: {}"

See code: src/commands/lslens.ts

lens-tool-bundler new NAME

Creates a new lens with JavaScript file and FHIR bundle.

USAGE
  $ lens-tool-bundler new NAME [-d] [-f] [--fork] [--identifier-system <value>] [-t]

ARGUMENTS
  NAME  name of the lens to create

FLAGS
  -d, --default                    use default values for the bundle
  -f, --force                      overwrite existing files if they exist
  -t, --template                   clone the full lens-template repository with all features
      --fork                       fork the template repository using GitHub CLI (requires gh CLI)
      --identifier-system=<value>  FHIR identifier system to set on the resource

DESCRIPTION
  Creates a new lens with JavaScript file and FHIR bundle.

EXAMPLES
  $ lens-tool-bundler new MyLens

  $ lens-tool-bundler new MyLens -d

  $ lens-tool-bundler new "My Lens" -d --identifier-system https://example.org/fhir/lens-ids

  $ lens-tool-bundler new MyLens --template

  $ lens-tool-bundler new MyLens --template --fork

See code: src/commands/new.ts

lens-tool-bundler plugins

List installed plugins.

USAGE
  $ lens-tool-bundler plugins [--json] [--core]

FLAGS
  --core  Show core plugins.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List installed plugins.

EXAMPLES
  $ lens-tool-bundler plugins

See code: @oclif/plugin-plugins

lens-tool-bundler plugins:install PLUGIN...

Installs a plugin into the CLI.

USAGE
  $ lens-tool-bundler plugins add plugins:install PLUGIN...

ARGUMENTS
  PLUGIN...  Plugin to install.

FLAGS
  -f, --force    Run yarn install with force flag.
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Installs a plugin into the CLI.
  Can be installed from npm or a git url.

  Installation of a user-installed plugin will override a core plugin.

  e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
  will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
  the CLI without the need to patch and update the whole CLI.


ALIASES
  $ lens-tool-bundler plugins add

EXAMPLES
  $ lens-tool-bundler plugins:install myplugin 

  $ lens-tool-bundler plugins:install https://github.com/someuser/someplugin

  $ lens-tool-bundler plugins:install someuser/someplugin

lens-tool-bundler plugins:inspect PLUGIN...

Displays installation properties of a plugin.

USAGE
  $ lens-tool-bundler plugins inspect PLUGIN...

ARGUMENTS
  PLUGIN...  [default: .] Plugin to inspect.

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Displays installation properties of a plugin.

EXAMPLES
  $ lens-tool-bundler plugins:inspect myplugin

See code: @oclif/plugin-plugins

lens-tool-bundler plugins:install PLUGIN...

Installs a plugin into the CLI.

USAGE
  $ lens-tool-bundler plugins install PLUGIN...

ARGUMENTS
  PLUGIN...  Plugin to install.

FLAGS
  -f, --force    Run yarn install with force flag.
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Installs a plugin into the CLI.
  Can be installed from npm or a git url.

  Installation of a user-installed plugin will override a core plugin.

  e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
  will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
  the CLI without the need to patch and update the whole CLI.


ALIASES
  $ lens-tool-bundler plugins add

EXAMPLES
  $ lens-tool-bundler plugins:install myplugin 

  $ lens-tool-bundler plugins:install https://github.com/someuser/someplugin

  $ lens-tool-bundler plugins:install someuser/someplugin

See code: @oclif/plugin-plugins

lens-tool-bundler plugins:link PLUGIN

Links a plugin into the CLI for development.

USAGE
  $ lens-tool-bundler plugins link PLUGIN

ARGUMENTS
  PATH  [default: .] path to plugin

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Links a plugin into the CLI for development.
  Installation of a linked plugin will override a user-installed or core plugin.

  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
  command will override the user-installed or core plugin implementation. This is useful for development work.


EXAMPLES
  $ lens-tool-bundler plugins:link myplugin

See code: @oclif/plugin-plugins

lens-tool-bundler plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ lens-tool-bundler plugins remove plugins:uninstall PLUGIN...

ARGUMENTS
  PLUGIN  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ lens-tool-bundler plugins unlink
  $ lens-tool-bundler plugins remove

lens-tool-bundler plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ lens-tool-bundler plugins uninstall PLUGIN...

ARGUMENTS
  PLUGIN  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ lens-tool-bundler plugins unlink
  $ lens-tool-bundler plugins remove

See code: @oclif/plugin-plugins

lens-tool-bundler plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ lens-tool-bundler plugins unlink plugins:uninstall PLUGIN...

ARGUMENTS
  PLUGIN  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ lens-tool-bundler plugins unlink
  $ lens-tool-bundler plugins remove

lens-tool-bundler plugins update

Update installed plugins.

USAGE
  $ lens-tool-bundler plugins update [-h] [-v]

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Update installed plugins.

See code: @oclif/plugin-plugins

lens-tool-bundler test FILE

Run comprehensive tests on a FHIR lens.

USAGE
  $ lens-tool-bundler test FILE [-v]

ARGUMENTS
  FILE  lens file to test (JSON format)

FLAGS
  -v, --verbose  show detailed test output

DESCRIPTION
  Run comprehensive tests on a FHIR lens.

EXAMPLES
  $ lens-tool-bundler test my-lens.json

  $ lens-tool-bundler test ./lenses/enhance-lens.json

See code: src/commands/test.ts

lens-tool-bundler upload FILE

upload file (json format) to a valid FHIR server.

USAGE
  $ lens-tool-bundler upload FILE -d <value> [--identifier-system <value>]

ARGUMENTS
  FILE  file to read

FLAGS
  -d, --domain=<value>             (required) domain where FHIR server is hosted (with http/https)
      --identifier-system=<value>  FHIR identifier system to set before upload

DESCRIPTION
  upload file (json format) to a valid FHIR server.

EXAMPLES
  $ lens-tool-bundler upload

  $ lens-tool-bundler upload my-lens.json -d https://example.org/fhir --identifier-system https://example.org/fhir/lens-ids

See code: src/commands/upload.ts

lens-tool-bundler batch-bundle [DIRECTORY]

Batch process and bundle multiple lenses in a directory.

USAGE
  $ lens-tool-bundler batch-bundle [DIRECTORY] [-e <value>...] [-f] [-d] [-s] [--source-encoding <value>]

ARGUMENTS
  [DIRECTORY]  [default: .] directory containing lenses to bundle

FLAGS
  -d, --skip-date                do not update the date field when bundling
  -e, --exclude=<value>...       regex pattern to exclude files/directories (can be used multiple times)
  -f, --force                    force bundle all lenses even if content is up to date
  -s, --skip-valid               skip lenses that already have valid base64 content
      --source-encoding=<value>  source file encoding (auto-detected if omitted)

DESCRIPTION
  Batch process and bundle multiple lenses in a directory.

EXAMPLES
  $ lens-tool-bundler batch-bundle

  $ lens-tool-bundler batch-bundle ./lenses

  $ lens-tool-bundler batch-bundle ./lenses --skip-valid

  $ lens-tool-bundler batch-bundle ./lenses --skip-date

  $ lens-tool-bundler batch-bundle ./lenses --exclude "test.*" --exclude ".*\.draft\.json$"

  $ lens-tool-bundler batch-bundle ./lenses --exclude "node_modules"

See code: src/commands/batch-bundle.ts

lens-tool-bundler batch-check [DIRECTORY]

Batch check integrity between all lens JavaScript files and their FHIR Library bundles.

USAGE
  $ lens-tool-bundler batch-check [DIRECTORY] [-e <value>...] [-j] [-q] [--source-encoding <value>]

ARGUMENTS
  [DIRECTORY]  [default: .] directory to search for lens files

FLAGS
  -e, --exclude=<value>...       regex pattern to exclude files/directories (can be used multiple times)
  -j, --json                     output results as JSON
  -q, --quiet                    suppress output, only return exit code
      --source-encoding=<value>  source file encoding (auto-detected if omitted)

DESCRIPTION
  Batch check integrity between all lens JavaScript files and their FHIR Library bundles.

EXAMPLES
  $ lens-tool-bundler batch-check

  $ lens-tool-bundler batch-check ./lenses

  $ lens-tool-bundler batch-check -q

  $ lens-tool-bundler batch-check --json

  $ lens-tool-bundler batch-check ./lenses --exclude "test.*" --exclude ".*\.draft\.json$"

See code: src/commands/batch-check.ts

lens-tool-bundler batch-test [DIRECTORY]

Batch test multiple lenses in a directory.

USAGE
  $ lens-tool-bundler batch-test [DIRECTORY] [-e <value>] [-f] [-v]

ARGUMENTS
  [DIRECTORY]  [default: .] directory containing lenses to test

FLAGS
  -e, --exclude=<value>  regex pattern to exclude files (applied to filename)
  -f, --fail-fast        stop on first test failure
  -v, --verbose          show detailed test output for each lens

DESCRIPTION
  Batch test multiple lenses in a directory.

EXAMPLES
  $ lens-tool-bundler batch-test

  $ lens-tool-bundler batch-test ./lenses

  $ lens-tool-bundler batch-test ./lenses --exclude "test.*"

  $ lens-tool-bundler batch-test ./lenses --verbose

See code: src/commands/batch-test.ts

lens-tool-bundler batch-upload [DIRECTORY]

Batch process and upload multiple lenses to a FHIR server.

USAGE
  $ lens-tool-bundler batch-upload [DIRECTORY] -d <value> [-e <value>] [-f] [-t] [-s] [--source-encoding <value>]

ARGUMENTS
  [DIRECTORY]  [default: .] directory containing lenses to upload

FLAGS
  -d, --domain=<value>           (required) domain where FHIR server is hosted (with http/https)
  -e, --exclude=<value>          regex pattern to exclude files (applied to filename)
  -f, --force                    force bundle all lenses even if content is up to date
  -s, --skip-valid               skip lenses that already have valid base64 content
  -t, --skip-date                do not update the date field when bundling
      --source-encoding=<value>  source file encoding (auto-detected if omitted)

DESCRIPTION
  Batch process and upload multiple lenses to a FHIR server.

EXAMPLES
  $ lens-tool-bundler batch-upload -d https://fosps.gravitatehealth.eu/epi/api/fhir

  $ lens-tool-bundler batch-upload ./lenses -d https://fosps.gravitatehealth.eu/epi/api/fhir

  $ lens-tool-bundler batch-upload ./lenses -d https://fosps.gravitatehealth.eu/epi/api/fhir --skip-valid

  $ lens-tool-bundler batch-upload ./lenses -d https://fosps.gravitatehealth.eu/epi/api/fhir --exclude "test.*"

See code: src/commands/batch-upload.ts

lens-tool-bundler bundle FILE

Bundles raw lenses into a FHIR compliant single file.

USAGE
  $ lens-tool-bundler bundle FILE [-b <value>] [-d] [-n <value>] [-p] [--source-encoding <value>] [-u]

ARGUMENTS
  FILE  file to read

FLAGS
  -b, --bundle=<value>           path to target Library json file (auto-detected if omitted)
  -d, --default                  use default values for the bundle
  -n, --name=<value>             name to apply to lens
  -p, --package-json             use values from package.json to populate FHIR library
  -u, --update                   update existing bundle file (content and date only)
      --source-encoding=<value>  source file encoding (auto-detected if omitted)

DESCRIPTION
  Bundles raw lenses into a FHIR compliant single file.

EXAMPLES
  $ lens-tool-bundler bundle lens.js -n my-lens

  $ lens-tool-bundler bundle lens.js -n my-lens -d

  $ lens-tool-bundler bundle lens.js -p

  $ lens-tool-bundler bundle lens.js -u

  $ lens-tool-bundler bundle lens.js -u --bundle my-lens.json

  $ lens-tool-bundler bundle lens.js -n my-lens --bundle target-lens.json

  $ lens-tool-bundler bundle lens.js -n my-lens --source-encoding windows-1252

See code: src/commands/bundle.ts

lens-tool-bundler check FILE

Check integrity between JavaScript file and FHIR Library bundle content.

USAGE
  $ lens-tool-bundler check FILE [-b <value>] [-n <value>] [-q] [--source-encoding <value>]

ARGUMENTS
  FILE  JavaScript file to check

FLAGS
  -b, --bundle=<value>           path to the bundle file to check
  -n, --name=<value>             name of the bundle to check (without .json extension)
  -q, --quiet                    suppress output, only return exit code
      --source-encoding=<value>  source file encoding (auto-detected if omitted)

DESCRIPTION
  Check integrity between JavaScript file and FHIR Library bundle content.

EXAMPLES
  $ lens-tool-bundler check mylens.js

  $ lens-tool-bundler check mylens.js -n MyLens

  $ lens-tool-bundler check mylens.js -b MyLens.json

See code: src/commands/check.ts

lens-tool-bundler help [COMMAND]

Display help for lens-tool-bundler.

USAGE
  $ lens-tool-bundler help [COMMAND...] [-n]

ARGUMENTS
  [COMMAND...]  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for lens-tool-bundler.

See code: @oclif/plugin-help

lens-tool-bundler lsenhancejs [DIRECTORY]

List valid enhance JavaScript files in a directory (similar to ls).

USAGE
  $ lens-tool-bundler lsenhancejs [DIRECTORY] [-d] [-j]

ARGUMENTS
  [DIRECTORY]  [default: .] directory to search for enhance JS files

FLAGS
  -d, --details  show details about matches (exact vs fallback)
  -j, --json     output as JSON format

DESCRIPTION
  List valid enhance JavaScript files in a directory (similar to ls).

EXAMPLES
  $ lens-tool-bundler lsenhancejs

  $ lens-tool-bundler lsenhancejs ./lenses

  $ lens-tool-bundler lsenhancejs -d

  $ lens-tool-bundler lsenhancejs ./lenses | xargs -I {} echo "Processing: {}"

See code: src/commands/lsenhancejs.ts

lens-tool-bundler lslens [DIRECTORY]

List valid FHIR lenses in a directory (similar to ls).

USAGE
  $ lens-tool-bundler lslens [DIRECTORY] [-a] [--almost-valid] [-j] [-r] [-v]

ARGUMENTS
  [DIRECTORY]  [default: .] directory to search for lenses

FLAGS
  -a, --all           include lenses that may be missing content (base64 data)
  -j, --json          output as JSON format
  -r, --show-reasons  show what is missing for full validation
  -v, --validate      include full validation report for each lens
      --almost-valid  show almost-valid lenses (missing only content or minor fields)

DESCRIPTION
  List valid FHIR lenses in a directory (similar to ls).

EXAMPLES
  $ lens-tool-bundler lslens

  $ lens-tool-bundler lslens ./lenses

  $ lens-tool-bundler lslens -a

  $ lens-tool-bundler lslens -v

  $ lens-tool-bundler lslens --almost-valid

  $ lens-tool-bundler lslens --show-reasons

  $ lens-tool-bundler lslens ./lenses | xargs -I {} echo "Processing: {}"

See code: src/commands/lslens.ts

lens-tool-bundler new NAME

Creates a new lens with JavaScript file and FHIR bundle.

USAGE
  $ lens-tool-bundler new NAME [-d] [-f] [--fork] [-t]

ARGUMENTS
  NAME  name of the lens to create

FLAGS
  -d, --default   use default values for the bundle
  -f, --force     overwrite existing files if they exist
  -t, --template  clone the full lens-template repository with all features
      --fork      fork the template repository using GitHub CLI (requires gh CLI)

DESCRIPTION
  Creates a new lens with JavaScript file and FHIR bundle.

EXAMPLES
  $ lens-tool-bundler new MyLens

  $ lens-tool-bundler new MyLens -d

  $ lens-tool-bundler new MyLens --template

  $ lens-tool-bundler new MyLens --template --fork

See code: src/commands/new.ts

lens-tool-bundler plugins

List installed plugins.

USAGE
  $ lens-tool-bundler plugins [--json] [--core]

FLAGS
  --core  Show core plugins.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List installed plugins.

EXAMPLES
  $ lens-tool-bundler plugins

See code: @oclif/plugin-plugins

lens-tool-bundler plugins:install PLUGIN...

Installs a plugin into the CLI.

USAGE
  $ lens-tool-bundler plugins add plugins:install PLUGIN...

ARGUMENTS
  PLUGIN...  Plugin to install.

FLAGS
  -f, --force    Run yarn install with force flag.
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Installs a plugin into the CLI.
  Can be installed from npm or a git url.

  Installation of a user-installed plugin will override a core plugin.

  e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
  will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
  the CLI without the need to patch and update the whole CLI.


ALIASES
  $ lens-tool-bundler plugins add

EXAMPLES
  $ lens-tool-bundler plugins:install myplugin 

  $ lens-tool-bundler plugins:install https://github.com/someuser/someplugin

  $ lens-tool-bundler plugins:install someuser/someplugin

lens-tool-bundler plugins:inspect PLUGIN...

Displays installation properties of a plugin.

USAGE
  $ lens-tool-bundler plugins inspect PLUGIN...

ARGUMENTS
  PLUGIN...  [default: .] Plugin to inspect.

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Displays installation properties of a plugin.

EXAMPLES
  $ lens-tool-bundler plugins:inspect myplugin

See code: @oclif/plugin-plugins

lens-tool-bundler plugins:install PLUGIN...

Installs a plugin into the CLI.

USAGE
  $ lens-tool-bundler plugins install PLUGIN...

ARGUMENTS
  PLUGIN...  Plugin to install.

FLAGS
  -f, --force    Run yarn install with force flag.
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Installs a plugin into the CLI.
  Can be installed from npm or a git url.

  Installation of a user-installed plugin will override a core plugin.

  e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
  will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
  the CLI without the need to patch and update the whole CLI.


ALIASES
  $ lens-tool-bundler plugins add

EXAMPLES
  $ lens-tool-bundler plugins:install myplugin 

  $ lens-tool-bundler plugins:install https://github.com/someuser/someplugin

  $ lens-tool-bundler plugins:install someuser/someplugin

See code: @oclif/plugin-plugins

lens-tool-bundler plugins:link PLUGIN

Links a plugin into the CLI for development.

USAGE
  $ lens-tool-bundler plugins link PLUGIN

ARGUMENTS
  PATH  [default: .] path to plugin

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Links a plugin into the CLI for development.
  Installation of a linked plugin will override a user-installed or core plugin.

  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
  command will override the user-installed or core plugin implementation. This is useful for development work.


EXAMPLES
  $ lens-tool-bundler plugins:link myplugin

See code: @oclif/plugin-plugins

lens-tool-bundler plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ lens-tool-bundler plugins remove plugins:uninstall PLUGIN...

ARGUMENTS
  [PLUGIN]  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ lens-tool-bundler plugins unlink
  $ lens-tool-bundler plugins remove

lens-tool-bundler plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ lens-tool-bundler plugins uninstall PLUGIN...

ARGUMENTS
  [PLUGIN]  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ lens-tool-bundler plugins unlink
  $ lens-tool-bundler plugins remove

See code: @oclif/plugin-plugins

lens-tool-bundler plugins:uninstall PLUGIN...

Removes a plugin from the CLI.

USAGE
  $ lens-tool-bundler plugins unlink plugins:uninstall PLUGIN...

ARGUMENTS
  [PLUGIN]  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ lens-tool-bundler plugins unlink
  $ lens-tool-bundler plugins remove

lens-tool-bundler plugins update

Update installed plugins.

USAGE
  $ lens-tool-bundler plugins update [-h] [-v]

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Update installed plugins.

See code: @oclif/plugin-plugins

lens-tool-bundler test FILE

Run comprehensive tests on a FHIR lens.

USAGE
  $ lens-tool-bundler test FILE [-v]

ARGUMENTS
  FILE  lens file to test (JSON format)

FLAGS
  -v, --verbose  show detailed test output

DESCRIPTION
  Run comprehensive tests on a FHIR lens.

EXAMPLES
  $ lens-tool-bundler test my-lens.json

  $ lens-tool-bundler test ./lenses/enhance-lens.json

See code: src/commands/test.ts

lens-tool-bundler upload FILE

upload file (json format) to a valid FHIR server.

USAGE
  $ lens-tool-bundler upload FILE -d <value>

ARGUMENTS
  FILE  file to read

FLAGS
  -d, --domain=<value>  (required) domain where FHIR server is hosted (with http/https)

DESCRIPTION
  upload file (json format) to a valid FHIR server.

EXAMPLES
  $ lens-tool-bundler upload

See code: src/commands/upload.ts