{"id":19546317,"url":"https://github.com/postrational/ragamuffin","last_synced_at":"2025-04-26T19:32:35.398Z","repository":{"id":260889344,"uuid":"882503872","full_name":"postrational/ragamuffin","owner":"postrational","description":"Ragamuffin - Chat with your document, articles or code","archived":false,"fork":false,"pushed_at":"2024-11-13T17:17:09.000Z","size":1223,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T17:47:17.766Z","etag":null,"topics":["chatbot","llm","zotero"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postrational.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-11-03T00:17:46.000Z","updated_at":"2025-01-05T14:03:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"9246ac34-5689-417e-bf67-df89a11fa9e4","html_url":"https://github.com/postrational/ragamuffin","commit_stats":null,"previous_names":["postrational/ragamuffin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postrational%2Fragamuffin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postrational%2Fragamuffin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postrational%2Fragamuffin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postrational%2Fragamuffin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postrational","download_url":"https://codeload.github.com/postrational/ragamuffin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251041603,"owners_count":21527227,"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","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":["chatbot","llm","zotero"],"created_at":"2024-11-11T03:44:21.276Z","updated_at":"2025-04-26T19:32:30.389Z","avatar_url":"https://github.com/postrational.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ragamuffin - Chat with your documents 🐈\n\nRagamuffin is a [RAG][rag]-powered chat agent which can access documents, articles from your [Zotero][zotero] library\nand code from any GitHub repository.\n\nYou can ask questions, and the agent will respond using information from documents in your library.\nIt will also display the sources used to generate each answer.\n\n![Zotero Chat](screenshot.png)\n\nRagamuffin is built with the amazing [LlamaIndex][llama-index], [SBERT][sbert], and [Transformers][transformers]\nlibraries and uses [Gradio][gradio] for the user interface.\n\n## Installation\n\n### Pre-requisites\n\nRagamuffin requires Python 3.10 or higher. It's recommended to use a virtual environment to install the package.\n\n### Install Ragamuffin in a virtual environment\n\n    $ python3 -m venv venv\n    $ source venv/bin/activate\n    (venv) $ pip install --upgrade git+https://github.com/postrational/ragamuffin.git\n\n## Usage\n\nIn order to use Ragamuffin, you need to generate an [OpenAI API key][openai-key].\nPlease set this as an environment variable before running the `muffin` commands. \n\n    $ export OPENAI_API_KEY=sk-proj-XXXX........\n\n### Create a Chat Agent based on a directory of documents\n\nYou can generate a RAG index based on a directory of files (e.g. TXT, PDF, EPUB, etc.).\n\nUse the `muffin` command to generate an agent named `my_agent` based on the documents in `/path/to/my/documents/`:\n\n    (venv) $ muffin generate from_files my_agent /path/to/my/documents/\n\nStart the chat agent using the following command:\n\n    (venv) $ muffin chat my_agent\n\n### Generate a RAG index based on your Zotero library\n\nIn order to use Ragamuffin with Zotero, you need to generate a [Zotero API key][zotero-key] and \nan [OpenAI API key][openai-key]. Set these as environment variables before running `muffin`. \n\n    $ export OPENAI_API_KEY=sk-proj-XXXX........\n    $ export ZOTERO_LIBRARY_ID=1234567\n    $ export ZOTERO_API_KEY=XXXX........\n    (venv) $ muffin generate from_zotero zotero_agent\n\nThis will generate a RAG index based on all papers in your Zotero library.\n\nYou can also create an agent for a specific collection in your Zotero library using the `--collection` option:\n\n    (venv) $ muffin generate from_zotero zotero_agent --collection \"My Collection\"\n\nLater, you can chat with Ragamuffin using the `muffin chat` command:\n\n    (venv) $ muffin chat zotero_agent\n\n### Generate a RAG index based on a Git repository\n\nIf you want to learn about a specific codebase, you can generate a RAG index based on a GitHub repository.\n\n    (venv) $ muffin generate from_git my_agent https://github.com/postrational/ragamuffin/\n\nIf you want to use a specific branch, tag or commit, you can use the `--ref` option:\n\n    (venv) $ muffin generate from_git poetry https://github.com/python-poetry/poetry --ref 1.8.4\n\n### Chat with the agent\n\nYou can chat with the agent using the `muffin chat` command:\n\n    (venv) $ muffin chat my_agent\n\n### List created agents\n\nYou can list all the agents created using the `muffin` command:\n\n    (venv) $ muffin agents\n\n### Delete an agent\n\nYou can delete an agent using the `muffin` command:\n\n    (venv) $ muffin delete my_agent\n\n## Use Cassandra for agent storage\n\nYou can use [Cassandra DB][cassandra] for more efficient storage of the RAG indexes of your agents.\n\nInstall Cassandra DB and create a keyspace named `ragamuffin`.\n\nOn a Mac, you can install Cassandra using [Homebrew][brew]:\n\n    $ brew install cassandra\n    $ brew services start cassandra\n    $ cqlsh\n    cqlsh\u003e CREATE KEYSPACE ragamuffin WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};\n\nTo use Cassandra for storage, set the `RAGAMUFFIN_STORAGE_TYPE` environment variable to `cassandra`:\n\n    $ export RAGAMUFFIN_STORAGE_TYPE=cassandra\n\n\n[brew]: https://brew.sh/\n[cassandra]: https://cassandra.apache.org/\n[gradio]: https://www.gradio.app/\n[llama-index]: https://www.llamaindex.ai/\n[openai-key]: https://platform.openai.com/api-keys\n[rag]: https://en.wikipedia.org/wiki/Retrieval-augmented_generation\n[sbert]: https://sbert.net/\n[transformers]: https://huggingface.co/transformers/\n[zotero-key]: https://www.zotero.org/settings/security#applications\n[zotero]: https://www.zotero.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostrational%2Fragamuffin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostrational%2Fragamuffin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostrational%2Fragamuffin/lists"}