CLI Reference
The IntentCSS CLI provides commands for generating and understanding UI styles directly from natural language prompts.
Overview
IntentCSS exposes a simple command-line interface built around a small set of commands.
View all available commands:
intentcss --help
intentcss --help
Output:
Usage: intentcss [options] [command]
Commands:
generate
explain
help
Usage: intentcss [options] [command]
Commands:
generate
explain
help
Global Options
Version
Display the current version.
intentcss --version
intentcss --version
Output:
1.0.1
1.0.1
Help
Display CLI help.
intentcss --help
intentcss --help
Display help for a specific command:
intentcss generate --help
intentcss generate --help
Generate Command
Generate Tailwind CSS classes or CSS from a prompt.
Syntax:
intentcss generate --prompt "<prompt>"
intentcss generate --prompt "<prompt>"
Example:
intentcss generate --prompt "blue button"
intentcss generate --prompt "blue button"
Output:
rounded-lg bg-blue-600 px-4 py-2 text-white hover:bg-blue-700
rounded-lg bg-blue-600 px-4 py-2 text-white hover:bg-blue-700
Prompt Option
Specify the prompt to generate from.
intentcss generate --prompt "glass login form"
intentcss generate --prompt "glass login form"
Required:
Yes
Yes
Target Option
Specify the output target.
Available targets:
- tailwind
- css
Example:
intentcss generate --prompt "red button" --target css
intentcss generate --prompt "red button" --target css
Output:
.button {
background-color: #dc2626;
}
.button {
background-color: #dc2626;
}
Explain Command
Explain generated Tailwind classes or CSS.
Syntax:
intentcss explain "<classes>"
intentcss explain "<classes>"
Example:
intentcss explain "flex items-center justify-between"
intentcss explain "flex items-center justify-between"
Example output:
flex:
Enables flexbox layout
items-center:
Centers items vertically
justify-between:
Distributes items evenly
flex:
Enables flexbox layout
items-center:
Centers items vertically
justify-between:
Distributes items evenly
The explain command is currently under active development and may expand in future releases.
Examples
Button
intentcss generate --prompt "large red button"
intentcss generate --prompt "large red button"
Form
intentcss generate --prompt "responsive centered login form"
intentcss generate --prompt "responsive centered login form"
Modal
intentcss generate --prompt "glass centered modal"
intentcss generate --prompt "glass centered modal"
Sidebar
intentcss generate --prompt "dark compact sidebar"
intentcss generate --prompt "dark compact sidebar"
Hero
intentcss generate --prompt "glass rounded hero"
intentcss generate --prompt "glass rounded hero"
Typo Correction
IntentCSS automatically corrects common mistakes.
Input:
intentcss generate --prompt "purpl buton"
intentcss generate --prompt "purpl buton"
Output:
Corrected: purple button
rounded-lg bg-purple-600 px-4 py-2 text-white hover:bg-purple-700
Corrected: purple button
rounded-lg bg-purple-600 px-4 py-2 text-white hover:bg-purple-700
Confidence Levels
IntentCSS evaluates prompt confidence before generating output.
High Confidence
Generation proceeds immediately.
rounded-lg bg-blue-600 px-4 py-2 text-white hover:bg-blue-700
rounded-lg bg-blue-600 px-4 py-2 text-white hover:bg-blue-700
Medium Confidence
IntentCSS displays confidence information.
Detected intent: button
Confidence: 70%
Detected intent: button
Confidence: 70%
Low Confidence
IntentCSS refuses generation.
Could not confidently understand that prompt.
Try words like: button, card, navbar, blue, responsive.
Could not confidently understand that prompt.
Try words like: button, card, navbar, blue, responsive.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Invalid command or prompt |
| 1 | Low-confidence generation failure |
Common Workflows
Generate Tailwind
intentcss generate --prompt "green button"
intentcss generate --prompt "green button"
Generate CSS
intentcss generate --prompt "green button" --target css
intentcss generate --prompt "green button" --target css
Check Version
intentcss --version
intentcss --version
Display Help
intentcss --help
intentcss --help
Next Steps
Continue with:
- Generate Command
- Explain Command
- Architecture
- Testing