⚡ kAIcad

AI-Powered KiCad Schematic Assistant

{% if config.KAICAD_REMOTE_MODE %} {% endif %}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %}
{{ message }}
{% endfor %} {% endif %} {% endwith %}
{% if not config.KAICAD_REMOTE_MODE %} {% endif %}

💬 Chat with AI

{% if chat_history %} {% for msg in chat_history %}
{{ msg.role|title }}

{{ msg.content }}

{% endfor %} {% else %}

Start a conversation about your schematic changes...

{% endif %}

{{ current_chat_model }} · max reasoning

{% if not has_api_key %}

{% if auth_mode == auth_mode_codex %}⚠ Chat requires API-key mode; Codex subscription remains available for plan generation. {% else %}⚠ {% if config.KAICAD_REMOTE_MODE %}Chat is unavailable in the service owner's current configuration.{% else %}Configure an API key in Settings to enable chat.{% endif %}{% endif %}

{% endif %}

🎯 Generate Plan

💡 Click 🤖 to let AI expand your brief idea into a detailed plan

{{ current_model }} · max reasoning

{% if not can_plan %}

{% if auth_mode == auth_mode_codex %}Run codex login and select ChatGPT to enable planning. {% else %}Save an OpenAI API key in Settings to enable planning.{% endif %}

{% endif %}

📋 Plan JSON

💾 On apply: Schematic is automatically backed up as .kicad_sch.bak • ERC, Netlist, and PDF are generated

Approve schematic changes

Confirm only after reviewing this exact plan and source snapshot.

{% if approval_review %}

Summary: {{ approval_review.summary }}

Plan SHA-256: {{ approval_review.plan_sha256 }}

Source SHA-256: {{ approval_review.source_sha256 }}

{{ approval_review.diff }}
{% else %}

No plan is awaiting approval.

{% endif %}
{% if not config.KAICAD_REMOTE_MODE %}

📁 Project Configuration

💡 Paste the full path to your .kicad_pro or .kicad_sch file and click Detect
Example: C:\Users\YourName\Documents\MyProject\MyProject.kicad_pro

📊 Status:

Project: {{ project_name or '—' }}

Schematic: {{ sch_name or '—' }}

{% if sch_name %} {% else %} {% endif %}

🔑 Authentication

{% if auth_mode == auth_mode_api_key %}
{% if has_api_key %}

✓ API key available in API-key mode

{% else %}

⚠ No API key set - AI features disabled

{% endif %}

🔒 Saved keys use your operating system credential keyring and are never written to project files
🤖 Required for AI-powered plan generation

{% else %}
{% if codex_logged_in %}

✓ Codex CLI is logged in with ChatGPT

{% else %}

⚠ Codex CLI is not logged in with ChatGPT

{% endif %}

Run codex login in a terminal and select ChatGPT authentication. kAIcad checks login status only; it never displays Codex credentials.

{% endif %}
{% endif %}