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.0.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.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zk_rag-1.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 e6185ec3f9634a0b1821b9bb11e8518190b814edb05b6c21a0bd694e5f456e89
MD5 e8ef6896797c7cf967ae86271620c2cc
BLAKE2b-256 090768c28a431a0e6995ab2c065dc3889b78d0ee601776e2bc5d885c6ba8d823

See more details on using hashes here.

Provenance

The following attestation bundles were made for zk_rag-1.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: zk_rag-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5842911cfe42842aa657a8fc7c349132eb1b9a54992a6c241975cdda84c2897
MD5 6dc8e3e1d9531e1edc605cc9da585be0
BLAKE2b-256 1ad433dd5118b920dc9d12adf413328faa486076dcbd512ee7777030629b002c

See more details on using hashes here.

Provenance

The following attestation bundles were made for zk_rag-1.1.0-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