**[Firely Terminal](/content/products/firely-terminal/index.html) is the new name for our FHIR command line tool Torinox.** With this name change, we also released exciting new features and an overview video of this nifty cross-platform automation tool.

For a full overview of the core features of Firely Terminal, and the new ValueSet expansion and powerful FQL querying, watch the video or continue reading below! To directly get started, go to the [installation instructions](https://simplifier.net/downloads/firely-terminal) or the [Firely Terminal documentation](https://docs.fire.ly/projects/Firely-Terminal/).

Firely Terminal is a tool for working with FHIR on the command line. It is built on our open-source [Firely .NET SDK](/content/products/firely-net-sdk/index.html) and works on any operating system: Linux, Mac, or Windows. It is the most powerful tool for automating anything in your FHIR development process. This includes synchronizing with Simplifier.net projects, talking to FHIR APIs and validating FHIR specifications and examples.

Below we will expand on the video and end with a future outlook.

## Intro to Firely Terminal ( [0:16](https://www.youtube.com/watch?v=ukD9VR0lOVM&t=16s))

The first things to use are:

- `fhir help`: This will provide you with all the commands and how to use them. And this can also be used to learn more about any other subcommand, for example with `fhir help search`.
- `fhir stack`: Firely Terminal works in most cases with an internal ‘stack’ of resources such as an internal memory of resources we are working with. The `fhir stack` command will show you what’s currently on there. In the beginning this will be empty, but you can add one or more files to it with `fhir push` (for example, `fhir push Patient.json` or `fhir push StructureDefinition-*.xml`) and `fhir show` displays the first resource on the list.

## Using Firely terminal as a FHIR client ( [0:51](https://www.youtube.com/watch?v=ukD9VR0lOVM&t=51s))

For starters, Firely Terminal can function as a [command-line based FHIR client](https://docs.fire.ly/projects/Firely-Terminal/Commands/FHIR-Client-commands.html). It sends resources to FHIR servers and back via their FHIR API.

- `fhir search` allows you to search a FHIR server for resources matching your criteria, for instance:

`fhir search https://server.fire.ly Patient name=Chalmers`
- `fhir read`, `fhir post` and `fhir put` perform the client operations you’d expect on the server and resource of your choice.

## Synchronization with Simplifier.net FHIR projects ( [2:37](https://www.youtube.com/watch?v=ukD9VR0lOVM&t=157s))

Firely Terminal is also a great way to easily [synchronize a local folder with a public or private Simplifier.net project](https://docs.fire.ly/projects/Firely-Terminal/Simplifier-Sync.html). This is useful when you want to work on them with [Forge](/content/products/forge/index.html) or have created a bunch of resources with FHIR Shorthand.

- `fhir login` logs you in and gives you secure access on the command-line to your private projects and resources.
- `fhir projects` lists all projects you have access to.
- `fhir sync` allows you to send your local files to a Simplifier.net project (with `--up`) or the other way around (with `--down`). With `fullsync` also the files that do not exist on the server will be removed from your local folder, so use that one with care.

If your project now contains a `package.json` file, which contains your project dependencies and is automatically created by Simplifier.net, we can install those dependencies locally too with `fhir restore`. If you don’t have a `package.json` yet, just `fhir install` any FHIR packages (from the Implementation Guides and projects you are building on top of) and Firely Terminal will download them to your cache so your project can refer to them.

## Validation and (un)packing bundles ( [4:41](https://www.youtube.com/watch?v=ukD9VR0lOVM&t=281s))

Now you have resources from your Simplifier.net project on your local machine we have something to work with!

- `fhir validate` is a killer feature. It allows you to validate any FHIR conformance resource or example instance against the FHIR rules and your own profiles. Right from the command line and exactly the same as the visual validation in [the Forge FHIR editor](/content/products/forge/index.html), [the Simplifier.net FHIR collaboration platform](/content/products/simplifier-net/index.html) and the API based validation in [Firely Server](/content/products/firely-server/index.html).

(For validating your entire project at once, see the future outlook below)
- [Creating and unpacking FHIR bundles](https://docs.fire.ly/projects/Firely-Terminal/Resource-Operations.html?highlight=bundle#operations-to-perform-with-the-stack) is made easy with `fhir bundle` and `fhir split`.

## Snapshot generation ( [7:37](https://www.youtube.com/watch?v=ukD9VR0lOVM&t=457s))

Not every tool is able to take all the rules FHIR profiles layer on top of each other to create a resulting FHIR data model, the snapshot. [Firely Terminal makes snapshot generation just a single command](https://docs.fire.ly/projects/Firely-Terminal/Resource-Operations.html?highlight=snapshot#snapshot-generation): `fhir snapshot`.

## Filtering and file format conversion ( [9:15](https://www.youtube.com/watch?v=ukD9VR0lOVM&t=555s))

- `fhir filter` is a way to take only a few specific resources from your FHIR project, based on the powerful Firely Query Language.
- Taking these resources of interest, you can save them to XML or JSON with `fhir save`. In addition, this allows you to quickly convert a bunch of XML files to JSON and back.

## ValueSet expansion (and saving back to Simplifier.net) ( [11:27](https://www.youtube.com/watch?v=ukD9VR0lOVM&t=687s))

New in the latest release, available for all our paying customers: Filling the ValueSet expansion part with the actual terms that are part of it:

- `fhir expand` takes your ValueSet, finds the CodeSystem it refers to (as long as the CodeSystem is ‘complete’, having all codes directly in it) and updates the ValueSet to have all its codes.

## Querying with the Firely Query Language ( [13:20](https://www.youtube.com/watch?v=ukD9VR0lOVM&t=800s))

Firely has expanded FHIRPath to a SQL like query language that allows you to quickly query over many FHIR resources: the [Firely Query Language](https://simplifier.net/docs/fql).

- With `fhir query` you can run a FQL statement on your entire project and its dependencies. For example:

`fhir query 'using scope from StructureDefinition select name, url' --output json`

## What’s next?

Firely Terminal opens up a world of FHIR automation to the community. Large customers already use it to validate and generate snapshots on every release or even every commit. But, more is coming! We will soon add the following:

- **Support for full Quality Control**: In Simplifier.net we have just released Quality Control, which allows our users to run FHIR validation and their own custom business rules validation with the click of one button. Immensely powerful. What if you could run this on the command-line every time you made a change? Coming soon.
- And continuing from that: What if you could run Quality Control and any other Firely Terminal feature on every commit and Pull Request in Git? You would know for each contribution whether the resources are still correct and whether your examples still conform to your spec. We will soon make a template available for putting **Firely Terminal in Github Actions** or any other Git automation flow.

[Get started with Firely Terminal right now](/content/products/firely-terminal/index.html) and let us know how it helps your FHIR automation!
