osr-mono/packages/osr-code-bot/docs_
2025-02-02 11:03:44 +01:00
..
advanced.md kbot 2025-01-30 00:50:58 +01:00
commands.md cleanup kbot :) 2025-02-02 11:03:44 +01:00
docker.md kbot 2025-01-30 00:50:58 +01:00
docker.sh kbot 2025-01-30 00:50:58 +01:00
examples.md cleanup kbot :) 2025-02-02 11:03:44 +01:00
install.md kbot 2025-01-30 00:50:58 +01:00
parameters.md cleanup kbot :) 2025-02-02 11:03:44 +01:00
preferences.md kbot 2025-01-30 00:50:58 +01:00
README.md cleanup kbot :) 2025-02-02 11:03:44 +01:00
todos.md kbot 2025-01-30 00:50:58 +01:00
tools.md kbot 2025-01-30 00:50:58 +01:00

@plastichub/kbot

AI-powered command-line tool for code modifications and project management that supports multiple AI models and routers.

Overview

Code-bot is a powerful CLI tool that helps developers automate code modifications, handle project management tasks, and integrate with various AI models for intelligent code and content assistance.

Quick Start

Installation Steps

KBot requires Node.js to run. It's recommended to use Node.js version 18 or higher.

  1. Visit the official Node.js website
  2. Download the LTS (Long Term Support) version for your operating system
  3. Follow the installation wizard
  4. Verify installation by opening a terminal and running:
    node --version
    npm --version
    

API Keys

KBot supports both OpenRouter and OpenAI APIs. You'll need at least one of these set up.

  1. Visit OpenRouter
  2. Sign up for an account
  3. Navigate to the API Keys section
  4. Create a new API key

OpenAI API (Optional)

  1. Go to OpenAI's platform
  2. Create an account or sign in
  3. Navigate to API keys section
  4. Create a new secret key

Installation using Node NPM package manager

npm install -g @plastichub/kbot

Configuration

API Keys Setup

Create configuration at $HOME/.osr/.config.json (or export OSR_CONFIG with path to config.json):

{
  "openrouter": {
    "key": "your-openrouter-key"
  },
  "openai": {
    "key": "your-openai-key"
  },
   "email": {
      "newsletter": {
          "host": "host.org",
          "port": 465,
          "debug": true,
          "transactionLog": true,
          "auth": {
              "user": "foo@bar.com",
              "pass": "pass"
          }
      }
  },
  "google": {
      "cse": "custom search engine id",
      "api_key": "google custom search api key"
  },
  "serpapi": {
      "key": "your SerpAPI key (optional, used for web searches(places, google maps))"
  },
  "deepseek": {
      "key": "your SerpAPI key (optional, used for web searches(places, google maps))"
  },
}

Preferences Setup

Optionally, create .kbot/preferences.md in your project directory to customize AI interactions:

## My Preferences

Gender : male
Location : New York, USA (eg: `send me all saunas next to me`)
Language : English
Occupation : software developer, Typescript
Age : 30+

## Contacts

My email address : example@email.com (eg: `send me latest hacker news`)
My wife's email address ("Anne") : example@email.com (eg: `send email to my wife, with latest local news')

## Content

When creating content
- always Markdown
- always add links
- when sending emails, always add 'Best regards, [Your Name]'