Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>cajaNew to Visual Studio Code? Get it now.
caja

caja

Cajá Tech

|
1 install
| (0) | Free
Rich caja language support for Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Caja CLI

NPM Version Official Docs

A command-line interface for the Caja language. The caja CLI allows you to execute .caja scripts, as well as encode and decode them into transportable token strings.

Installation

You can install the Caja CLI globally using npm:

npm install -g @caja/cli

Usage & Commands

1. Run a Script

Parse and evaluate a .caja script file to execute it.

caja run -f <file.caja>
  • -f, --file: The path to the .caja script file.
  • -e, --export (Optional): File name to export log values to (e.g., data.csv).

2. Encode a Script

Encode a .caja script file and its dependencies into a single base64-like token string.

caja encode -f <file.caja>
  • -f, --file: The path to the script to encode.

3. Decode a Token

Decode a token string back into its original .caja script modules and save them to a directory.

caja decode <token> -o <output_dir>
  • -o, --output: Directory path to save the decoded scripts (use -o . for the current directory).

4. Check Version

Retrieve the currently installed version of the Caja CLI.

caja --version

Example Script

::: tip Before running this script, make sure to install the std and query packages:

npm install @caja/std npm install @caja/query :::

Create a file named test.caja:

import "@caja/std"
import "@caja/query"

let isEven = fn(x: Number) -> Boolean {
    return x % 2 == 0
}

let powerTwo = fn(x: Number) -> Number {
    return x ^ 2
}

let add_numbers = fn(acc: Number, current: Number) -> Number {
    return acc + current
}

let result = std.range(1, 10)
    |> query.filter(isEven) 
    |> query.map(powerTwo)
    |> query.reduce(add_numbers, 0)

return result

Run it using the CLI:

caja run -f test.caja
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft