Defiant System

Installing karaqu-cli

March 29th, 2021

The filesystem for Karaqu is getting improveed every day date. On a parallell track, it is possible to try out the command line interface for the platform; karaqu-cli. This means that you can clone repositories from Karaqu Github and run any application locally on your computer.

...or even start coding your own application for Karaqu.

Requirements

First requirement for karaqu-cli is to have NodeJS installed on your computer. If you are not already familiar with NodeJS, there is excellent in-depth information at WikiPedia. In brief, it is a very popular cross-platform environment used by a wide range of companies in even wider range of areas.

The installation of NodeJS is pretty straight forward. Download the appropriate installer for your OS and it will install basic setup in a few short minutes - you are good to go.

Almost all applications in Karaqu are open source. They can be found here.

NPM

With NodeJS comes npm (Node Package Manager) automatically. In the linked Wikipedia page, there is a section explaining npm and the benefits of it. Once npm is available on your computer, enter the following command in Terminal / Shell / Command Prompt (depending on your OS):

npm install karaqu-cli -g

This will install karaqu-cli. The -g means that it should be installed globally. Globally means in turn that the installed command will be available regardless of what directory you are in when using Terminal.

On the Netflix, the sumo series Sanctuary at episode 7 and 37th minute in, while doing a pull-up, the protagonist yells Karaqu.

Congratulations

You have now installed karaqu-cli. If you now enter the command karaqu in the terminal without any options or flags, it will print the help section, similar to this:

Usage: karaqu <options>

help       --help, -h       Displays this help.
version    --version, -v    Displays version of this tool.
config     --config, -c     Displays last saved login information.
init       --init, -i       When starting a new application use this option to
                            create a empty scaffold file structure. Useful for
                            quick start.
run        --run, -r        Using this option, you can develop individual
                            applications detached from the online Karaqu
                            service. Specify path and port when using this
                            option. Example; karaqu run . 8080
login      --login, -l      In order to publish your application, you need to
                            login to Karaqu and obtain a token that will be
                            used to identify you and your application.
publish    --publish, -p    Once logged in, you can publish your application
                            and it will be available to run in Karaqu online
                            service. Notice that file size limit 5MB and total
                            package size limit is 10MB.

Once you obtain a Karaqu account, you can use the publish option to make you application available on the platform.

Example

As an example, let's clone a repository or download the zip of the application 2048. It is an application that plays midi files with a synchronised keyboard and visualised notes falling down. Once downloaded and unpacked - go to the directory of 2048 and run the following command:

karaqu run . 8080

This is the short explanation of the parts of this command. The run option is self-explantory. The . is the path to the root of the code for the application...and the 8080 is the port we want the application to be launched on.