Install
jcode needs ztcl 1.0.0-beta.8 or later and git. A model call needs an AWS account with access to a model of Bedrock; the tests and the examples need none.
Install ztcl
Each release of ztcl has the runner for Linux, macOS, and Windows, and the file SHA256SUMS. These commands install 1.0.0-beta.8 for Linux on x86_64:
version=1.0.0-beta.8
target=x86_64-linux-musl
curl -fsSLO https://github.com/beetlebugorg/ztcl/releases/download/v$version/ztcl-$version-$target.tar.gz
curl -fsSLO https://github.com/beetlebugorg/ztcl/releases/download/v$version/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS
tar xzf ztcl-$version-$target.tar.gz
./ztcl-$version-$target/ztcl --version
ztcl-1.0.0-beta.8-x86_64-linux-musl.tar.gz: OK
ztcl 1.0.0-beta.8 (9.1.0) x86_64-linux-musl fast 5945090
Put the file ztcl in a folder of the PATH.
Build jcode
jcode is a ztcl project: ztcl.project lists its files and its capabilities. ztcl build makes one program file:
git clone https://github.com/beetlebugorg/jcode
cd jcode
ztcl build
./build/jcode --help
build/jcode: 62597342 bytes (x86_64-linux runtime: 62440800 bytes, payload: 156542 bytes)
usage: jcode COMMAND ...
Put build/jcode in a folder of the PATH.
Important
The program of
ztcl buildruns the isolation levelnoneonly. With ztcl 1.0.0-beta.8, a built program has no runner for the threads of the levelprocessand no store for the images of the levelvm. For these levels, use the launcherbin/jcodeof the source tree: it runsmain.tclin the ztcl runner. Platforms has the state of each level.
The launcher bin/jcode
bin/jcode takes the same commands as the program. It starts main.tcl in the ztcl runner (ZTCL, or ztcl on the PATH) with the capabilities of jcode, the network policy any, the limits of the threads, and the variables HOME, PATH, and the AWS variables for the commands of the agents. Put the folder bin in the PATH to use it as jcode.
Check the install
ztcl test
tools/test.sh
tests/unit/cbor.test: Total 5 Passed 5 Skipped 0 Failed 0
tests: 84 passed, 0 failed, 18 skipped
ztcl test runs the tests that need no capability (tests/unit/). tools/test.sh runs the other tests in the ztcl runner, with the capabilities that they need. A test skips when the host does not have what it needs: KVM for the level vm, ztcl::crypto for the sign-in, or ztk for the window client.
AWS
jcode reads the credentials from ~/.aws/credentials, or from aws configure export-credentials (an SSO profile). AWS_PROFILE selects the profile. The default region is us-east-1; region in config.json changes it.
Next: How it works.