Skip to content
C2k-studioPublic

About

ex: packages and command line tools for the exshell app, Termux and ARM64 Linux - a shell (jsh), editor, build tool, git, downloader and more, written in Jex.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

610 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ex-pkg

ex-pkg

Tools for the Jex language and its compiler jexcmp, written in Jex. Each tool is one program (one file) for Linux ARM64 (Termux, the Jaric app, a Linux machine). Together with the app they are Jaric OS in its console mode: a shell, packages, an editor, a player, a build tool, and a protocol that lets programs ask the system for pictures, sound and settings.

The app exshell can be asked for things of the phone (notes, notifications, windows, pages, pictures, sound): the app API (ไทย).

Mipo (มิโปะ) is a character of the project, in the future its mascot, who works on the net side (the web and the servers); the tool mipo is Mipo's work: who is Mipo (ไทย).

tool what it does
makej the build tool: makej, -j N (many cores, a bar for each job and each core), init, init -pro, init -game, init -ai (a project that trains an AI into a .jw), apk, pack (.jc), dist, targets
jsh the shell: line editing, ghost text, pipes, redirects, scripts (first line [#jsh], $1 $#), aliases, start PROGRAM (a new tab), jaric setting in sections, jaric -restart, jaric video (MPL-2.0)
ascode a harness for a model (like the claude command): tools, modes ask / read / auto (MPL-2.0)
jex the command of the language: jex install NAME, jex update, jex doctor (MPL-2.0)
jene make, build and run a game: jene -c NAME, -b, -rc (the game tool of Jexcmp; needs ex install jex) (MPL-2.0)
fd find files and folders by name: fd report, fd -e pdf, fd -t d config (MPL-2.0)
exai small AI on the NPU of the phone: exai faces photo.jpg finds faces (MPL-2.0; model YuNet, MIT)
rg search for text in code: rg total, rg -e jex total, rg -C 2 word (MPL-2.0)
mipo the browser: mipo open a page of the web (a site, localhost, a file or a folder) in a window of exshell; who is Mipo (MPL-2.0)
image look at pictures and PDF pages in a window, and prepare pictures for a game (was imgj) (MPL-2.0)
vaken look at 3D models (OBJ, STL, PLY, GLB, glTF) in a window: a finger turns, two fingers zoom (MPL-2.0)
airn the work of the web: airn get, post, serve a folder, log, download (MPL-2.0)
airc check a network or web server you own or may test: scan ports, vuln, inspect, site, a safe load test, dns tcp ip ssh (MPL-2.0)
files a few things cp/mv/rm do not: human sizes, an undoable trash can, find duplicate files (MPL-2.0)
todo a list of things to do in one text file (MPL-2.0)
note short notes, one text file each (MPL-2.0)
cal a calendar for the terminal (MPL-2.0)
wget download a file, the common words (forwards to jurl) (MPL-2.0)
jbox about 60 small commands in one program: dir cat grep sort sed find tree rev paste printf base64 sha256sum ... (MPL-2.0)
fcode a text editor for the terminal with Jex colours, extensions and the compiler's errors (MPL-2.0)
mujic a music player with a typing box and a / menu: your songs, free songs to fetch, /find, /import, /mv (sort into folders), synced lyrics, mujic -session (own tab)
zipj zipj makes zip files, unj opens them (a password, -f, -o) (MPL-2.0)
tarj tarj makes and opens tar / tar.gz, gzj packs one file with gzip
imgj (old name of image) imgj prepares pictures for a game: reads PNG and JPEG, cuts the background, gives the real size, cuts parts, makes normal maps (MPL-2.0)
authj authj makes the codes of two-step logins (TOTP, like Google Authenticator) for GitHub and other sites; the secrets in a vault that a passphrase can lock (MPL-2.0)
jrawser jrawser URL: Jrawser, the browser window of the Jaric app: tabs, bookmarks, history, downloads (MPL-2.0)
mulap mulap render PLAN.mlp OUT.wav: make beats from a plan of tracks (kick, snare, hat ...): the engine of the app to record songs and make beats (MPL-2.0)
jearlink jearlink -viw -snd -sh -cll -ap -aps -ntf: the apps and notifications of the phone from the Jaric app terminal (MPL-2.0)
cam cam photo and cam scan: the camera of the phone in the terminal of the Jaric app (photos, QR codes) (MPL-2.0)
ex the commands of the system: install and update tools, apps and packages, the settings of the app (MPL-2.0)
jgit git in Jex: jgit init / add / commit / status / log / diff / branch / switch; the format of the repository is the one of git, both read each other (packs are read; no network yet) (MPL-2.0)
jurl download from the web (like curl): jurl LINK saves the file and says its name; -o -O -X -H -d -I -L, https (MPL-2.0)
jash the settings of your programs in one file ~/.jash and the command jash list / get / set / unset / edit / import / reset (MPL-2.0)
drive new drives: drive new NAME [PATH], drive remove NAME, the list of f:/ 0:/ r:/ and yours (~/.jsh_drives)
calc a calculator: sums, hex / binary / octal, xor and or, shifts, functions, variables (calc "0xff xor 0x0f")
xtorch small AI models on the phone, all in Jex: xtorch train / run / chat / install; the assistant xaiorin (xr) runs in the background, answers xr "question" and can learn from the shell (off by default)
python Python 3.14 (the official Android ARM64 build) started by a Jex launcher: python3, pip, ssl, sqlite3
yt-dlp yt-dlp on that Python, for what you may download (mujic /get ADDRESS uses it)
jvp4 films and songs: jvp4 play FILE in exshell; jvp4 info FILE reads mp4 / mov (own decoders come step by step)
jpty run a program on a pseudo terminal (for apps and tests) (MPL-2.0)
jexcmp the compiler and its library, as a tool: ex install jexcmp (always the newest release; makej and the other tools need 1.2.0.0 or newer)
alarm a timer and an alarm clock that goes on in the background
apkj makes an Android apk from a Jex app without the Android tools
ask finds the answer in your own documents (no model, no network)
bc a calculator language for the command line
column lines text up in columns
dig asks a name server about a name
drago looks inside binary files
du says how much room folders and files take
hash makes and checks checksums
jexcmp the Jex compiler with its standard libraries
jx86 (moved to simu86: ex install simu86; simu86 run PROG runs an x86-64 or arm64 program) runs a static Linux program made for another CPU
simu86 run a program on a simulated ARM64 and look inside: step, registers, memory; boot a bare program (source: github.com/C2k-studio/simu86)
multi terminal sessions that stay alive in the background
nc talks over a TCP connection
netscan shows which TCP ports of a device are open (only where you are allowed to)
split cuts a big file into pieces
top shows what the processor and the memory are doing
xxd shows the bytes of a file, and turns such a dump back into bytes
tar the common words of tar (forwards to tarj)
unzip the common words of unzip (forwards to zipj)

Documents

News, install, usage, errors, Claude Code (ภาษาไทยด้วย): docs/. Report a problem: jaomiwai@gmail.com or xinhe1212@gmail.com.

Install

curl -fsSL https://raw.githubusercontent.com/C2k-studio/ex-pkg/main/install.sh | sh                 # a menu
curl -fsSL https://raw.githubusercontent.com/C2k-studio/ex-pkg/main/install.sh | sh -s -- ex makej  # the tools you name
curl -fsSL https://raw.githubusercontent.com/C2k-studio/ex-pkg/main/install.sh | sh -s -- --all      # every tool

Options after sh -s --: --dir DIR (default $PREFIX/bin on Termux, else ~/.local/bin), --version X.Y.Z, --list, --yes. Every file is checked with its SHA-256. With ex installed: ex tools, ex install NAME, ex install all (and it links the second names: unj, gzj, the commands of jbox). In the Jaric app: install NAME in the shell. Libraries of Jex (#import <name>): jex list, jex install gamej (the game engine), xtorch (small neural networks), deflate (gzip, CRC-32) and more.

How it all works (the short picture)

 you type -> jsh (the shell) -> a program (fcode, makej, mujic, your own ...)
                 |                      |  text goes to the terminal
                 |                      |  pictures, sound, video, settings: messages  ESC ] 7777 ; ... BEL
              jpty (a pseudo terminal)  v
                 +------------- the Jaric app (Android) ---- screen, speakers, touch, clipboard
  • Everything is a program that reads the keyboard and writes text; the Jaric app draws that text, and also understands small messages (7777;gfx, 7777;audio, 7777;video, 7777;theme, ...) so a program can show a picture or play a sound. Elsewhere (any terminal) the messages are ignored and the program falls back to text. The full list: docs/app-protocol.md in the Jaric documents.
  • Packages: a tool is one file; a program with data is a .jc (a zip: manifest.toml, the program, assets/) made by makej pack; an Android app is an .apk made by makej apk.
  • Settings are plain text files you can edit (usr/etc/config.local, theme.toml, ~/.jshrc); jaric setting is a screen over them.
  • Standard: every tool answers --version and --help, prints errors as name: message, exits 0 / 1 / 2, and is tested before a release (docs/STANDARD.md).

How to write programs (a tour)

fcode hello.jex                  # Esc leaves, Ctrl-S saves.  void main() { cout << "hi\n"; }
jexcmp hello.jex -o hello && ./hello
makej init -pro mytool            # a project with the right structure (src/, tests/, docs/, manifest.toml ...)
cd mytool && makej test && makej run
makej init -game                  # a game with Jaric Engine (library <gamej>) and 5 lessons: makej play1 ... play5
makej apk                         # the game as an Android app;  makej pack = a .jc;  makej dist = every system in manifest.toml
makej init -ai                    # a small neural network (library <xtorch>)
  • The language: github.com/C2k-studio/Jcmp (docs/LANGUAGE.md; every example compiles). Libraries are used with #import <name>; your own files with #import "name".
  • jexcmp -d prog.jex finds memory errors; jexcmp -l lib.jex -o lib.so makes a shared library (export marks the entry points); jexcmp -target arm32 builds for 32-bit ARM.
  • A game: Game g = Game::open("title"); while g.running() { g.begin(); ...draw...; g.end(); } g.close(); (clear, rect, circle, text, art, held, hit, touch, sound). In the app it draws on a surface with the graphics chip; in a terminal with half blocks.

Using many cores

  • Building: makej -j 8 builds up to 8 things at once (the default is the number of cores); a target starts as soon as what it needs is done. makej -j 1 is one by one.
  • Running: #multithread on the line before a for i in a..b loop splits the range over all cores (no break / return inside); threads and atomics are in the language (Atomic::, Thread).
  • The compiler itself works on one core today (it compiles itself in about 2.4 s). Its -cache DIR keeps the code of functions that did not change, so a second build is much faster. A parallel code generator is on the plan.
  • Speed of the code: jexcmp makes native code; loops get their test at the bottom, values stay in registers, SIMD vectors (vec, Simd) use the NEON units.

For the maker of a tool

Layout: tools/ holds only the tools; extensions/ the extensions of fcode (fcode -ex NAME); install.sh and install-NAME.sh and the list tools.txt stay at the root (they have public addresses). A tool lives in tools/NAME/ (its source, README.md, CHANGELOG.md, VERSION, LATEST, test.sh, release.sh). A release has the tag NAME-vX.Y.Z with the file NAME and SHA256SUMS. The guide with every command and examples: docs/GUIDE.md. The rules every tool follows: docs/STANDARD.md.

The old address github.com/C2k-studio/Jget leads here.

Licences

The repository (ex, makej and the scripts) is under the licence in LICENSE. jsh, jbox, fd, rg, exai, cal, wget, jpty, fcode, zipj, tarj, imgj, authj, cam, jearlink, mulap, jrawser and mujic are under the Mozilla Public License 2.0: each of their folders has the text.

About

ex: packages and command line tools for the exshell app, Termux and ARM64 Linux - a shell (jsh), editor, build tool, git, downloader and more, written in Jex.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages