{"id":27900,"library":"krave-cli","title":"Krave CLI","description":"A terminal-native AI coding assistant CLI that connects to proprietary AI models (Krave 4.1 and Krave 4.2) for real-time code generation, debugging, file management, and system automation. Currently at version 2.1.1, released on npm with a focus on CLI-based development. It operates directly in the shell, providing real system access through tools like bash, writefile, spawn, webSearch, and webFetch. Key differentiators: dual-model architecture, autonomous subagents, persistent session management with auto-save/resume, and zero runtime dependencies. Requires Node.js >=18.0.0 and a terminal with Unicode/ANSI color support.","status":"active","version":"2.1.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","ai","coding","assistant","cli"],"install":[{"cmd":"npm install krave-cli","lang":"bash","label":"npm"},{"cmd":"yarn add krave-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add krave-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only since v2. CommonJS require throws ERR_REQUIRE_ESM.","wrong":"var krave = require('krave-cli')","symbol":"default","correct":"import krave from 'krave-cli'"},{"note":"Function call, not constructor. No named exports.","wrong":"new krave()","symbol":"krave","correct":"krave()"},{"note":"KraveOptions is a TypeScript type, not a value. Use import type.","wrong":"import { KraveOptions } from 'krave-cli'","symbol":"type KraveOptions","correct":"import type { KraveOptions } from 'krave-cli'"}],"quickstart":{"code":"#!/usr/bin/env node\nimport krave from 'krave-cli';\n\nconst options = {\n  apiKey: process.env.KRAVE_API_KEY ?? '',\n  model: 'krave-4.2',\n  sessionPath: './my-session.json',\n  tools: ['bash', 'writefile', 'spawn']\n};\n\nkrave(options).then(() => {\n  console.log('Session ended.');\n}).catch(err => {\n  console.error('Krave error:', err.message);\n  process.exit(1);\n});","lang":"typescript","description":"Demonstrates ESM import of Krave CLI, configuration with API key, model selection, session path, and tool enabling."},"warnings":[{"fix":"Use import statement instead of require(). If using CommonJS, use dynamic import: import('krave-cli').then(m => m.default(...)).","message":"ESM-only package — require() will throw ERR_REQUIRE_ESM","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Update Node.js to version 18 or later.","message":"Node.js >=18 required — older versions will fail to start","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Switch to krave-4.1 or krave-4.2.","message":"krave-4.0 model is deprecated and may be removed in a future version","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Set KRAVE_API_KEY environment variable before running krave.","message":"API key must be set via environment variable KRAVE_API_KEY or passed in options; otherwise CLI will exit with an authentication error.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Replace require('krave-cli') with dynamic import: const { default: krave } = await import('krave-cli');","cause":"Using CommonJS require() to import krave-cli, which is ESM-only since v2.","error":"ERR_REQUIRE_ESM: require() of ES Module not supported"},{"fix":"Set KRAVE_API_KEY in your shell: export KRAVE_API_KEY='your-api-key'","cause":"Missing API key environment variable.","error":"Error: KRAVE_API_KEY is not set"},{"fix":"Upgrade Node.js to version 18 or later using nvm or your package manager.","cause":"Running krave-cli on an older Node.js version.","error":"Error: Node version must be >=18.0.0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}