SkillAgentSearch skills...

Kipper

The Kipper programming language for comprehensive and all-round type safety on the web 🦊✨ Made at HTL Leonding & JKU Linz ~ Open Dev Releases

Install / Use

/learn @Kipper-Lang/Kipper

README

The Kipper programming language - kipper 🦊✨

Version Dev Version codecov Issues License FOSSA Status DOI

Kipper is a JavaScript-like strongly and strictly typed language with Python flavour. It aims to provide straightforward, simple, secure and type-safe coding with better efficiency and developer satisfaction! Integrating strict type handling, runtime types, casts, among many other features, for a safer development experience!

It compiles to both JavaScript and TypeScript, and can be set up in your terminal, Node.js or ES6+ browser. 🦊💻

For more details, you can read more about this project in the sections "Goals & Planned Features" and "Why Kipper?".

General Information

Installation

To install the whole Kipper package with its CLI, run the following command:

npm i kipper

If you are using pnpm or yarn, use pnpm i kipper or yarn add kipper.

Project Packages

  • kipper: The Kipper compiler and API, which ships with all child packages.
  • @kipper/core: The core implementation of the Kipper compiler.
  • @kipper/cli: The Kipper command line interface (CLI).
  • @kipper/web: The standalone web-module for the Kipper compiler.
  • @kipper/target-js: The JavaScript target for the Kipper compiler.
  • @kipper/target-ts: The TypeScript target for the Kipper compiler.

Goals & Planned Features

View the current implementation state in the Kipper Roadmap 🦊🚧.

  • Full compiler ensured type safety, by analysing and reporting code during compilation.
  • Duck typing type checking with TypeScript-like interface types for both compile and runtime.
  • Runtime type and type checking features, where original compile time type issues can be resolved during runtime.
  • Strict cast and conversion handling, so that potentially or definitely problematic usage is detected by the compiler and ensures the developer has to handle them.
  • Avoidance of any type issues, with ensurance of compiler checks that operations and data access are valid.
  • Runtime errors and safety checks in case of incomplete or faulty typing. This should avoid issues, such as "TypeError: can't access property "..." of undefined".
  • Null safety, by enforcing non-null types unless explicitly allowed.
  • Conversion behaviour functions in classes to customise conversion behaviour.
  • Operator overloading and additional customisation behaviour.
  • Type Conversion Overloading to customise conversion behaviour.
  • Full translation to/and integration with JavaScript and TypeScript.
  • Import Support for .ts files, as well as .d.ts + .js files.
  • Translation support for all ES versions as far as ES6 (JavaScript target specific)

How to use Kipper?

To use Kipper you have three options:

In a browser with @kipper/web 🦊🌐

For running Kipper in the browser, you will have to include the kipper-standalone.js file, which provides the Kipper Compiler for the browser and enables the compilation of Kipper code to JavaScript.

Simple example of compiling and running Kipper code in a browser:

<!-- Kipper dependency -->
<script src="https://cdn.jsdelivr.net/npm/@kipper/web@latest/kipper-standalone.min.js"></script>

<!-- You won't have to define Kipper or anything after including the previous file. It will be defined per default  -->
<!-- with the global 'Kipper' -->
<script type="module">
	// Define your own logger and compiler, which will handle the compilation
	const logger = new Kipper.KipperLogger((level, msg) => {
		console.log(`[${Kipper.getLogLevelString(level)}] ${msg}`);
	});
	// Define your own compiler with your wanted configuration
	const compiler = new Kipper.KipperCompiler(logger);

	// Compile the code to JavaScript
	// Top-level await ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#top_level_await
	const result = await compiler.compile(`call print("Hello world!");`, {
		target: new KipperJS.TargetJS(),
	});
	const jsCode = result.write();

	// Finally, run your program
	eval(jsCode);
</script>

Locally using Node.js with @kipper/cli 🦊🖥️

This is to recommend way to use Kipper if you want to dive deeper into Kipper, as it allows you to locally use and run kipper, without depending on a browser.

For example:

  • Compiling a Kipper program:
    kipper compile file.kip
    
  • Executing a Kipper program using Node.js:
    kipper run file.kip
    

This also enables the usage of Kipper files with the .kip extension, which can be read and compiled to TypeScript, without having to configure anything yourself. This also allows the input of data over the console and file-interactions, which are not supported inside a browser.

For more info go to the @kipper/cli README.

Locally in your own code with @kipper/core 🦊⌨️

This is the recommended way if you intend to use kipper in a workflow or write code yourself to manage the compiler. This also allows for special handling of logging and customising the compilation process.

Simple example of using the Kipper Compiler in Node.js:

  • JavaScript (CommonJS):

    const fs = require("fs").promises;
    const kipper = require("@kipper/core");
    const kipperJS = require("@kipper/target-js");
    
    const path = "INSERT_PATH";
    fs.readFile(path, "utf8").then(async (fileContent) => {
    	const compiler = new kipper.KipperCompiler();
    
    	// Compile the code string or stream
    	let result = await compiler.compile(fileContent, { target: new kipperJS.TargetJS() });
    	let jsCode = result.write();
    
    	// Running the Kipper program
    	eval(jsCode);
    });
    
  • TypeScript (CommonJS):

    import { promises as fs } from "fs";
    import { KipperCompiler } from "@kipper/core";
    import { TargetJS } from "@kipper/target-js";
    
    const path = "INSERT_PATH";
    fs.readFile(path, "utf8" as BufferEncoding).then(async (fileContent: string) => {
    	const compiler = new KipperCompiler();
    
    	// Compile the code string or stream
    	let result = await compiler.compile(fileContent, { target: new TargetJS() });
    	let jsCode = result.write();
    
    	// Running the Kipper program
    	eval(jsCode);
    });
    

Why Kipper? 🦊❓

Skip this section, if you are not interested in the details behind Kipper and this project. It is not required knowledge for using or trying out Kipper.

The primary reason for the development of Kipper is the simplification of the development process for developers, both in the web and server-side space, by improving on common type and non-type-related issues. Through this, the language should help developers fix those issues more reliably and quickly.

Therefore, this programming language, like TypeScript, aims to provide more safety and functionality using, among other things, compile-time error checking and transpilation. This primarily relies on the addition of types and type checking, as a way to ensure that programs work as intended and that developers can discover errors before they run their code.

TypeScript already does a great job at this, so why is Kipper needed and how does it do things differently? TypeScript is an amazing language, which is why Kipper has many of its designs and features similarly implemented. A big issue that TypeScript can't detect and properly resolve is the issue of inconsistent or non-determined typing. This is a fundamental issue when working with dynamic data or JavaScript code in TypeScript, where types are unknown or can't be known before runtime. TypeScript is unable to work with this code appropriately and requires the user to make assumptions about its types at compile-time. This leads to many issues where the compiler is unable to check for many potential issues and is often largely turned off, as the developers themselves are required to decide what is correct and often make serious mistakes in t

Related Skills

View on GitHub
GitHub Stars27
CategoryDevelopment
Updated16d ago
Forks5

Languages

TypeScript

Security Score

95/100

Audited on Mar 16, 2026

No findings