Skip to content

Kodezi/kodezi-cli-new-releases

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Kodezi CLI

AI-Powered Terminal Assistant for Intelligent Code Development

Kodezi CLI is an advanced AI-powered terminal assistant that provides intelligent code editing, analysis, and automation directly in your terminal. Transform your development workflow with natural language interactions and powerful built-in tools.

Installation

Install Kodezi CLI globally using npm:

npm install -g kodezi-cli

Verify the installation:

kodezi --version

Features

Interactive AI Assistant

Conversation Interface

  • Natural Language Interface: Communicate with AI using plain English for all development tasks
  • Session Persistence: Maintain conversation context across sessions with SQLite-backed storage
  • Real-time Interaction: Streaming responses with immediate feedback and multi-turn conversations
  • Automatic Summarization: Compress long sessions while preserving important context

Comprehensive Toolkit

  • 12 Built-in Tools: Complete set of utilities for file operations, directory browsing, code search, and command execution
  • File Operations: Read, write, edit, and multi-edit files with intelligent content handling
  • Directory Management: List, glob pattern matching, and grep search capabilities
  • Command Execution: Full shell environment access with real-time output streaming
  • Network Operations: HTTP requests and file downloads with progress tracking

Advanced Code Intelligence

  • LSP Integration: Real-time code intelligence and diagnostics across multiple programming languages
  • Multi-Language Support: Works with any language that has an LSP server
  • Error Detection: Automatic identification of warnings and errors in your codebase
  • Code Context: Enhanced understanding of project structure and relationships

Extensible Architecture

  • MCP Support: Extend functionality using Model Context Protocol servers
  • Custom Tools: Add project-specific tools without modifying the CLI
  • Multiple Servers: Connect to multiple MCP servers simultaneously
  • Auto-Discovery: Automatic tool registration from connected MCP servers

Granular Security

Permission System

  • Permission System: Approval prompts for all file modifications and command executions
  • Fine-grained Control: Per-tool, per-directory, and per-action permissions
  • Allowlist Support: Pre-approve trusted operations and tools
  • Session-level Persistence: Remember permissions for current session

Automation Ready

  • Non-interactive Mode: Perfect for CI/CD pipelines and scripting
  • Auto-approval Options: Skip prompts in trusted environments
  • Pipe Support: Accept input from stdin for batch operations
  • Exit Code Handling: Proper error reporting for automated workflows

Quick Start

Interactive Mode

  1. Authenticate your account:

    kodezi auth login
  2. Start interactive mode:

    kodezi
  3. Begin with simple commands:

    > "What files are in this project?"
    > "Show me the contents of package.json"
    > "Find all TODO comments in the codebase"
  4. Exit when done:

    > "exit"

Authentication

Login Process

Kodezi CLI requires authentication to access AI features:

Login Process

kodezi auth login

You'll be prompted to provide:

  • Email: Your Kodezi account email
  • API Token: Available from your Kodezi dashboard

View Status

kodezi auth status

Logout

kodezi auth logout

Commands

Kodezi CLI provides five main commands:

kodezi (Interactive Mode)

Start an interactive AI session with persistent context:

kodezi [options]

Options:
  -c, --cwd <path>     Working directory (default: current directory)
  -d, --debug         Enable debug mode with detailed logging
  -y, --yolo          Auto-approve all permissions (use with caution)

kodezi run (Non-interactive)

Execute single tasks without starting a session:

kodezi run [options] [prompt]

Options:
  -q, --quiet         Suppress spinner and progress indicators
  -y, --yolo          Auto-approve all permissions

# Examples:
kodezi run "Generate a README for this project"
echo "Explain this code" | kodezi run

kodezi auth

Manage authentication credentials:

kodezi auth <command>

Commands:
  login               Login with email and API token
  logout              Remove stored credentials
  status              Show current authentication status

kodezi dirs

Manage session directories and history:

kodezi dirs [options]

Options:
  --list              List all session directories
  --clean             Clean up old session data

kodezi logs

View and manage application logs:

kodezi logs [options]

Options:
  --tail              Follow logs in real-time
  --clear             Clear existing logs

Configuration

Kodezi CLI uses JSON-based configuration stored in your system's config directory. Create or edit the configuration file to customize behavior:

Configuration Location

  • Windows: %APPDATA%/kodezi-cli/config.json
  • macOS: ~/Library/Application Support/kodezi-cli/config.json
  • Linux: ~/.config/kodezi-cli/config.json

Example Configuration

{
  "api": {
    "base_url": "https://api.kodezi.com",
    "timeout": 30000
  },
  "permissions": {
    "auto_approve": false,
    "allowed_tools": ["view", "ls", "grep"],
    "blocked_paths": [".env", "secrets/"]
  },
  "options": {
    "context_paths": [
      "README.md",
      "ARCHITECTURE.md"
    ],
    "max_tokens": 8192,
    "temperature": 0.7
  }
}

Key Settings

  • Auto-approve: Skip permission prompts for trusted environments
  • Allowed Tools: Pre-approve specific tools to reduce prompts
  • Context Paths: Additional files to include for project understanding
  • Max Tokens: Control response length and cost
  • Blocked Paths: Prevent access to sensitive files

Advanced Features

LSP Integration

Enable real-time code intelligence by configuring Language Server Protocol support:

{
  "lsp": {
    "typescript": {
      "command": "typescript-language-server",
      "args": ["--stdio"]
    },
    "python": {
      "command": "pylsp",
      "args": []
    },
    "go": {
      "command": "gopls",
      "args": []
    }
  }
}

Benefits:

  • Real-time error and warning detection
  • Enhanced code context understanding
  • Multi-language diagnostic support
  • Background processing without blocking interaction

MCP Server Setup

Extend Kodezi CLI with Model Context Protocol servers:

{
  "mcp": {
    "database": {
      "type": "stdio",
      "command": "npx",
      "args": ["@kodezi/mcp-database"]
    },
    "custom-tools": {
      "type": "stdio", 
      "command": "node",
      "args": ["/path/to/your-mcp-server.js"]
    }
  }
}

Capabilities:

  • Add custom tools for your specific workflow
  • Connect to multiple MCP servers simultaneously
  • Share tools across team through standardized protocol
  • Extend functionality without modifying the CLI

Context Files

Improve AI understanding by providing additional project context:

{
  "options": {
    "context_paths": [
      "ARCHITECTURE.md",
      "CONTRIBUTING.md", 
      "docs/api.md",
      "package.json"
    ]
  }
}

The AI automatically accesses these files to better understand your project structure, conventions, and requirements.

Usage Examples

Code Review and Analysis

> "Review the security of auth.js and suggest improvements"
> "Find potential memory leaks in the codebase"
> "Check for unused imports across all TypeScript files"

Documentation Generation

> "Generate JSDoc comments for all functions in utils.ts"
> "Create API documentation for the routes in server.js"
> "Add inline comments explaining the algorithm in sort.py"

Refactoring and Modernization

> "Refactor callback functions to async/await in database.js"
> "Convert class components to hooks in React files"
> "Update deprecated APIs in the entire codebase"

Testing and Debugging

> "Generate unit tests for the UserService class"
> "Debug why the authentication tests are failing"
> "Add error handling to the API endpoints"

Project Setup and Maintenance

> "Set up ESLint configuration for this TypeScript project"
> "Add GitHub Actions workflow for CI/CD"
> "Update dependencies and fix breaking changes"

Automation Workflows

# CI/CD Integration
kodezi run --yolo "Run tests and generate coverage report"

# Batch Processing
for file in src/*.js; do
  kodezi run "Add error handling to $file"
done

# Daily Maintenance
kodezi run --quiet "Check for code quality issues and security vulnerabilities"

License

This project is licensed under the terms specified in LICENSE.md.


Ready to transform your development workflow? Start with npm install -g kodezi-cli and experience AI-powered coding assistance directly in your terminal.

For detailed documentation, visit app.kodezi.com/docs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published