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:

BASH
intentcss --help

Output:

TEXT
Usage: intentcss [options] [command]

Commands:
  generate
  explain
  help

Global Options

Version

Display the current version.

BASH
intentcss --version

Output:

TEXT
1.0.1

Help

Display CLI help.

BASH
intentcss --help

Display help for a specific command:

BASH
intentcss generate --help

Generate Command

Generate Tailwind CSS classes or CSS from a prompt.

Syntax:

BASH
intentcss generate --prompt "<prompt>"

Example:

BASH
intentcss generate --prompt "blue button"

Output:

TEXT
rounded-lg bg-blue-600 px-4 py-2 text-white hover:bg-blue-700

Prompt Option

Specify the prompt to generate from.

BASH
intentcss generate --prompt "glass login form"

Required:

TEXT
Yes

Target Option

Specify the output target.

Available targets:

  • tailwind
  • css

Example:

BASH
intentcss generate --prompt "red button" --target css

Output:

CSS
.button {
  background-color: #dc2626;
}

Explain Command

Explain generated Tailwind classes or CSS.

Syntax:

BASH
intentcss explain "<classes>"

Example:

BASH
intentcss explain "flex items-center justify-between"

Example output:

TEXT
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

BASH
intentcss generate --prompt "large red button"

Form

BASH
intentcss generate --prompt "responsive centered login form"

Modal

BASH
intentcss generate --prompt "glass centered modal"

Sidebar

BASH
intentcss generate --prompt "dark compact sidebar"

Hero

BASH
intentcss generate --prompt "glass rounded hero"

Typo Correction

IntentCSS automatically corrects common mistakes.

Input:

BASH
intentcss generate --prompt "purpl buton"

Output:

TEXT
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.

TEXT
rounded-lg bg-blue-600 px-4 py-2 text-white hover:bg-blue-700

Medium Confidence

IntentCSS displays confidence information.

TEXT
Detected intent: button
Confidence: 70%

Low Confidence

IntentCSS refuses generation.

TEXT
Could not confidently understand that prompt.
Try words like: button, card, navbar, blue, responsive.

Exit Codes

CodeMeaning
0Success
1Invalid command or prompt
1Low-confidence generation failure

Common Workflows

Generate Tailwind

BASH
intentcss generate --prompt "green button"

Generate CSS

BASH
intentcss generate --prompt "green button" --target css

Check Version

BASH
intentcss --version

Display Help

BASH
intentcss --help

Next Steps

Continue with:

  • Generate Command
  • Explain Command
  • Architecture
  • Testing