# Kandil Code Onboarding Tutorial
Welcome to Kandil Code, the intelligent development platform! This tutorial will guide you through the core features and capabilities of Kandil Code.
## Table of Contents
1. [Getting Started](#getting-started)
2. [Core Features](#core-features)
3. [Advanced Usage](#advanced-usage)
4. [Best Practices](#best-practices)
## Getting Started
### Installation
Kandil Code is easy to install and get running:
```bash
# Download the latest binary from releases
curl -L https://github.com/Kandil7/kandil_code/releases/download/v2.0.0/kandil_windows_x64.zip -o kandil.zip
unzip kandil.zip
./kandil --help
```
### Initial Setup
After installing, run the setup command to initialize your configuration:
```bash
kandil init
```
This will create your configuration file and set up the necessary directories.
### AI Provider Configuration
To use AI features, configure your AI provider:
```bash
kandil config set-key <provider> <api-key>
# Example: kandil config set-key openai sk-...
```
## Core Features
### 1. The Interactive Shell
Start the interactive shell with:
```bash
kandil chat
```
This provides an AI-assisted environment where you can ask questions about your code, request implementations, and get intelligent suggestions.
### 2. Splash Commands
Kandil provides special slash commands for common tasks:
- `/ask` - Ask questions about your code or project
- `/refactor` - Run AI-assisted refactoring suggestions
- `/test` - Generate or run tests for the active file
- `/fix` - Analyze and fix compilation/runtime errors
- `/commit` - Generate semantic commit message
- `/review` - Request AI code review on staged changes
- `/doc` - Generate or update documentation
Example usage:
```
/refactor src/main.rs
/test src/main.rs
/review src/main.rs
```
### 3. Project Creation
Create new projects from templates:
```bash
kandil create flutter my_flutter_app
kandil create rust my_rust_project
kandil create python my_python_project
```
### 4. AI Model Management
Kandil Code includes built-in model management:
```bash
# List available models
kandil model list
# List compatible models based on your hardware
kandil model list --compatible
# Install a specific model
kandil model install qwen2.5-coder-7b-q4
# Benchmark your current model
kandil model benchmark
# Run system diagnostics
kandil doctor
```
## Advanced Usage
### 1. Multi-Agent System
Kandil includes specialized AI agents for different development tasks:
```bash
# Requirements agent
kandil agent requirements "Build a note-taking app with sync"
# Code generation agent
kandil agent code "design.md" dart
# Testing agent
kandil agent test generate src/main.rs
```
### 2. Professional Role Simulations
Simulate different roles in your development workflow:
```bash
# Project Manager simulation
kandil simulate pm plan-sprint "feature-branch" 2
# Business Analyst simulation
kandil simulate ba validate "requirements.md"
# Architect simulation
kandil simulate architect review "architecture.md"
```
### 3. Performance Monitoring
Monitor and benchmark your development environment:
```bash
# Run comprehensive system diagnostics
kandil doctor
# Cross-platform model benchmarking
kandil model benchmark --all-runtimes
# Check system health in detail
kandil linux doctor # On Linux
kandil macos doctor # On macOS
kandil windows doctor # On Windows
```
### 4. TUI Studio
Launch the terminal-based IDE:
```bash
kandil tui
```
This provides a full-featured development environment with file navigation, code preview, and AI chat capabilities.
## Best Practices
### 1. Command Organization
- Use splash commands (`/command`) for quick actions
- Chain commands with pipelines when appropriate
- Use `Ctrl+C` to interrupt long-running operations
### 2. AI Usage
- Be specific with your queries
- Use `/ask` for general questions
- Use `/refactor` before committing changes
- Use `/test` regularly during development
- Use `/review` before merging code
### 3. Project Structure
- Initialize projects with `kandil init`
- Keep related files in organized directories
- Use meaningful commit messages generated by `/commit`
### 4. Performance Optimization
- Run `kandil model benchmark` periodically to optimize model selection
- Use `kandil doctor` to identify performance bottlenecks
- Configure hardware-specific optimizations based on your system
## Next Steps
1. Try the interactive shell: `kandil chat`
2. Create your first project: `kandil create rust my_new_project`
3. Explore splash commands in the interactive shell
4. Configure your AI provider for advanced features
5. Run a system diagnostic: `kandil doctor`
Welcome to the future of AI-assisted development!