Skip to main content

tawjih — توجيه أوامر الآلة

Direct a language model through small text files that you write and review yourself, join them into paths, and know where every answer came from. Knowledge is kept in trees of small files; each file has a human side, a machine side (instructions for a model and optional Python code), a reading side with its sources, and optional worked examples. When a path runs, only the machine side is sent; every run is saved and can be traced.

Python 3.11 or later, standard library only, Linux and Windows. Experimental: the test suite passes, but no real AI provider has been used with it yet.

The first command on a terminal asks who you are (your name, and if you like an email or an ORCID); runs, approvals and reviews are recorded under that permanent id. It stays on your computer.

pip install tawjih
tawjih                 # who you are (the first time), then the home screen
tawjih home start      # your first project, step by step
tawjih init
tawjih new "Mathematics"
tawjih new "Algebra" --parent 1
tawjih tree
  • A path language in English and Arabic: TO, AND, IF … ELSE (also IF key = value), AMONG … BY key, THROUGH, LINK, CALL, with per-step EACH, APPROVE, USING, RETRY … UNTIL, PICK.
  • Contracts between steps (keys or a JSON Schema), staleness when sources change, a cache to resume.
  • Named providers (providers.json): Ollama, any OpenAI-compatible server, Anthropic, with retries, backoff and fallback chains; keys stay in environment variables.
  • Each file is a folder of three faces under one code, number and title: human, machine and science (show REF --type machine).
  • Steps at the same time (--max-workers), going on past a failed branch, and ITERATE to run a whole path again on its result.
  • An architecture lab (tawjih arch): model architectures as files, exact parameter counts, variants, a Hugging Face configuration, and a build check with transformers; runtimes (tawjih runtime) for long jobs here, over ssh, or on a service you drive.
  • A home screen in the terminal (tawjih alone): the project at a glance, the commands as cards, and tawjih home TOPIC explanations.
  • tawjih top: a live board like btop, the runs of paths and the files of the trees beside the computer's CPU, memory, disk, network and GPU.
  • run --trace: each run as a trace in Langfuse or any OpenTelemetry collector (OTLP/JSON, no extra library), texts after redaction.
  • A project policy that can only restrict: no code, local providers only, always sandboxed, a least level of human approval.
  • Evaluation: cases from the examples, a path compared with the model asked directly, baselines, datasets with SHA-256 manifests, lineage with trace.
  • Governance: locks, review, staged proposals, sealed releases, schedules.
  • tawjih mcp: an MCP server for AI assistants, where a person approves every write and every run.
  • tawjih do: management statements in English or Arabic.

Full documentation, the example project, the Linux windows and the optional training bridge are in the repository. The bridge (plugins/neural_bridge.py: SFT and DPO with LoRA, QLoRA, DoRA, PiSSA, LoHa, IA3, VeRA, OFT, prompt tuning and other PEFT methods, here or on a rented GPU over ssh) is one file that works beside this package: https://github.com/AlmodinyMk/LLM-tawjih-Model-building (العربية).

How Tawjih is built

Licensed CC BY-NC-SA 4.0: noncommercial use with credit and the same license for adaptations; commercial use needs permission from the author.

Metadata

Release files for tawjih 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tawjih 0.16.0
File Size Uploaded Provenance Actions
tawjih-0.16.0.tar.gz 331.8 kB With provenance Details for tawjih-0.16.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tawjih 0.16.0
File Interpreter ABI Platform Actions
tawjih-0.16.0-py3-none-any.whl Python 3 none any Details for tawjih-0.16.0-py3-none-any.whl

Total release size: 568.2 kB

Release files / tawjih-0.16.0.tar.gz

Download URL tawjih-0.16.0.tar.gz
Size 331.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8b6d9a796154a2c250db5b2034946996f79732544ca9b104c9dff846aa3b7c97
BLAKE2b-256 checksum
How to use checksums
b230215c9edbdcda4928edc64a1f46b9585406ba0bc6d715148c63d1351aec8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / tawjih-0.16.0-py3-none-any.whl

Download URL tawjih-0.16.0-py3-none-any.whl
Size 236.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fb5bf1f4f9ceb69ec871ef6a6cb66a019dd99f1d96bab2a282f591d865cdaec
BLAKE2b-256 checksum
How to use checksums
d9f0ccc29a25fad5dd9d98c6af431f2ca144eb5fad95aee2ca345c572293573f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for tawjih 0.16.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tawjih-0.16.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page