CLI Overview
Quick Start Guide
wheels info
wheels reload
wheels deps
wheels destroy
wheels watch
wheels generate app
wheels generate app-wizard
wheels generate controller
wheels generate model
wheels generate view
wheels generate property
wheels generate route
wheels generate resource
wheels generate api-resource
wheels generate frontend
wheels generate test
wheels generate snippets
wheels scaffold
wheels db create
wheels db drop
wheels db setup
wheels db reset
wheels db status
wheels db version
wheels db rollback
wheels db seed
wheels db dump
wheels db restore
wheels db shell
wheels db schema
wheels dbmigrate info
wheels dbmigrate latest
wheels dbmigrate up
wheels dbmigrate down
wheels dbmigrate reset
wheels dbmigrate exec
wheels dbmigrate create blank
wheels dbmigrate create table
wheels dbmigrate create column
wheels dbmigrate remove table
wheels test
wheels test run
wheels test coverage
wheels test debug
wheels config list
wheels config set
wheels config env
wheels env
wheels env setup
wheels env list
wheels env switch
wheels environment
wheels console
wheels runner
wheels server
wheels server start
wheels server stop
wheels server restart
wheels server status
wheels server log
wheels server open
wheels plugins
wheels plugins list
wheels plugins install
wheels plugins remove
wheels analyze
wheels analyze code
wheels analyze performance
wheels analyze security
wheels security
wheels security scan
wheels optimize
wheels optimize performance
wheels docs
wheels docs generate
wheels docs serve
wheels ci init
wheels docker init
wheels docker deploy
wheels deploy
wheels deploy audit
wheels deploy exec
wheels deploy hooks
wheels deploy init
wheels deploy lock
wheels deploy logs
wheels deploy proxy
wheels deploy push
wheels deploy rollback
wheels deploy secrets
wheels deploy setup
wheels deploy status
wheels deploy stop
Configuration Management
Creating Commands
Service Architecture
Migrations Guide
Testing Guide
Object Relational Mapping
Creating Records
Reading Records
Updating Records
Deleting Records
Column Statistics
Dynamic Finders
Getting Paginated Data
Associations
Nested Properties
Object Validation
Object Callbacks
Calculated Properties
Transactions
Dirty Records
Soft Delete
Automatic Time Stamps
Using Multiple Data Sources
docs generate (Coming Soon)
This command may not work as expected. A complete and stable version is coming soon.
Generates documentation for your Wheels application from code comments and annotations.
Usage
wheels docs generate [--output=<dir>] [--format=<format>] [--template=<template>] [--include=<components>] [--serve] [--verbose]
Parameters
--output
- (Optional) Output directory for docs. Default:docs/api
--format
- (Optional) Documentation format:html
,json
,markdown
. Default:html
--template
- (Optional) Documentation template to use:default
,bootstrap
,minimal
. Default:default
--include
- (Optional) Components to include:models
,controllers
,views
,services
. Default:models,controllers
--serve
- (Optional) Start local server after generation--verbose
- (Optional) Verbose output
Description
The docs generate
command automatically creates comprehensive documentation from your Wheels application by parsing:
- JavaDoc-style comments in CFCs
- Model relationships and validations
- Controller actions and routes
- Configuration files
- Database schema
- API endpoints
Examples
Generate complete documentation
wheels docs generate
Generate markdown docs
wheels docs generate --format=markdown
Generate with Bootstrap template
wheels docs generate --template=bootstrap
Generate and serve immediately
wheels docs generate --serve
Generate specific components with verbose output
wheels docs generate --include=models,controllers,services --verbose
Custom output directory
wheels docs generate --output=public/api-docs --format=html
Documentation Sources
Model Documentation
/**
* User model for authentication and authorization
*
* @author John Doe
* @since 1.0.0
*/
component extends="Model" {
/**
* Initialize user relationships and validations
* @hint Sets up the user model configuration
*/
function config() {
// Relationships
hasMany("orders");
belongsTo("role");
// Validations
validatesPresenceOf("email,firstName,lastName");
validatesUniquenessOf("email");
}
/**
* Find active users with recent activity
*
* @param days Number of days to look back
* @return query Active users
*/
public query function findActive(numeric days=30) {
return findAll(
where="lastLoginAt >= :date",
params={date: dateAdd("d", -arguments.days, now())}
);
}
}
Controller Documentation
/**
* Handles user management operations
*
* @displayname User Controller
* @namespace /users
*/
component extends="Controller" {
/**
* Display paginated list of users
*
* @hint GET /users
* @access public
* @return void
*/
function index() {
param name="params.page" default="1";
users = model("user").findAll(
page=params.page,
perPage=20,
order="createdAt DESC"
);
}
}
Generated Output
HTML Format
/docs/generated/
├── index.html
├── assets/
│ ├── css/
│ └── js/
├── models/
│ ├── index.html
│ └── user.html
├── controllers/
│ ├── index.html
│ └── users.html
├── api/
│ └── endpoints.html
└── database/
└── schema.html
Documentation includes:
- Overview: Application structure and architecture
- Models: Properties, methods, relationships, validations
- Controllers: Actions, filters, routes
- API Reference: Endpoints, parameters, responses
- Database Schema: Tables, columns, indexes
- Configuration: Settings and environment variables
Output Example
Generating documentation...
========================
Scanning source files... ✓
✓ Found 15 models
✓ Found 12 controllers
✓ Found 45 routes
✓ Found 8 API endpoints
Processing documentation...
✓ Extracting comments
✓ Building relationships
✓ Generating diagrams
✓ Creating index
Writing documentation...
✓ HTML files generated
✓ Assets copied
✓ Search index created
Documentation generated successfully!
- Output: /docs/generated/
- Files: 82
- Size: 2.4 MB
View documentation:
- Local: file:///path/to/docs/generated/index.html
- Serve: wheels docs serve
Documentation Features
Auto-generated Content
- Class hierarchies and inheritance
- Method signatures and parameters
- Property types and defaults
- Relationship diagrams
- Route mappings
- Database ERD
Search Functionality
// Built-in search in HTML docs
{
"searchable": true,
"index": "lunr",
"fields": ["title", "content", "tags"]
}
Custom Themes
Configure in /config/docs-theme.json
:
{
"theme": "custom",
"colors": {
"primary": "#007bff",
"secondary": "#6c757d"
},
"logo": "/assets/logo.png",
"favicon": "/assets/favicon.ico",
"customCSS": "/assets/custom.css"
}
Integration
CI/CD Documentation
# Generate docs on every commit
- name: Generate Docs
run: |
wheels docs generate --format=html
wheels docs generate --format=markdown --output=wiki/
Git Hooks
#!/bin/bash
# pre-commit hook
wheels docs generate --include=api --format=json
git add docs/api/openapi.json
Notes
- Documentation is generated from code comments
- Use consistent JavaDoc format for best results
- Private methods are excluded by default
- Images and diagrams are auto-generated
- Supports custom templates and themes
- Usage
- Parameters
- Examples
- Generate complete documentation
- Generate markdown docs
- Generate with Bootstrap template
- Generate and serve immediately
- Generate specific components with verbose output
- Custom output directory
- Documentation Sources
- Model Documentation
- Controller Documentation
- Generated Output
- HTML Format
- Documentation includes:
- Output Example
- Documentation Features
- Auto-generated Content
- Search Functionality
- Custom Themes
- Integration
- CI/CD Documentation
- Git Hooks
- Notes