https://github.com/dan-online/nova
🚀🔥Nova, the programming language built for powerful simplicity
https://github.com/dan-online/nova
cli-nova coding-language computer-science easy language learning node nova nova-beta novascripts ns powerful programming-language simple
Last synced: 10 days ago
JSON representation
🚀🔥Nova, the programming language built for powerful simplicity
- Host: GitHub
- URL: https://github.com/dan-online/nova
- Owner: dan-online
- License: mit
- Created: 2019-12-19T18:38:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-03T08:23:45.000Z (over 1 year ago)
- Last Synced: 2025-04-24T01:06:39.389Z (10 days ago)
- Topics: cli-nova, coding-language, computer-science, easy, language, learning, node, nova, nova-beta, novascripts, ns, powerful, programming-language, simple
- Language: JavaScript
- Homepage: https://npmjs.org/package/cli-nova
- Size: 65.8 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Support: support/.vscode/launch.json
Awesome Lists containing this project
README
![]()
Welcome to Nova 👋 (Beta)
## Table of Contents
- [About](#About)
- [Usage](#usage)
- [Install](#install)
- [Run](#run)
- [Documentation](#documentation)# About
Nova is an opensource programming language built on node. The purpose of Nova is to make a pure psuedo-code language that is the perfect introduction into computer science. Completely built on [node](https://github.com/nodejs/node) v12 and connected to npm packages, Nova is optimized for running on mac, linux and windows!
I made this project to make a pseudocode based language that simplified computer science. Nova's main purpose is to make it easier for non-programmers to learn the basics of coding. Using words such as "set" and "as" and "equals" makes it easier to follow and understand what is happening.
To get started go to [usage](#usage) and start your Nova journey today.
To support me, [DanCodes](https://github.com/dan-online), you can donate to my [Patreon](https://patreon.com/mayorchano) or just give this project a star :)
# Usage
To use nova you can either evaluate with the "-e/--eval" option in the command line or make a novascript. A novascript is a file ending in ``.ns`` and is made for nova. These files can be ran by the nova-cli.
## Install
```bash
$ npm i -g cli-nova
```## Run
```bash
$ nova [options] [file]
```## Example runs
```bash
$ nova test.ns
``````bash
$ nova --verbose test.ns
``````bash
$ nova -e "output.log('HI!');"
```## Examples
```swift
// We recommend setting swift for language highlightingset variable as "hello"; // "Strings"
output.log(variable); // Loggingset two as 1 + 1; // Numbers
set array as [1,2,3,4,5];set chalk as include("chalk"); // Npm integration
output.log(chalk.red("Red text")); // Logs redoutput.log(12 / 2 % 2 + 1); // Logs 3
if two equals 2 then output.log("two is equal to 2");
if two isnot 2 then output.log("won't be logged") else output.log("two is not not equal to 2");
```
# Documentation
## Variables
For variables we use two keywords, "set" and "as". All variable values are evaluated on initiation and stored in memory. They can be referenced at any time throughout the code and are global.
```swift
set hello as "world1";
output.log("hello " + hello.slice(0, -1)); // output: hello world
```Variables can also be set to npm modules and other files. Modules can be installed using [npm](https://npmjs.org).
```swift
set chalk as include("chalk");
set path as include("path");
set redText as chalk.red("red text");output.log(redText);
set package as include(path.resolve("./package.json"));
output.log("Running v" + package.version);```
## Global Variables
### Args
Description: Args is defined as arguments passed in the command line when starting nova.
Type: Array
Example:
```bash
// test.ns
output.log(args);// Command line
$ nova test.ns --test
['--test']
```### Platform
Description: The platform the program is being run on, for example: linux, darwin and win32
Type: String
Example:
```bash
// test.ns
output.log(platform);// Command line on macbook
$ nova test.ns
darwin
```### Process
Description: The process running containing information and functions to manipulate
Type: Object
Examples:
```bash
// test.ns
set exitCode as 0;
output.log("Process id is " + process.pid);
process.exit(exitCode);// Command line
$ nova test.ns
Process id is 12345
```### Nova
Description: File information and Nova information
Type: Object
Examples:
```bash
// test.ns
output.log(Nova);// Command line
$ nova test.ns
{
directory: '/files',
node: 'vX',
version: 'vX',
}
```### Tickers
Description: Intervals and timers that allow you to run something every certain time or after a certain time
Type: Function
Examples:
```bash
// test.ns
set timer as startTimer(() => { output.log("After one second, I have logged") }, 1000);
set interval as startInterval(() => { output.log("I log every 5 seconds") }, 5000);startTimer(() => { stopTimer(timer); stopInterval(interval); }, 11000);
// Command line
$ nova test.ns
After one second, I have logged
I log every 5 seconds
I log every 5 seconds
```### Include
Description: Include is an alias of node require and allows users to import npm modules and seperate files.
Type: Object
Examples:
```bash
// test.ns
set chalk as include("chalk");
output.log(chalk.red("I am red text :)"));// Command line
$ nova test.ns
I am red text :)
```### Output
Description: Output is an alias of node console and lets you output to the console
Type: Object
Examples:
```bash
// test.ns
output.clear(); // This clears the output
output.log("This is regular log");
output.error("This is an error");
output.info("This is some info");// Command line
This is regular log
This is an error
This is some info
```## Author
👤 **DanCodes **
- Website: https://dancodes.online
- Github: [@dan-online](https://github.com/dan-online)## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/dan-online/Nova/issues).## Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2020 [DanCodes ](https://github.com/dan-online).
This project is [MIT](LICENSE.md) licensed.---
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_
```
```