loom-engine

agent
Security Audit
Warn
Health Warn
  • License รขโ‚ฌโ€ License: MIT
  • Description รขโ‚ฌโ€ Repository has a description
  • Active repo รขโ‚ฌโ€ Last push 0 days ago
  • Low visibility รขโ‚ฌโ€ Only 5 GitHub stars
Code Pass
  • Code scan รขโ‚ฌโ€ Scanned 5 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions รขโ‚ฌโ€ No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

๐Ÿงต A terminal-native narrative engine & text RPG in Rust ๐Ÿฆ€. Play with any LLM: OpenAI, Anthropic, local models & more.

README.md

Loom Engine

An LLM-powered narrative engine and text RPG.

Rust TUI LLM Agent

main menu gameplay

็ฎ€ไฝ“ไธญๆ–‡ | English

Table of Contents

๐Ÿš€ Quick Start

If you encounter any issues while using this project or have any ideas or suggestions, feel free to reach out! You can contact me via [email protected], or share your feedback and start a discussion through Issues or Discussions. I'll do my best to respond.

โš™๏ธ Configuration

  1. Download the pre-built binary for your platform from the Releases page, extract it, and run the executable to enter the main menu.

    main menu

  2. Navigate to the Settings page and adjust the Provider and Model fields according to your setup. See the Settings Guide for full details.

    settings

  3. Configure environment variables. The following two variables are required (replace PROVIDER with your actual platform name in uppercase, e.g., OPENAI, ANTHROPIC):

    • PROVIDER_BASE_URL: The Base URL of the model API
    • PROVIDER_API_KEY: Your API key for the corresponding platform

๐ŸŽฎ Usage

  1. Main Menu: Use โ†‘ โ†“ to navigate options, Enter to confirm.

    main menu

  2. Create Project: On the Create page, use Tab to switch focus. Enter a project name, select a game mode, and fill in the prompt (world-building description or system instructions). Switch to the CONFIRM button and press Enter to start initialization.

    create

  3. Select Project: After creation, you will be redirected to the Projects page. Use โ†‘ โ†“ to select a project and Enter to enter it.

    projects

  4. Select Save: On the Saves page, choose a save file to load.

    saves

  5. Enter Game: The Gameplay page includes stat panels, inventory, dialogue history, and an input box. Use Tab to switch panel focus, โ†‘ โ†“ to scroll lists or dialogue, and โ† โ†’ to view truncated text entries. Press Enter to activate the input box, type your action, and press Enter again to send. Wait for the model to respond.

    gameplay

  6. Save: Before you exit the Gameplay page, remember to enter /save in the input box to save your progress! You can enter /help to view more commands.

๐Ÿ› ๏ธ Local Development & Building from Source

# Clone the repository
git clone https://github.com/Underline-1024/loom-engine.git
cd loom-engine

# Build and run
cargo run

โœจ Core Features

  • Complete Stat System & Toolchain: Built-in numeric stats, tag-based traits, and inventory system. The LLM can read and write game state in real time via a full suite of tool functions, rather than merely generating text.
  • Natural Language Driven Interaction: Players input arbitrary actions in natural language. The LLM automatically parses intent, advances the narrative, and synchronizes underlying stats and inventory state.
  • Broad Model Compatibility: Natively supports OpenAI, Anthropic, Ollama, and any local or third-party platform compatible with the OpenAI / Anthropic API standard.

๐Ÿ”ฎ Future Plans

  • Streaming output support
  • Plugin extension system
  • Local vector database integration

๐Ÿ“‹ Settings Guide

Field Description
Provider Model platform identifier, must be lowercase
Enable Dynamic Toggle dynamic features. When enabled, dynamic tool calling is activated and the Embedding Model field becomes required. When disabled, static tool calling is used. This field is automatically ignored on platforms that do not support dynamic features.
Model Name of the core narrative and reasoning model
Embedding Model Name of the embedding model, only effective when dynamic features are enabled
Max Tokens Maximum token limit per single response
Max Turns Maximum interaction turns within a single model response (note: this refers to tool-calling/reasoning loops per response, NOT conversation history turns)
System Prompt Global system instructions

โŒจ๏ธ Keyboard Shortcuts

Shortcut Function Scope
Enter Confirm selection / Activate input box / Send command Global
โ†‘ / โ†“ Scroll lists or dialogue history List & Dialogue panels
โ† / โ†’ Horizontally scroll truncated text entries Currently highlighted list item
Tab Switch panel focus (Stats / Tags / Inventory / Dialogue) Gameplay page
Esc Return to previous screen / Exit application (on main menu) Global

๐Ÿ“„ License

This project is open-sourced under the MIT License - see the LICENSE file for details.

Reviews (0)

No results found