Overview
“The Lad” is Applad’s AI-powered infrastructure assistant, accessed throughapplad instruct. Give instructions in plain language, and the Lad translates them into config changes, migrations, and infrastructure operations.
Every instruction is attributed to your SSH key identity in the audit trail. The exact prompt is recorded alongside every change — AI-assisted changes are always traceable to the human who authorized them.
Basic Usage
- Analyzes the instruction
- Creates
database/tables/posts.yamlwith appropriate fields - Generates a migration file
- Shows what it will do (always
--dry-runfirst) - Asks for confirmation
- Applies changes
- Records the prompt in the audit trail
Configuration
AI configuration lives inapplad.yaml:
applad.yaml
Provider Configuration
API keys are stored encrypted in the admin database, never in config files:applad.yaml:
Common Tasks
Create Tables
database/tables/users.yamlwith fields, indexes, and permissions- Migration file
- Updates
.env.exampleif new variables are needed
Add Fields to Existing Tables
- Migration to add the field
- Updates table YAML definition
Create Functions
functions/send-welcome-email.yamlwith event trigger onauth.user.created- Boilerplate function code in your preferred runtime
- Shows where to place the code
Configure Storage
storage/buckets/avatars.yamlwith appropriate configuration- Permission rules
Set Up Deployments
deployments/web.yamlwith domain, source, and build configuration- Security headers
- SSL configuration
Add Feature Flags
flags/new-dashboard.yamlwith boolean type- Per-environment defaults
Advanced Usage
Infrastructure Changes
project.yamlwith new environment definition- Infrastructure target configuration
- Environment-specific overrides
Security Audits
- Permission rules
- Filter expressions
- Potential security gaps
- Suggests improvements
Debugging
- Recent function logs
- Configuration
- Environment variables
- Common failure patterns
- Suggests fixes
Migration Assistance
- Migration SQL
- Down migration for rollback
- Updates table YAML with fulltext index
Dry-Run Mode
Always review before applying:- Which files would be created or modified
- Content of each file
- Environment variables that would be added
- Migrations that would be generated
Access Control
The Lad respects your SSH key’s permission scopes:infrastructure:apply:production scope:
Audit Trail
Everyapplad instruct action is recorded:
- Exact prompt
- SSH key identity
- Files created or modified
- When it happened
- Success or failure
Multi-Step Instructions
Complex instructions work across multiple resources:- Creates three table definitions
- Defines relations between tables
- Generates migrations
- Creates the notification function
- Sets up event trigger
- Shows the complete plan
- Asks for confirmation
Best Practices
Be specific
Be specific
Vague: “add some auth stuff”Specific: “add email and Google OAuth providers to auth.yaml with MFA enabled”
Review before applying
Review before applying
Always use
--dry-run first for production changes:One task at a time
One task at a time
Break complex changes into steps:
Check the audit trail
Check the audit trail
Review what the Lad has done:
Example Workflows
Building a Feature
Debugging Production
Infrastructure Changes
Limitations
The Lad cannot:- Execute arbitrary code
- Access external systems without explicit configuration
- Override SSH key permission scopes
- Make changes without human confirmation (unless explicitly automated)
- Perform destructive operations without
--dry-runreview
Disabling AI Features
To disable the AI assistant:applad.yaml
applad.yaml
Privacy and Data
When using cloud AI providers:- Your config structure is sent to the AI provider
- Actual secret values are never sent (only
${VAR}references) - Prompts and responses are logged in your audit trail
- You can use self-hosted models (Ollama) for full privacy
Self-Hosted AI
applad.yaml
Next Steps
Command Reference
Full CLI command reference
Project Setup
Set up a new Applad project from scratch