loz  by joone

CLI tool for LLM-powered system command execution via natural language

created 2 years ago
262 stars

Top 97.8% on sourcepulse

GitHubView on GitHub
Project Summary

Loz is a command-line interface tool that integrates Large Language Models (LLMs) with Unix-like operating systems, enabling users to execute system commands and process data via natural language prompts. It targets developers and power users seeking to leverage AI for shell scripting, automation, and data manipulation.

How It Works

Loz translates natural language instructions into executable shell commands, supporting direct command execution and Unix pipe integration. It interfaces with LLMs via OpenAI API or Ollama, allowing users to choose their preferred model (e.g., Llama2, CodeLlama, GPT-3.5-turbo). This approach bridges the gap between human intent and machine execution, simplifying complex command-line operations.

Quick Start & Requirements

  • Install via npm: sudo npm install loz -g
  • Requires NodeJS and npm.
  • Ollama setup requires llama2 and codellama models.
  • OpenAI API requires setting OPENAI_API_KEY in .env or shell environment.
  • Official documentation: https://github.com/joone/loz

Highlighted Details

  • Executes Linux commands from natural language prompts (e.g., loz "find the largest file").
  • Supports piping data into Loz for AI-driven processing (e.g., ls | loz "count files").
  • Automates Git commit message generation from staged changes.
  • Offers a "Safe Mode" requiring confirmation before command execution.
  • Stores chat logs in .loz_log within Git repositories.

Maintenance & Community

  • Recent updates include Git commit log storage and attribution configuration.
  • Contributions are welcomed via pull requests.

Licensing & Compatibility

  • The repository does not explicitly state a license in the README.

Limitations & Caveats

  • The "Detect GPUs" feature is noted as only tested with the OpenAI API.
  • Users are cautioned against executing potentially destructive commands like rm or mkfs.
  • The lack of a specified license may pose compatibility concerns for commercial or closed-source use.
Health Check
Last commit

7 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.