![](https://private-user-images.githubusercontent.com/686715/298417278-a467adad-e284-40e9-b71e-7e8153eb2bd5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1MTkwODAsIm5iZiI6MTcyNTUxODc4MCwicGF0aCI6Ii82ODY3MTUvMjk4NDE3Mjc4LWE0NjdhZGFkLWUyODQtNDBlOS1iNzFlLTdlODE1M2ViMmJkNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwNVQwNjQ2MjBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01Yjk1NmIyYjc1NDQ3ZWUxMTBmYmU5NWI2ZDY4MGY1NWUxMmM0MWM2ODc3ODhmNzlkYTRkMTk5YWEzY2U4MTc3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.nWV7PtuUgtdaCm7wS4VU5rq-Aso0fx4LEV1Bw5dTgXc)
Kryten is a CLI tool to help you easily ask questions and get clear sourced answers directly from your documents.
./kryten ask ~/directives.pdf question "What's Space Core Directive 997?"
Work done by an officer's doppleganger in a parallel universe
cannot be claimed as overtime. (directives.pdf, page 1)
Kryten is portable, snappy, and works across all platforms with minimal resource usage. For real.
- CLI only
- Tiny footprint: Kryten is only 1.6MB.
- SQLite for portability and easy backups.
- Ask any question you want.
- Show your chat history for a single file.
- Show your chat history across all files.
- Documents are cached so questions are snappy.
- Run without ceremony. No need for configurations.
My intent is for Kryten to be used by other apps to power their RAG workflows.
Set these three Environment variables:
OPENAI_API_KEY="sk-123123"
PINECONE_API_KEY="123123"
PINECONE_ENDPOINT="https://some-index.svc.some-random-id.pinecone.io"
Call the kryten
binary.
./kryten ask ~/directives.pdf question "What's Space Core Directive 997?"
Work done by an officer's doppleganger in a parallel universe
cannot be claimed as overtime. (directives.pdf, page 1)
You can create your own API key here: https://platform.openai.com/api-keys
![Screenshot 2024-01-22 at 8 56 10 PM](https://private-user-images.githubusercontent.com/686715/298782166-ed3a130f-3f92-4f76-8d3c-30ad3beaf6b6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1MTkwODAsIm5iZiI6MTcyNTUxODc4MCwicGF0aCI6Ii82ODY3MTUvMjk4NzgyMTY2LWVkM2ExMzBmLTNmOTItNGY3Ni04ZDNjLTMwYWQzYmVhZjZiNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwNVQwNjQ2MjBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xZTQwNzNjNzYxMWYzZmE2NDUzODZjM2NiODQ5ODZhOTU2NTM3NWFiMTAwMDFiZDM5OThiZjA2OTkyNzJjMmQ3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.GrGxdaBbwtHstsJ4SMMUiQNpfiKatM5PtTV9lG2HfFk)
![Screenshot 2024-01-22 at 8 56 58 PM](https://private-user-images.githubusercontent.com/686715/298782207-796f9a3f-7bdf-451d-ab09-ae91763fc1b9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1MTkwODAsIm5iZiI6MTcyNTUxODc4MCwicGF0aCI6Ii82ODY3MTUvMjk4NzgyMjA3LTc5NmY5YTNmLTdiZGYtNDUxZC1hYjA5LWFlOTE3NjNmYzFiOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwNVQwNjQ2MjBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yYzk1MzcwYTdjMmExNWE2ZDUyNDFmZjM5YzMyZjFmODViNWIyNTVjODYwNTRmYjI4NTQ1YThhNTQ2MjAyOTFhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.fREQA6QRdqX8YPqiyB6vN6ljNZMQ1CciaLN8ZBNgZDU)
![Screenshot 2024-01-22 at 9 02 52 PM](https://private-user-images.githubusercontent.com/686715/298782598-ec41e977-5249-44b9-9874-195075d85f50.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1MTkwODAsIm5iZiI6MTcyNTUxODc4MCwicGF0aCI6Ii82ODY3MTUvMjk4NzgyNTk4LWVjNDFlOTc3LTUyNDktNDRiOS05ODc0LTE5NT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JmODY2MGYyOThhNjU3OGUwNzFlNzBmMzc1OWMxYTlmOTAzY2QwMTBiMzIzZWEwZjQ0ZTdiYzNlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.pgGzb8-yhgSiIsEXONYt7Kdlzjoxs6LdiC6L6-tRlII)
Tika App is used to extract the content of your documents. You'll need the Java Runtime Environment installed on your machine so this can run properly.
nimble install
nimble build && ./kryten ask ~/directives.pdf question "What is Space Core Directive 196156?"
TODO