AI CLI commands
Overview#
The commands in this section allow you to manage AI-related tools that enhance your development experience with Uniform. This includes:
Project asset | Command |
---|---|
AI Rules | ai rules install, ai rules list |
MCP Server | ai mcp install |
AI Rules commands#
AI rules provide LLM tools with up-to-date knowledge about Uniform concepts, SDK usage, and best practices.
Install AI rules#
Installs and configures AI rules for your project. This command supports both Cursor and Claude Code.
Options#
Option | Description | Default |
---|---|---|
--agent <type> , -a | Specify agent type (cursor, claude, other) | Auto-detected |
--directory <path> , -d | Custom installation directory | Auto-detected based on AI tool |
--help | Show help information |
Examples#
Basic installation:
Install for specific agent:
Install to custom directory:
What it does#
- Detects your AI tool - Automatically identifies whether you're using Cursor, Claude Code, or other MCP-compatible tools
- Downloads latest rules - Fetches the most current AI rules from the Uniform AI rules repository
- Configures placement - Places rules in the appropriate directory (
.cursor
,.claude
, etc.) - Validates setup - Ensures rules are properly configured and accessible
Rules included#
The installation includes essential rules for:
- Core Uniform concepts (
uniform.mdc
) - Fundamental principles and architecture - SDK usage (
uniform-sdk.mdc
) - Uniform SDK capabilities and patterns - Framework-specific guidance:
- Next.js Page Router (
uniform-next-page-router.mdc
) - Next.js App Router (
uniform-next-app-router.mdc
)
- Next.js Page Router (
- Optional personal preferences - Customizable defaults and coding standards
Usage with AI tools#
Cursor: After installation, the rules will be available in your .cursor
folder. Add them to your chat context when working with Uniform projects.
Claude Code: The rules will be placed in the appropriate location for Claude Code to automatically detect and use them.
List available rules#
Lists all available Uniform AI rules that can be installed.
Examples#
List all available rules:
This command displays:
- Rule name - The filename and identifier
- Description - What the rule covers
- Status - Whether it's a core rule, framework-specific, or optional
MCP Server commands#
The Model Context Protocol (MCP) Server allows AI tools to directly interact with Uniform APIs to create and manage components, content types, and patterns.
Install MCP server#
Installs and configures the Uniform MCP Server for your project.
Options#
Option | Description | Default |
---|---|---|
--agent <type> , -a | Specify agent type (cursor, claude, other) | Auto-detected |
--directory <path> , -d | Custom installation directory | Auto-detected based on agent |
--project <id> , -p | Project ID to use (skips project selection) | Interactive selection |
--team <id> , -t | Team ID to use (skips team selection) | Interactive selection |
--apiKey <key> | Uniform API key with write access (skips API key generation) | Auto-generated |
--apiHost <host> | Uniform host | https://uniform.app |
--aiApiHost <host> | Uniform AI API host | https://ai.uniform.global |
--help | Show help information |
Examples#
Interactive installation (recommended):
Non-interactive installation:
Install for specific agent:
Custom directory:
What it does#
- Interactive/Non-interactive modes - Supports both guided setup and automated installation
- Agent detection - Automatically identifies your AI tool (Cursor, Claude, other)
- Authentication setup - Generates API keys or uses provided ones
- Configuration generation - Creates appropriate config files (
.mcp.json
for Claude,mcp.json
for others) - Directory management - Creates necessary directories and preserves existing MCP servers
Prerequisites#
- Uniform account and access to a team/project
- AI Credits in your Uniform team (required for create and search operations)
info
The command can run in interactive mode (walks you through team/project selection and API key generation) or non-interactive mode (requires --project
and --apiKey
parameters).
AI Credits Required
Create and search operations performed through the MCP Server require AI Credits in your Uniform Team. If you have already used all your existing credits, please check with your Account Representative from Uniform for a top-up.
Configuration#
The installation creates a configuration file with the following naming convention:
- Claude Desktop/Code:
.mcp.json
(hidden file) - Cursor and others:
mcp.json
The configuration file structure:
info
If you have existing MCP servers configured, the installer will preserve them and only add/update the Uniform server configuration.
Troubleshooting#
AI Rules installation issues#
Rules not appearing in AI tool:
- Ensure the rules are in the correct directory for your AI tool
- Restart your AI tool after installation
- Check file permissions and directory structure
Installation fails:
- Verify you have internet connectivity to download rules
- Check write permissions in the target directory
- Try specifying a custom directory with
--directory
MCP Server issues#
Interactive mode issues:
- Verify you have access to at least one team and project
- Check your network connectivity
Non-interactive mode fails:
- Verify the project ID exists and you have access
- Ensure the API key has appropriate permissions
MCP Server not detected in AI tool:
- Restart your AI tool after installation
- For Cursor: Check Settings > MCP & Integrations
- For Claude: Verify the
.mcp.json
file exists in the correct location - Check the configuration file format is valid JSON
AI Credits exhausted:
- Contact your Uniform Account Representative for credit top-up
- Monitor your team's AI credit usage in Uniform dashboard
For additional help, see the CLI troubleshooting guide.