Base command for documentation generation and management.
Note: This command is currently broken. Use subcommands directly.
Synopsis
wheels docs [subcommand] [options]
Description
The wheels docs command provides documentation tools for Wheels applications. It generates API documentation, manages inline documentation, and serves documentation locally. While the base command is currently broken, the subcommands generate and serve work correctly.
Subcommands
Command
Description
Status
generate
Generate documentation
✓ Working
serve
Serve documentation locally
✓ Working
Options
Option
Description
--help
Show help information
--version
Show version information
Current Status
The base wheels docs command is temporarily unavailable due to a known issue. Please use the subcommands directly:
wheels docs generate - Generate documentation
wheels docs serve - Serve documentation
Expected Behavior (When Fixed)
When operational, running wheels docs without subcommands would:
/**
* User model for authentication and profile management
*
* @author John Doe
* @since 1.0.0
*/
component extends="Model" {
/**
* Authenticate user with credentials
*
* @username The user's username or email
* @password The user's password
* @return User object if authenticated, false otherwise
*
* @example
* user = model("User").authenticate("john@example.com", "secret");
* if (isObject(user)) {
* // Login successful
* }
*/
public any function authenticate(required string username, required string password) {
// Implementation
}
}
Inline Documentation
<!---
@doc
This view displays the user profile page
@requires User object in 'user' variable
@layout layouts/main
--->
/**
* 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"
);
}
}
🌐 Starting documentation server...
Server started successfully!
- URL: http://localhost:35729
- Root: /docs/api
- Auto-open: enabled
Press Ctrl+C to stop the server
If documentation is not found:
Documentation directory not found: /docs/api
💡 Tip: Run 'wheels docs generate' first to create documentation
Features
File Watching
When --watch is enabled, the server monitors documentation files for changes and can trigger regeneration.
Browser Integration
With --open=true (default), the server automatically opens your default browser to the documentation URL.
Development Workflow
Typical usage:
# Step 1: Generate documentation
wheels docs generate
# Step 2: Serve documentation
wheels docs serve
# Step 3: Make changes and regenerate
wheels docs generate
# Browser will show updated docs
Custom workflow:
# Generate and serve from custom location
wheels docs generate --output=public/docs
wheels docs serve --root=public/docs --port=8080
Troubleshooting
Port already in use
# Use a different port
wheels docs serve --port=8081
Documentation not found
# Make sure to generate docs first
wheels docs generate
wheels docs serve
Browser doesn't open
# Manually navigate to the URL shown
# Or check your default browser settings
Notes
Server is intended for development/review only
For production, deploy static files to web server
Large documentation sets may take time to generate