Skip to content

An intelligent, memory-augmented command-line interface that learns from your workflow.

License

Notifications You must be signed in to change notification settings

kklike32/Memora

Repository files navigation

Memora

An intelligent, memory-augmented command-line interface that learns from your workflow.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Conda must be installed to manage the environment.
  • Git must be installed to clone the repository.

Installation & Setup

  1. Clone the repository: Open your terminal, navigate to the directory where you want to store the project, and clone the repository:

    git clone https://github.com/kklike32/memora.git
    cd memora
  2. Create and activate the Conda environment: This command uses the environment.yml file to create a new Conda environment named memora with all the necessary dependencies.

    conda env create -f environment.yml
    conda activate memora
  3. Install the project in editable mode: This will install the memora package in "editable" mode, which means any changes you make to the source code will be immediately effective without needing to reinstall.

    pip install -e .

How to Use

After following the installation steps, the memora environment will be active, and the memora command will be available in your shell.

  1. Start the Memora REPL: Simply type memora in your terminal and press Enter.

    memora
  2. Interact with Memora: You will be greeted with the >>> prompt. You can now:

    • Run shell commands: Type any standard shell command (e.g., ls -l, pwd) and press Enter.
    • Execute Python code: Start your command with !py to execute Python code (e.g., !py print("Hello, World!")).
    • Execute SQL queries: Start your command with !sql to execute SQL queries (e.g., !sql SELECT * FROM table_name).
    • Ask a natural language query: Start your command with ? to ask a question (e.g., ? how do I find the largest file in this directory).
    • Ask a specific question using LLM: Start your command with ?ask to ask a specific question (e.g., ?ask What is the current working directory?).
    • Search command history: Start your command with ?history to search through previous commands (e.g., ?history git).
    • Exit: Type exit or quit to leave the Memora REPL.

Features

  • Memory-augmented: Memora learns from your workflow and stores command history for future reference.
  • Multi-language support: Execute shell commands, Python code, and SQL queries seamlessly.
  • Natural Language Interface: Ask questions in natural language and get relevant responses or suggested commands.

Example Session

Here's an example of how you might interact with Memora:

>>> ls -l
--- Executing Shell Command ---
total 0
-rw-r--r-- 1 user user 0 Jul 22 16:30 file1.txt
-rw-r--r-- 1 user user 0 Jul 22 16:30 file2.txt
>>> !py print("Hello, World!")
--- Python ---
print("Hello, World!")
Hello, World!
>>> ? how do I list all files in this directory?
--- NL Query ---
how do I list all files in this directory
--- LLM Suggestion ---
Suggested command: ls -a
  └─ Execute? [y/N]: y
--- Executing Shell Command ---
ls -a
.
..
file1.txt
file2.txt
>>> ?ask What is the current working directory?
--- LLM Query ---
What is the current working directory?
--- LLM Response ---
/Users/keenankalra/Documents/Personal/Memora

Common Commands

  • memora: Start the Memora REPL.
  • exit or quit: Exit the Memora REPL.
  • !py <python_code>: Execute Python code.
  • !sql <sql_query>: Execute SQL queries.
  • ? <natural_language_query>: Ask a natural language query.
  • ?ask <specific_question>: Ask a specific question using LLM.
  • ?history <search_term>: Search through command history.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About

An intelligent, memory-augmented command-line interface that learns from your workflow.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published