Skip to content

Repository files navigation

NeoRadar CLI

What is it?

NeoRadar Command Line Tool (CLI) is a tool to perform various operations on your neoradar packages, and help with quick conversion and generation of packages from EuroScope.

Currently, the CLI allows you to:

  • Create a new package and package environment from scratch
  • Convert an SCT2 to NeoRadar geojson
  • Convert an ESE to NeoRadar Sectorfile Extension (NSE) and to NeoRadar ATC Data
  • Convert ES Alises to NeoRadar format
  • Convert ICAO Aircrafts and ICAO Airlines to NeoRadar format
  • Index all your geojson features into NeoRadar's map index in the NSE
  • Build an SQLite airways database from EuroScope airway.txt and isec.txt

It will soon cover conversions of TopSky Maps to NeoRadar.

See the manual of the tool with neoradar-cli help

Quickstart

Installation

The CLI requires NodeJS 24 and pnpm 10, see NodeJS installation guides for help.

Install the CLI tool: pnpm add -g github:neoradar-project/cli

Creating the new environment

Create a new package: neoradar-cli init ./MyNewPackage --lat 42.000 --lon 1.000 --name LFXX_FULL_PACKAGE --namespace lfxx

Replace lat and lon with a latitude and longitude in decimal degree of a point that is roughly at the center of the area covered by your package. Replace the value of -o with your chosen output directory, and replace -s with a short, all character namespace name that will not change between versions of your package

You will now be presented with a folder structure like below which includes: ASRs euroscope_data icao_data package sector_files symbols

Setting up the environment

Let's go through each one of them and which files the tool expects:

  • ASRs/ - Place any EuroScope ASRs that will be converted to NeoRadar format when using the converter

  • euroscope_data/ - Place here your aliases with a file name of Alias.txt, as well as your login profiles with a filename of LoginProfiles.txt (you can also create a folder named LoginProfiles and drop in multiple text files which will be combined with all your login profiles)

  • icao_data/ - Place here your ICAO_Aircraft.txt and ICAO_Airlines.txt files. You can also add a recat.json file which can be used to map ICAO codes to a RECAT code, see the misc folder in the repository of the CLI for an example for RECAT-EU

  • package/ - This is where your actual package gets generated, feel free to modify and add all your necessary files in there

  • sector_files/ - Place here an SCT or SCT2 file, as well an ESE, the names of those file does not matter

  • symbols/ - Place here all .png files you want to converted into the symbols.json and symbols.png atlas inside the package/images folder

A file called config.json is also placed at the root of the environment. Edit this file with relevant settings, you can leave publish to null if you do not intend to publish the package to an S3 endpoint. You must change the parameter sectorFileFromGNG to true if you are converting sector files that were generated by GNG.

Running the converter

neoradar-cli convert ./MyNewPackage

The conversion will now start, and you may be prompted with several questions. In case of errors, a log file will be created in the current working directory called neoradar-cli.log

Preparing the package for distribution

Once your package is ready, and you have made the required changes, you can prepare the package for distribution by running the following command:

neoradar-cli distribute ./MyNewPackage

This will create a polished ZIP file containing your package, the content of which you can drop in NeoRadar/packages and start using!

Publishing

To upload the package to object storage, run distribute with the publish flag:

neoradar-cli distribute ./MyNewPackage --publish

This reads the publish block of config.json. Two providers are supported.

AWS S3 (default):

{
  "sectorFileFromGNG": true,
  "publish": {
    "provider": "s3",
    "bucketName": "neoradar",
    "region": "eu-west-2",
    "makePublic": true,
    "envVariableAccessKeyId": "AWS_ACCESS_KEY_ID",
    "envVariableSecretAccessKey": "AWS_SECRET_ACCESS_KEY"
  }
}

Cloudflare R2 (S3-compatible):

{
  "sectorFileFromGNG": true,
  "publish": {
    "provider": "r2",
    "bucketName": "neoradar-packages",
    "endpoint": "https://<account-id>.r2.cloudflarestorage.com",
    "baseUrl": "https://pkg.neoradar.app",
    "s3Path": "",
    "envVariableAccessKeyId": "R2_ACCESS_KEY_ID",
    "envVariableSecretAccessKey": "R2_SECRET_ACCESS_KEY",
    "cloudflare": { "zoneId": "<zone-id>", "envVariableApiToken": "CF_API_TOKEN" }
  }
}

Notes for R2:

  • endpoint and baseUrl are required. baseUrl must be your public custom domain (the R2 S3 endpoint is not publicly readable), and it is what the client uses for downloadUrl / deltaFilesBaseUrl.
  • R2 has no per-object ACLs, so makePublic is ignored — grant public access by binding a custom domain (or enabling r2.dev) in the Cloudflare dashboard.
  • Credentials come from the two env vars (mapped to the standard AWS env vars the SDK reads).
  • The optional cloudflare block purges the manifest (and download URL) from Cloudflare's cache after each publish so clients see the update immediately. The token needs Zone → Cache Purge. Add extra URLs to purge (e.g. a top-level providers.json) via "purgeUrls": ["https://pkg.neoradar.app/providers.json"].

Caching: manifest.json is always uploaded no-cache so update checks see fresh data. Every other file uses cacheControl (default no-cache). Only set a long cacheControl (e.g. "public, max-age=31536000, immutable") if your file paths are versioned/immutable — the default delta layout overwrites files in place, where long caching would serve stale content.

Building an airways database

neoradar-cli build-airways ./MyNewPackage/sector_files/NavData

The path argument must be a directory containing both airway.txt and isec.txt (the standard EuroScope NavData layout). The command parses both files and writes a single SQLite database with waypoints, airways, direct_segments, and a traversable_paths view ready for route validation.

If -o is omitted, the database is written to server-artifacts/airways.db next to the input files. A typical LFXX dataset (~9 MB airway.txt + ~8 MB isec.txt) builds in roughly 3 seconds.

airways.db is a licensed, server-only artifact (Navigraph-derived) — it is uploaded privately for the NeoRadar server, never shipped inside a distributed package. Do not point -o at anything under package/: distribute defensively warns and strips any airways.db it finds inside the package before zipping, but the file should never be produced there in the first place.

Development

Run the test suite with pnpm test (uses the built-in node:test runner).

About

CLI Tool for neoradar for packaging and releasing sector files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages