Skip to main content

zk-rag is a command-line chat tool for your zettelkasten

Project description

Chat With Your Zettelkasten

This is a simple tool that lets you chat with an "AI" that has access to the documents in your Zettelkasten. It will index your markdown documents, and in your chat session it may choose to query your content, retrieve excerpts, read entire documents, and generate responses based on the content in your Zettelkasten.

For "AI" it communicates with a local running instance of Ollama. Ollama must be installed and running for zkchat to function.

Limitations

  • command-line only

That said, it includes all of the critical elements for doing RAG queries across a document base.

Requirements

You must have ollama installed and running.

You must have a local knowledgebase / zettelkasten with content in markdown format. I use Obsidian, because I favour working locally, and I favour using the markdown format for notes - because everything's local, and in plain text, I can simply point this tool at a Vault folder.

Workstation setup

Right now, while this tool should run on Windows, we've only written instructions for Mac.

I recommend you setting up a local virtual Python environment, to keep it clean, but you can install it globally.

Setting up a local environment, and activating it (recommended):

cd $HOME
python3 -mvenv .venv
source .venv/bin/activate

Installing the zk-rag module from PyPi:

pip install zk-rag

Setting up Ollama and installing a local model:

brew install ollama
ollama pull qwen2.5:14b

Usage

Run zkchat to start chatting.

Command-line options:

  • --model [model_name]: Change the LLM model to use for chat
    • With model name: zkchat --model llama2 - configure to use specified model
    • Without model name: zkchat --model - interactively select from available models
  • --reindex: Reindex the Zettelkasten vault, will attempt to do so incrementally
  • --full: Force full reindex (only used with --reindex)
  • --unsafe: Enable operations that can write to your Zettelkasten

When first run, zkchat will start the configuration. You will need to provide the path to your root Zettelkasten / Obsidian vault folder, and the name of the LLM model you want to use in your Ollama installation. After configuration, it will start a full index build of your Zettelkasten.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zk_rag-1.1.1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zk_rag-1.1.1-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file zk_rag-1.1.1.tar.gz.

File metadata

  • Download URL: zk_rag-1.1.1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for zk_rag-1.1.1.tar.gz
Algorithm Hash digest
SHA256 f5d0d549c2112f2a8c5c6413a3c5661e06a7dfdc27e776facce826be38425686
MD5 07d3e8632bc3b40d53da0cb9260ad0c0
BLAKE2b-256 1e2c221b0427ff8f82d205e29747da6609f94a398b9e257d6e0c01f460614c93

See more details on using hashes here.

Provenance

The following attestation bundles were made for zk_rag-1.1.1.tar.gz:

Publisher: python-publish.yml on svetzal/zk-rag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zk_rag-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: zk_rag-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for zk_rag-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c805b6fd08b7d7efac222771149115581dbb48301d87dd96c72ba97b11b4b7c7
MD5 632b05403ec70995eef3f6875df7e1c6
BLAKE2b-256 850866b1e877efd6ace3c6eaad9adb90943834100848bb308b96fc67db6cb6c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for zk_rag-1.1.1-py3-none-any.whl:

Publisher: python-publish.yml on svetzal/zk-rag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page