2025-10-07 10:32:04 +01:00
|
|
|
# AI-Powered Infrastructure Automation
|
|
|
|
|
|
|
|
|
|
This module provides comprehensive AI capabilities for the provisioning system, enabling natural language infrastructure generation and management.
|
|
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
|
|
### 🤖 **Core AI Capabilities**
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
|
|
|
|
- Natural language Nickel file generation
|
2025-10-07 10:32:04 +01:00
|
|
|
- Intelligent template creation
|
|
|
|
|
- Infrastructure query processing
|
|
|
|
|
- Configuration validation and improvement
|
|
|
|
|
- Chat/webhook integration
|
|
|
|
|
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
### 📝 **Nickel Generation Types**
|
|
|
|
|
|
|
|
|
|
- **Server Configurations** (`servers.ncl`) - Generate server definitions with storage, networking, and services
|
|
|
|
|
- **Provider Defaults** (`*_defaults.ncl`) - Create provider-specific default settings
|
|
|
|
|
- **Settings Configuration** (`settings.ncl`) - Generate main infrastructure settings
|
2025-10-07 10:32:04 +01:00
|
|
|
- **Cluster Configuration** - Kubernetes and container orchestration setups
|
|
|
|
|
- **Task Services** - Individual service configurations
|
|
|
|
|
|
|
|
|
|
### 🔧 **AI Providers Supported**
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
- **OpenAI** (GPT-4, GPT-3.5)
|
|
|
|
|
- **Anthropic Claude** (Claude-3.5 Sonnet, Claude-3)
|
|
|
|
|
- **Generic/Local** (Ollama, local LLM APIs)
|
|
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
|
|
### Environment Variables
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```bash
|
|
|
|
|
# Enable AI functionality
|
|
|
|
|
export PROVISIONING_AI_ENABLED=true
|
|
|
|
|
|
|
|
|
|
# Set provider
|
|
|
|
|
export PROVISIONING_AI_PROVIDER="openai" # or "claude", "generic"
|
|
|
|
|
|
|
|
|
|
# API Keys (choose based on provider)
|
|
|
|
|
export OPENAI_API_KEY="your-openai-api-key"
|
|
|
|
|
export ANTHROPIC_API_KEY="your-anthropic-api-key"
|
|
|
|
|
export LLM_API_KEY="your-generic-api-key"
|
|
|
|
|
|
|
|
|
|
# Optional overrides
|
|
|
|
|
export PROVISIONING_AI_MODEL="gpt-4"
|
|
|
|
|
export PROVISIONING_AI_TEMPERATURE="0.3"
|
|
|
|
|
export PROVISIONING_AI_MAX_TOKENS="2048"
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
|
|
|
|
### Nickel Configuration
|
2025-10-07 10:32:04 +01:00
|
|
|
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
```nickel
|
2025-10-07 10:32:04 +01:00
|
|
|
import settings
|
|
|
|
|
|
|
|
|
|
settings.Settings {
|
|
|
|
|
ai = settings.AIProvider {
|
|
|
|
|
enabled = True
|
|
|
|
|
provider = "openai"
|
|
|
|
|
model = "gpt-4"
|
|
|
|
|
max_tokens = 2048
|
|
|
|
|
temperature = 0.3
|
|
|
|
|
enable_template_ai = True
|
|
|
|
|
enable_query_ai = True
|
|
|
|
|
enable_webhook_ai = False
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
### YAML Configuration (`ai.yaml`)
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```yaml
|
|
|
|
|
enabled: true
|
|
|
|
|
provider: "openai"
|
|
|
|
|
model: "gpt-4"
|
|
|
|
|
max_tokens: 2048
|
|
|
|
|
temperature: 0.3
|
|
|
|
|
timeout: 30
|
|
|
|
|
enable_template_ai: true
|
|
|
|
|
enable_query_ai: true
|
|
|
|
|
enable_webhook_ai: false
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
### 🎯 **Command Line Interface**
|
|
|
|
|
|
|
|
|
|
#### Generate Infrastructure with AI
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```bash
|
|
|
|
|
# Interactive generation
|
|
|
|
|
./provisioning ai generate --interactive
|
|
|
|
|
|
|
|
|
|
# Generate specific configurations
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
./provisioning ai gen -t server -p upcloud -i "3 Kubernetes nodes with Ceph storage" -o servers.ncl
|
|
|
|
|
./provisioning ai gen -t defaults -p aws -i "Production environment in us-west-2" -o aws_defaults.ncl
|
|
|
|
|
./provisioning ai gen -t settings -i "E-commerce platform with secrets management" -o settings.ncl
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
# Enhanced generation with validation
|
|
|
|
|
./provisioning generate-ai servers "High-availability Kubernetes cluster with 3 control planes and 5 workers" --validate --provider upcloud
|
|
|
|
|
|
|
|
|
|
# Improve existing configurations
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
./provisioning ai improve -i existing_servers.ncl -o improved_servers.ncl
|
2025-10-07 10:32:04 +01:00
|
|
|
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
# Validate and fix Nickel files
|
|
|
|
|
./provisioning ai validate -i servers.ncl
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
#### Interactive AI Chat
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```bash
|
|
|
|
|
# Start chat session
|
|
|
|
|
./provisioning ai chat
|
|
|
|
|
|
|
|
|
|
# Single query
|
|
|
|
|
./provisioning ai chat -i "How do I set up a 3-node Kubernetes cluster with persistent storage?"
|
|
|
|
|
|
|
|
|
|
# Test AI connectivity
|
|
|
|
|
./provisioning ai test
|
|
|
|
|
|
|
|
|
|
# Show configuration
|
|
|
|
|
./provisioning ai config
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
### 🧠 **Programmatic API**
|
|
|
|
|
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
#### Generate Nickel Files
|
|
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```nushell
|
|
|
|
|
use lib_provisioning/ai/templates.nu *
|
|
|
|
|
|
|
|
|
|
# Generate server configuration
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
let servers = (generate_server_nickel "3 Kubernetes nodes for production workloads" "upcloud" "servers.ncl")
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
# Generate provider defaults
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
let defaults = (generate_defaults_nickel "High-availability setup in EU region" "aws" "aws_defaults.ncl")
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
# Generate complete infrastructure
|
|
|
|
|
let result = (generate_full_infra_ai "E-commerce platform with database and caching" "upcloud" "" false)
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
#### Process Natural Language Queries
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```nushell
|
|
|
|
|
use lib_provisioning/ai/lib.nu *
|
|
|
|
|
|
|
|
|
|
# Process infrastructure queries
|
|
|
|
|
let response = (ai_process_query "Show me all servers with high CPU usage")
|
|
|
|
|
|
|
|
|
|
# Generate templates
|
|
|
|
|
let template = (ai_generate_template "Docker Swarm cluster with monitoring" "cluster")
|
|
|
|
|
|
|
|
|
|
# Validate configurations
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
let validation = (validate_and_fix_nickel "servers.ncl")
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
### 🌐 **Webhook Integration**
|
|
|
|
|
|
|
|
|
|
#### HTTP Webhook
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```bash
|
|
|
|
|
curl -X POST http://your-server/webhook \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
-d '{
|
|
|
|
|
"message": "generate 3 kubernetes servers with monitoring",
|
|
|
|
|
"user_id": "user123",
|
|
|
|
|
"channel": "infrastructure"
|
|
|
|
|
}'
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
#### Slack Integration
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```nushell
|
|
|
|
|
# Process Slack webhook payload
|
|
|
|
|
let slack_payload = {
|
|
|
|
|
text: "generate upcloud defaults for development",
|
|
|
|
|
user_id: "U123456",
|
|
|
|
|
channel_id: "C789012"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let response = (process_slack_webhook $slack_payload)
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
#### Discord Integration
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```nushell
|
|
|
|
|
# Process Discord webhook
|
|
|
|
|
let discord_payload = {
|
|
|
|
|
content: "show infrastructure status",
|
|
|
|
|
author: { id: "123456789" },
|
|
|
|
|
channel_id: "987654321"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let response = (process_discord_webhook $discord_payload)
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
|
|
### 🏗️ **Infrastructure Generation Examples**
|
|
|
|
|
|
|
|
|
|
#### 1. Kubernetes Cluster Setup
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```bash
|
|
|
|
|
./provisioning generate-ai servers "
|
|
|
|
|
High-availability Kubernetes cluster with:
|
|
|
|
|
- 3 control plane nodes (4 CPU, 8GB RAM each)
|
|
|
|
|
- 5 worker nodes (8 CPU, 16GB RAM each)
|
|
|
|
|
- Dedicated storage nodes with Ceph
|
|
|
|
|
- Private networking with load balancer
|
|
|
|
|
- Monitoring and logging stack
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
" --provider upcloud --output k8s_cluster_servers.ncl --validate
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
#### 2. AWS Production Environment
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```bash
|
|
|
|
|
./provisioning generate-ai defaults "
|
|
|
|
|
AWS production environment configuration:
|
|
|
|
|
- Region: us-west-2 (primary), us-east-1 (backup)
|
|
|
|
|
- High availability across 3 AZs
|
|
|
|
|
- Enhanced security with VPC, private subnets
|
|
|
|
|
- Auto-scaling groups for applications
|
|
|
|
|
- RDS Multi-AZ for databases
|
|
|
|
|
- ElastiCache for caching
|
|
|
|
|
- CloudFront CDN
|
|
|
|
|
- Route53 DNS management
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
" --provider aws --output aws_prod_defaults.ncl
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
#### 3. Development Environment
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```bash
|
|
|
|
|
./provisioning generate-ai infra "
|
|
|
|
|
Development environment for a microservices application:
|
|
|
|
|
- 1 jump/bastion server
|
|
|
|
|
- 3 application servers (containerized workloads)
|
|
|
|
|
- 1 database server (PostgreSQL)
|
|
|
|
|
- 1 cache server (Redis)
|
|
|
|
|
- Shared NFS storage
|
|
|
|
|
- Development tools (Git, CI/CD agents)
|
|
|
|
|
- Monitoring (Prometheus, Grafana)
|
|
|
|
|
" --provider local --interactive
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
### 💬 **Chat Examples**
|
|
|
|
|
|
|
|
|
|
**User:** *"I need to set up a scalable web application infrastructure"*
|
|
|
|
|
|
|
|
|
|
**AI:** *"I can help you design a scalable web infrastructure! Let me generate a configuration that includes:*
|
|
|
|
|
|
|
|
|
|
*- Load balancers for high availability*
|
|
|
|
|
*- Auto-scaling application servers*
|
|
|
|
|
*- Database with read replicas*
|
|
|
|
|
*- Caching layer*
|
|
|
|
|
*- CDN for static assets*
|
|
|
|
|
|
|
|
|
|
*Would you like me to create this for a specific provider like AWS, UpCloud, or local deployment?"*
|
|
|
|
|
|
|
|
|
|
**User:** *"Generate it for UpCloud with monitoring included"*
|
|
|
|
|
|
|
|
|
|
**AI:** *"Perfect! I'll generate an UpCloud configuration with monitoring. Here's your infrastructure setup:*
|
|
|
|
|
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
```nickel
|
2025-10-07 10:32:04 +01:00
|
|
|
import upcloud_prov
|
|
|
|
|
servers = [
|
|
|
|
|
// Load balancer
|
|
|
|
|
upcloud_prov.Server_upcloud {
|
|
|
|
|
hostname = "lb-01"
|
|
|
|
|
plan = "2xCPU-4GB"
|
|
|
|
|
// ... configuration
|
|
|
|
|
}
|
|
|
|
|
// Application servers with auto-scaling
|
|
|
|
|
// Database servers with replication
|
|
|
|
|
// Monitoring stack with Prometheus/Grafana
|
|
|
|
|
]
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
2026-01-09 15:08:49 +00:00
|
|
|
*This configuration includes 7 servers optimized for high availability and performance.
|
|
|
|
|
Would you like me to explain any specific part or generate additional configurations?"*
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
### 🚀 **Advanced Features**
|
|
|
|
|
|
|
|
|
|
#### Interactive Configuration Builder
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```bash
|
|
|
|
|
./provisioning ai generate --interactive
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
This launches an interactive session that asks specific questions to build optimal configurations:
|
|
|
|
|
|
|
|
|
|
1. **Infrastructure Purpose** - Web app, data processing, ML training, etc.
|
|
|
|
|
2. **Scale Requirements** - Number of users, traffic patterns, growth projections
|
|
|
|
|
3. **Provider Preference** - Cloud provider selection and regions
|
|
|
|
|
4. **Service Requirements** - Databases, caching, storage, monitoring
|
|
|
|
|
5. **Security Needs** - Compliance requirements, network isolation
|
|
|
|
|
6. **Budget Constraints** - Cost optimization preferences
|
|
|
|
|
|
|
|
|
|
#### Configuration Optimization
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
```bash
|
|
|
|
|
# Analyze and improve existing configurations
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
./provisioning ai improve existing_config.ncl --output optimized_config.ncl
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
# Get AI suggestions for performance improvements
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
./provisioning ai query --prompt "How can I optimize this configuration for better performance?" --context file:servers.ncl
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
## Integration with Existing Workflows
|
|
|
|
|
|
|
|
|
|
### 🔄 **Workflow Integration**
|
|
|
|
|
|
|
|
|
|
1. **Generate** configurations with AI
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
2. **Validate** using Nickel compiler
|
2025-10-07 10:32:04 +01:00
|
|
|
3. **Review** and customize as needed
|
|
|
|
|
4. **Apply** using provisioning commands
|
|
|
|
|
5. **Monitor** and iterate
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Complete workflow example
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
./provisioning generate-ai servers "Production Kubernetes cluster" --validate --output servers.ncl
|
2025-10-07 10:32:04 +01:00
|
|
|
./provisioning server create --check # Review before creation
|
|
|
|
|
./provisioning server create # Actually create infrastructure
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
### 🛡️ **Security & Best Practices**
|
|
|
|
|
|
|
|
|
|
- **API Keys**: Store in environment variables, never in code
|
|
|
|
|
- **Validation**: Always validate AI-generated configurations
|
|
|
|
|
- **Review**: Human review recommended for production deployments
|
|
|
|
|
- **Version Control**: Track all generated configurations
|
|
|
|
|
- **Testing**: Use `--check` mode for dry runs
|
|
|
|
|
|
|
|
|
|
### 🧪 **Testing & Development**
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Test AI functionality
|
|
|
|
|
./provisioning ai test
|
|
|
|
|
|
|
|
|
|
# Test webhook processing
|
|
|
|
|
./provisioning ai webhook test
|
|
|
|
|
|
|
|
|
|
# Debug mode for troubleshooting
|
|
|
|
|
./provisioning generate-ai servers "test setup" --debug
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
## Architecture
|
|
|
|
|
|
|
|
|
|
### 🏗️ **Module Structure**
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
|
|
|
|
```plaintext
|
2025-10-07 10:32:04 +01:00
|
|
|
ai/
|
|
|
|
|
├── lib.nu # Core AI functionality and API integration
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
├── templates.nu # Nickel template generation functions
|
2025-10-07 10:32:04 +01:00
|
|
|
├── webhook.nu # Chat/webhook processing
|
|
|
|
|
├── mod.nu # Module exports
|
|
|
|
|
└── README.md # This documentation
|
2026-01-12 05:00:00 +00:00
|
|
|
```
|
2025-10-07 10:32:04 +01:00
|
|
|
|
|
|
|
|
### 🔌 **Integration Points**
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
- **Settings System** - AI configuration management
|
|
|
|
|
- **Secrets Management** - Integration with SOPS/KMS for secure API keys
|
|
|
|
|
- **Template Engine** - Enhanced with AI-generated content
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
- **Validation System** - Automated Nickel syntax checking
|
2025-10-07 10:32:04 +01:00
|
|
|
- **CLI Commands** - Natural language command processing
|
|
|
|
|
|
|
|
|
|
### 🌊 **Data Flow**
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
|
2025-10-07 10:32:04 +01:00
|
|
|
1. **Input** - Natural language description or chat message
|
|
|
|
|
2. **Intent Detection** - Parse and understand user requirements
|
|
|
|
|
3. **Context Building** - Gather relevant infrastructure context
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
4. **AI Processing** - Generate appropriate Nickel configurations
|
2025-10-07 10:32:04 +01:00
|
|
|
5. **Validation** - Syntax and semantic validation
|
chore: complete KCL to Nickel migration cleanup and setup pre-commit
Clean up 404 KCL references (99.75% complete):
- Rename kcl_* variables to schema_*/nickel_* (kcl_path→schema_path, etc.)
- Update functions: parse_kcl_file→parse_nickel_file
- Update env vars: KCL_MOD_PATH→NICKEL_IMPORT_PATH
- Fix cli/providers-install: add has_nickel and nickel_version variables
- Correct import syntax: .nickel.→.ncl.
- Update 57 files across core, CLI, config, and utilities
Configure pre-commit hooks:
- Activate: nushell-check, nickel-typecheck, markdownlint
- Comment out: Rust hooks (fmt, clippy, test), check-yaml
Testing:
- Module discovery: 9 modules (6 providers, 1 taskserv, 2 clusters) ✅
- Syntax validation: 15 core files ✅
- Pre-commit hooks: all passing ✅
2026-01-08 20:08:46 +00:00
|
|
|
6. **Output** - Formatted Nickel files and user feedback
|
2025-10-07 10:32:04 +01:00
|
|
|
|
2026-01-09 15:08:49 +00:00
|
|
|
This AI integration transforms the provisioning system into an intelligent infrastructure automation platform
|
|
|
|
|
that understands natural language and generates production-ready configurations.
|