Stellarium Scripting with Typescript

Stellarium Automation with Typescript and Visual Studio Code


This article will focus on setting up the "Typescript For Stellarium" toolchain for an Ubuntu based Linux system as well as for the Windows 10 Operating system.

Stellarium and Visual Studio Code

First and foremost you should install the current versions of Stellarium and Visual Studio code.

Typescript and Webpack

Furthermore the Typescript transpiler (> 3.0) is needed for transpiling the typescript source code into ECMAScript and Webpack is required for bundling it into a single file.

The following instructions will install the required packages. Please note that some of the packages will be installed to the local users home directory! After executing the commands you will find a newly created folder named "node_modules".


# Install npm and typescript
sudo apt install npm            # may already be installed
sudo npm install -g typescript

# Install webpack and ts-loader in the user home directory
cd ~
npm install webpack webpack-cli --save-dev 
npm install ts-loader


npm is part of node.js. Get the node.js installer from Then install typescript, webpack and the ts-loader locally:
npm install webpack webpack-cli ts-loader typescript --save-dev

Download Sample Projects

Once you have installed Visual Studio Code, Typescript and Webpack you can start with creating Stellarium scripts in Typescript. Continue by downloading the sample projects from github.


You might also like: