Skip to content

maximsenterprise/hast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hast, command helper

Hast is a project created by Maxims Enterprise that allows you to create simple files that you can run to the terminal as it would in a 'Makefile'

Setup

First download the files and use this command to copy the 'Hast' folder to your bash folder:

macOS and Linux

mv ./hast/src /usr/local/bin
chmod +x hast.sh
mv hast.sh /usr/local/bin/hast

Be sure to have Deno installed


To start create a 'Hastentry' or '.hast' file in your location

touch Hastentry
touch a.hast

Then, open your Hastentry in your desire IDE or Text Editor. ex.

sudo nano ./Hastentry
code ./Hastentry
nvim ./Hastentry
fleet ./Hastentry

If you want you can install our Visual Studio Code Extension here: -

Run

To run a .hast or a Hastentry file, type to the console:

  • If you want to run the main section: hast
  • If you want to run the clear section: hast clear
  • If you want to run the run section: hast run
  • If you want to run custom sections: hast customName

    Be aware that the data section will always run
    Be aware that to run a custom section it needs to be declared with hast-custom

Overview

A 'Hastentry' is divided in 4 locations:

  • Data: for defining variables

  • Main: for normal uses

  • Clean: for cleaning your mess

  • Run: for running your code

  • Others: to define your own functions

Each section is defined by putting hast- in front of each name, like this:

hast-data
hast-main
hast-clear
hast-run
hast-custom

There are two types of locations:

Data Entry

This is defined with: hast-data and it usually goes at the beggining of the file, there you define variables following this pattern:

hast-data

*This defines a variable like:*
*$varName: varVal*

$hello: Hello, World!
$bye: Bye, World!

Other Entries

In other entries like: hast-main, hast-run or hast-clear you can do two commands:

(print)

You can print things to the screeen:

hast-data
$hello: Hello,
hast-main
(print) $(hello) World!

Be aware that variables overlap like this.

(run)

Use (run) to run commands:

hast-data
$path = ./hello/main.ts
hast-main
(run) touch $(path)

About

A Simple Programming Language for commands and executers in the terminal built in TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published