{"id":28964580,"url":"https://github.com/friphazeph/llinal","last_synced_at":"2026-07-15T04:32:30.971Z","repository":{"id":296888771,"uuid":"994845146","full_name":"friphazeph/LLinal","owner":"friphazeph","description":"C-native intent execution protocol for LLMs","archived":false,"fork":false,"pushed_at":"2025-07-30T17:02:02.000Z","size":718,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-30T20:06:33.363Z","etag":null,"topics":["automation","c-language","intent-detection","interpreter","llms","scripting-language"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/friphazeph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-02T15:10:05.000Z","updated_at":"2025-07-30T17:02:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"e3f71c56-a6b6-40d3-8fce-6cdcd109d341","html_url":"https://github.com/friphazeph/LLinal","commit_stats":null,"previous_names":["friphazeph/llinal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/friphazeph/LLinal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friphazeph%2FLLinal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friphazeph%2FLLinal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friphazeph%2FLLinal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friphazeph%2FLLinal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/friphazeph","download_url":"https://codeload.github.com/friphazeph/LLinal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friphazeph%2FLLinal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272164958,"owners_count":24884626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","c-language","intent-detection","interpreter","llms","scripting-language"],"created_at":"2025-06-24T05:06:56.610Z","updated_at":"2026-07-15T04:32:30.957Z","avatar_url":"https://github.com/friphazeph.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLinal: A C-Native Intent Execution Protocol for Language Models\n\n**LLinal Is Not A Language.**\nIt is a minimalist system implemented in C that acts as a bridge between Large Language Models (LLMs) and host system operations. LLinal allows LLMs to convert textual intent into calls to predefined C functions, enabling safe and deterministic execution of commands embedded within LLM output.\n\n---\n\n## Quick start\n\nClone the repository:\n```bash\ngit clone https://github.com/friphazeph/LLinal.git\n```\n\nCompile:\n```bash\ncd LLinal \u0026\u0026 make\n```\nOptionally, install the CLI globally:\n```bash\nsudo make install\n```\n\n---\n\n## What is LLinal?\n\nLLinal enables LLMs to interact with the real world in a controlled manner by executing commands embedded in `.lln` script files. These scripts contain invocations of commands prefixed with `!` (e.g., `!printf(\"Hello\", 42)`). LLinal parses these commands, validates their arguments against declared C function signatures, and executes the corresponding functions.\n\nThis ensures that only well-defined and intended operations are performed, making LLM-driven automation more reliable and secure.\n\n---\n\n## Intended Workflow\n\nLLinal is designed to serve as the execution backend for Large Language Models. The typical workflow is:\n\n1. An LLM generates a `.lln` script — a plain text file containing a mix of free-form comments and executable commands prefixed with `!`.\n2. This `.lln` script is passed to the LLinal runtime (`lln`), along with the shared library containing the implementation of the commands.\n3. LLinal parses the script, validates commands and arguments, and executes them sequentially with full type safety.\n4. The process runs to completion and then exits, ensuring a clean, isolated execution environment for each script.\n\nThis workflow enables reliable, deterministic bridging of LLM textual intent to system-level operations with strict validation and safety.\n\n---\n\n## Demo\n\nhttps://github.com/user-attachments/assets/60949c97-c63d-4421-8f2b-0183f321b7a6\n\n---\n\n## Key Features\n\n* **C-Native \u0026 Minimalist:** Fully implemented in C for efficiency and a small memory footprint.\n* **Robust Command Parsing:** Extracts commands prefixed by `!` while ignoring other text, allowing free-form output around commands.\n* **Strict Signature Validation:** Validates argument types and counts at runtime against declared C functions.\n* **Modular Plugin System:** Commands are compiled as shared objects (`.so`) and loaded dynamically, enabling flexible extension.\n* **Custom Preprocessor:** Automates command registration and argument signature extraction from C source files.\n* **LLM-Friendly Syntax:** Treats any text not starting with `!` as a comment, enabling natural language or reasoning interleaved with executable commands.\n\n---\n\n## Design Philosophy\n\n* **Safety by Default:** No built-in commands exist; only programmer-defined commands run. This design eliminates unintended command execution risks without requiring sandboxing.\n* **Single-Run Execution Model:** Each invocation loads the necessary plugins, executes the `.lln` script fully, then terminates, preventing persistent state and simplifying resource management.\n* **Simplicity \u0026 Minimalism:** LLinal focuses on a lean runtime, avoiding complex parsing logic or persistent state across runs.\n* **Clear Contracts:** Enforces strict command signature validation to provide a deterministic, predictable interface between LLM output and system actions.\n* **Extensibility:** Plugin architecture encourages modular growth and flexibility without changes to the core runtime.\n\n---\n\n## Command Line Usage\n\n```bash\n# Preprocessing:\nlln -p  [input_file.c] [output_file.c]\n    # Preprocess a C source file, output another C source file.\n\n# Compilation:\nlln -c  [input_file.c] [output_executable]\n    # Preprocess and compile a C file with main() to a standalone executable.\n\nlln -co [input_file.c] [output_file.so]\n    # Preprocess and compile a main-less C file to a shared object (.so).\n\n# Running:\nlln -ro [input_file.lln] [input_file.so]\n    # Run an .lln script using commands from a compiled shared object.\n\nlln -rc [input_file.lln] [input_file.c]\n    # Run an .lln script using commands from unprocessed main-less C source.\n```\n\n---\n\n## Defining Custom Commands\n\nCommands are defined as C functions in `.c` files, registered with the `// @cmd` annotation or the `LLN_declare_command` macro.\n\nExample:\n\n```c\n#include \u003clln/lln.h\u003e\n#include \u003cstdio.h\u003e\n\n// @cmd !printf\nvoid *print(char *s, int i) {\n    printf(\"%s, %d\\n\", s, i);\n    return NULL;\n}\n```\n\n---\n\n## Executing LLinal Scripts\n\nAfter defining commands:\n\n1. Preprocess and compile your command source to a shared library:\n\n```bash\nlln -co src/commands/my_printer.c my_commands.so\n```\n\n2. Create a `.lln` script, e.g., `hello.lln`:\n\n```lln\n!printf(\"Hello, world!\", 42)\n!printf(\"The answer is\", 42)\n```\n\n3. Run your script:\n\n```bash\nlln -ro hello.lln my_commands.so\n```\n\nExpected output:\n\n```\nHello, world!, 42\nThe answer is, 42\n```\n\n---\n\n## License\n\nLLinal is dual-licensed:\n\n- **Open Source:** under the GNU AGPLv3 License — see `LICENSE` for full terms. This requires that any software using LLinal, even over a network, must also be released under AGPL.\n\n- **Commercial License:** available for closed-source, internal, or proprietary use. This allows companies to use LLinal without disclosing their source code.\n\nContact maxime.delhaye.md@gmail.com for pricing or commercial inquiries.\n\n---\n\n## Author\n\n**Maxime Delhaye** — [friphazeph](https://github.com/friphazeph)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriphazeph%2Fllinal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffriphazeph%2Fllinal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriphazeph%2Fllinal/lists"}