This document provides detailed installation instructions for kibi.
Kibi depends on SWI-Prolog 9.0+. You must have swipl installed and available in your PATH before installing kibi.
The official SWI-Prolog project provides a Personal Package Archive (PPA) for Ubuntu that stays current with every release. This is the recommended installation method for Ubuntu users.
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:swi-prolog/stable
sudo apt-get update
sudo apt-get install swi-prologOfficial Linux distribution packages are often outdated. For other Linux distributions, please refer to the official SWI-Prolog documentation:
- Unix/Linux installation guide - Comprehensive instructions for building from source or using other methods
- Stable downloads page - Source archives and binaries
- Flatpak - Available for most Linux distributions
After installation, verify that swipl is available:
swipl --versionYou should see output like SWI-Prolog version 10.x.x.
For a reproducible, CI-friendly workflow, install kibi as project-level dev dependencies:
npm install --save-dev kibi-cli kibi-mcpAfter installation, verify the tools from the local project using npx:
npx kibi --version
npx kibi-mcp --helpCommon environment check: npx kibi doctor.
Validation command: npx kibi check.
For OpenCode, add a local MCP server in opencode.json. OpenCode uses a token-array command field:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"kibi": {
"type": "local",
"command": ["npx", "-y", "kibi-mcp"],
"enabled": true
}
}
}For VS Code, create .vscode/mcp.json. VS Code uses a command string with a separate args array:
{
"servers": {
"kibi": {
"type": "stdio",
"command": "npx",
"args": ["-y", "kibi-mcp"]
}
}
}Global install is convenient for interactive use across projects, but local install is preferred for reproducibility.
npm install -g kibi-cli kibi-mcpOptional Bun alternative:
bun add -g kibi-cli kibi-mcpIf you see "command not found" after installing kibi globally, you may need to adjust your PATH:
-
Check global npm/bin location:
npm config get prefix
The output shows where npm installs global packages.
-
Add to PATH (if needed): Add the global bin directory to your shell configuration:
# For bash (in ~/.bashrc or ~/.bash_profile): export PATH="$PATH:/usr/local/bin" # For zsh (in ~/.zshrc): export PATH="$PATH:/home/$USER/.npm-global/bin"
-
Reload your shell configuration:
source ~/.bashrc # or source ~/.zshrc
For contributors to this repository only:
This repository uses local built kibi-mcp and kibi-opencode artifacts in its OpenCode setup. After changing package versions or local package wiring, rebuild before testing or using OpenCode here:
bun run buildIf you encounter problems with SWI-Prolog:
- Refer to the SWI-Prolog build documentation for platform-specific guidance
- Check the SWI-Prolog FAQ
- Report issues on the SWI-Prolog forum
After installing kibi and verifying SWI-Prolog:
- Verify your environment:
npx kibi doctor - Initialize your project:
npx kibi init - Import documentation:
npx kibi sync - Explore the KB:
npx kibi search <query> - Inspect branch freshness:
npx kibi status - Validate integrity:
npx kibi check
See Entity Schema for details on entity types and when to use each. Example:
npx kibi doctor
npx kibi init
npx kibi sync
npx kibi search auth
npx kibi status
npx kibi checkFor more details, see:
- Quick Start - Brief getting started guide
- CLI Reference - Complete command documentation
- Troubleshooting - Recovery procedures