Skip to content

Commit 0d763c6

Browse files
committed
more docs
1 parent c65ee95 commit 0d763c6

File tree

2 files changed

+45
-10
lines changed

2 files changed

+45
-10
lines changed

.github/copilot-instructions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@ This is a CommandBox module (v7.10.0) providing CLI commands for ColdBox framewo
4646
- Use standardized print methods: `printInfo()`, `printError()`, `printWarn()`, `printSuccess()`
4747
- Commands support `--force` for overwriting and `--open` for opening generated files
4848

49+
**CLI User Interface Guidelines**:
50+
51+
Creating beautiful CLI interfaces enhances user experience. CommandBox provides rich output formatting capabilities:
52+
53+
- **Print Helpers** - Color text, indentation, lines, boxes: <https://commandbox.ortusbooks.com/task-runners/task-output>
54+
- **Tables** - Display data in formatted tables: <https://commandbox.ortusbooks.com/task-runners/task-output/printing-tables>
55+
- **Columns** - Multi-column output layouts: <https://commandbox.ortusbooks.com/task-runners/task-output/printing-columns>
56+
- **Trees** - Hierarchical tree structures: <https://commandbox.ortusbooks.com/task-runners/task-output/printing-tree>
57+
- **Progress Bars** - Visual progress indicators: <https://commandbox.ortusbooks.com/task-runners/progress-bar>
58+
- **Interactive Jobs** - User prompts, confirmations, selections: <https://commandbox.ortusbooks.com/task-runners/interactive-jobs>
59+
60+
Use these tools to create polished, professional command interfaces that improve usability and provide clear visual feedback.
61+
4962
**Template Management**:
5063
- Templates use token replacement with `replaceNoCase(content, "|token|", value, "all")`
5164
- BoxLang conversion uses `toBoxLangClass()` to transform `component` to `class`

commands/coldbox/ai/info.cfc

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,38 @@ component extends="coldbox-cli.models.BaseAICommand" {
2626
return;
2727
}
2828

29-
// Print info
30-
print.line( "coldbox-cli Version: #info.coldboxCliVersion#" );
31-
print.line( "Language Mode: #info.language#" );
32-
print.line( "Last Sync: #info.lastSync#" );
29+
// Load manifest to get active agent
30+
var manifest = loadManifest( arguments.directory );
31+
var activeAgent = manifest.activeAgent ?: "none";
32+
33+
// Print configuration in a table
34+
print.line();
35+
print.table(
36+
headerNames = [ "Setting", "Value" ],
37+
data = [
38+
[ "coldbox-cli Version", info.coldboxCliVersion ],
39+
[ "Language Mode", info.language ],
40+
[ "Active Agent", activeAgent ],
41+
[ "Last Sync", info.lastSync ]
42+
]
43+
);
3344
print.line();
3445

35-
// Guidelines
46+
// Guidelines (sorted alphabetically)
3647
printInfo( "Guidelines (#info.guidelines.len()#):" );
3748
if ( info.guidelines.len() ) {
38-
info.guidelines.each( function( guideline ){
49+
var sortedGuidelines = info.guidelines.sort( function( a, b ){
50+
return compare( a.name, b.name );
51+
} );
52+
sortedGuidelines.each( function( guideline ){
3953
print.indentedLine( " 🦮 #guideline.name# (from #guideline.source#)" );
4054
} );
4155
} else {
4256
print.indentedLine( " No guidelines installed" );
4357
}
4458
print.line();
4559

46-
// Skills
60+
// Skills (sorted alphabetically within groups)
4761
printInfo( "Skills (#info.skills.len()#):" );
4862
if ( info.skills.len() ) {
4963
// Group by source
@@ -52,14 +66,18 @@ component extends="coldbox-cli.models.BaseAICommand" {
5266

5367
if ( coreSkills.len() ) {
5468
print.indentedCyanLine( " Core:" );
55-
coreSkills.each( function( skill ){
69+
coreSkills.sort( function( a, b ){
70+
return compare( a.name, b.name );
71+
} ).each( function( skill ){
5672
print.indentedLine( " ⭐ #skill.name#" );
5773
} );
5874
}
5975

6076
if ( moduleSkills.len() ) {
6177
print.indentedCyanLine( " Modules:" );
62-
moduleSkills.each( function( skill ){
78+
moduleSkills.sort( function( a, b ){
79+
return compare( a.name, b.name );
80+
} ).each( function( skill ){
6381
print.indentedLine( " • #skill.name# (from #skill.source#)" );
6482
} );
6583
}
@@ -72,7 +90,11 @@ component extends="coldbox-cli.models.BaseAICommand" {
7290
printInfo( "Configured Agents (#info.agents.len()#):" );
7391
if ( info.agents.len() ) {
7492
info.agents.each( function( agent ){
75-
print.indentedLine( " ⊕ #agent#" );
93+
if ( agent == activeAgent ) {
94+
print.indentedGreenLine( " ▶ #agent# (active)" );
95+
} else {
96+
print.indentedLine( " ⊕ #agent#" );
97+
}
7698
} );
7799
} else {
78100
print.indentedLine( " No agents configured" );

0 commit comments

Comments
 (0)