brocode-cli

raw JSON →
2.0.6 verified Fri May 01 auth: no javascript

A toy compiler for the BroCode programming language that allows writing code using Hindi-style syntax. Version 2.0.6 is the current release; the project appears to be in active development with no clear release cadence. It differentiates itself by making programming accessible to Hindi speakers through familiar syntax (e.g., 'bro maanle' for variable declaration) and includes DOM manipulation and debug mode. The package primarily targets educational/fun use, not production systems.

error Command not found: brocode
cause Package not installed globally or not in PATH.
fix
Install globally: 'npm install -g brocode-cli@latest' then run 'brocode'.
error Cannot find module 'brocode-cli'
cause Using 'brocode-cli' as a command instead of 'brocode'.
fix
Use 'npx brocode' or 'brocode' after global install.
gotcha CLI command is 'brocode', not 'brocode-cli'.
fix Use 'brocode' as the command. Example: 'brocode file.bc'.
gotcha Global install required for standalone 'brocode' command.
fix Run 'npm install -g brocode-cli@latest' first, or use 'npx brocode'.
gotcha DOM scripting requires adding a specific script tag in HTML head.
fix Add '<script src="https://brocode-cli.vercel.app/api/ajj-kuch-tufani-krte-hai"></script>' to <head> and use '<bro-script>' tag.
npm install brocode-cli
yarn add brocode-cli
pnpm add brocode-cli

Creates a factorial program using BroCode syntax and runs it with the brocode CLI.

// hello.bc
bro function FACTORIAL(n) {
    bro maanle fact hai 1;
    bro maanle i hai 1;
    bro jbb tk (i <= n) hai {
        bro maanle fact hai fact * i;
        i++;
    }
    bro dikha de("Factorial of " + n + " is: " + fact);
}
FACTORIAL(5);