
Security News
pnpm 10.12 Introduces Global Virtual Store and Expanded Version Catalogs
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Karhu is a powerful command-line AI assistant designed for productivity, research, and creative tasks. It supports file and document processing, web browsing, contextual conversations, speech synthesis, and advanced profile/model management—all from your terminal.
Clone the repository:
git clone https://github.com/yourusername/karhu-cli.git
cd karhu-cli
Install dependencies:
pip install -r requirements.txt
(If using a virtual environment, activate it first.)
(Optional) Install extra system dependencies for TTS/STT features (see Speech and Voice Features).
Karhu uses JSON configuration files in src/karhu/config/
:
You can customize or add new profiles and models by editing these files.
Run Karhu from the project root:
python src/karhu/cli.py [OPTIONS]
Main options:
--query
, -q <question>
: Ask a direct question.--interactive
, -i
: Start interactive chat mode.--file
, -f <path>
: Process a specific file.--files
, -ff <directory>
: Process all files in a directory.--web
, -w <url>
: Browse a web page.--search
, -s <query>
: Perform a web search.--model
, -m <name>
: Select AI model.--profile
, -P <name>
: Select conversational profile.--setsprompt <prompt>
: Set a custom system prompt.--save
: Save conversation context.--clear
, -c
: Clear current context.--list-models
: List available models.--list-profiles
: List available profiles.--voices
: List TTS voices.--kokoro-voices
: List Kokoro TTS voices.--kokoro-blend <indices>
: Blend Kokoro voices.--help-commands
: Show all available commands.Start with:
python src/karhu/cli.py --interactive
Features:
!command
(see below).!model [name]
— Switch AI model.!list_models
— List models.!profile [name]
— Switch profile.!list_profiles
— List profiles.!create_profile [name:prompt]
— Create a new profile.!system_prompt
— Show current system prompt.!setsprompt [prompt]
— Set system prompt.!file [path]
— Read a file.!files [directory]
— Read all files in a directory.!browse [url]
— Browse a web page.!search [query]
— Web search.!context_size
— Show context size.!context_info
— Show context details.!optimize_context
— Summarize/optimize context.!search_context [query]
— Search within context.!chunk [id]
— List/retrieve document chunks.!save
— Save conversation.!clear
— Clear context.!clearall
— Clear all context/history.!lazy
— Toggle speech-to-text mode.!speak
— Toggle text-to-speech mode.!voices
— List TTS voices.!voice [index]
— Change TTS voice.!kokoro
— Toggle Kokoro TTS.!kokoro_voices
— List Kokoro voices.!kokoro_voice [index]
— Change Kokoro voice.!kokoro_blend [indices]
— Blend Kokoro voices.!help
— Show help.!quit
— Exit.python src/karhu/cli.py --file path/to/file.pdf
python src/karhu/cli.py --search "What is quantum computing?"
python src/karhu/cli.py --interactive --profile therapist
Karhu supports multiple AI models (e.g., GPT-4o, Claude, Gemma) and conversational profiles (e.g., coding, creative, academic, therapist, funny, sarcastic, chill). You can switch or create new ones at runtime.
!list_models
!model <name>
!list_profiles
!profile <name>
!create_profile name:prompt
Profiles are defined in src/karhu/config/profiles.json
.
!speak
, !voices
, !voice [index]
to enable and select voices.!kokoro
, !kokoro_voices
, !kokoro_voice
, !kokoro_blend
).!lazy
to toggle speech input mode.Note: Some features may require additional system dependencies (e.g., espeak
, ffmpeg
, or platform-specific TTS engines).
!save
!clear
!clearall
!context_size
, !context_info
!optimize_context
!search_context [query]
!chunk [id]
for large documentsRun all tests with:
pytest
Tests are located in the tests/
directory and cover core modules and features.
This project is licensed under the MIT License.
For questions or support, please open an issue on GitHub.
FAQs
An AI assistant with PDF processing, web browsing, and speech capabilities
We found that karhu demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.