Usage
Tony provides a Command Line Interface to compile and run your programs.
Commands
The following section describes available commands. If you need more information on a given command or want to lookup available options, run tony command -h
.
shell
Not implemented yet
Start a shell session.
Arguments
projects
- a list of projects to initiallize the shell session with
init
Not implemented yet
Initializes a new project within a new directory and installs required dependencies. If project
is not given, you will be prompted for a name.
Arguments
project
- name of the project to be created
run
First compiles and then executes a project. If project
is not given, the main project file according to the name of the current directory is used.
Arguments
project
- name of the project to be createdargs
- supplied arguments at runtime
compile
Compiles a project to JavaScripts. If project
is not given, the main project file according to the name of the current directory is used.
Arguments
project
- name of the project to be created
exec
Executes a JavaScript source. This command can be used to execute a project that was first compiled with the compile
command.
Arguments
file
- name of the file to be executedargs
- supplied arguments at runtime
parse
Runs the Tree-sitter parser to build an abstract syntax tree of a program.
Arguments
file
- name of the file to be parsed
Hot code recompilation
You can use nodemon to automatically compile to JavaScript as you write your program in Tony. Then you only need to run the exec
command, to see your code in action.