1.0.2 • Published 6 months ago

headkit-cli v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

HeadKit CLI

A command-line tool for setting up HeadKit branding, including Tailwind configuration and brand assets.

Features

  1. Tailwind Color Configuration

    • Updates primary and secondary brand colors in your Tailwind config
    • Preserves existing configuration structure
    • Handles both new and existing color definitions
  2. Brand Assets

    • Downloads logo and icon files from HeadKit
    • Saves files as logo.<ext> and icon.<ext> in the specified directory
    • Preserves original file extensions
    • Prevents overwriting existing files

Installation

Using npx (Recommended)

npx headkit-cli@latest setup-branding --token=your-token

Usage

Required: API Token

You need a HeadKit API token to use this CLI. Get your token from the HeadKit dashboard.

Basic Command

npx headkit-cli@latest setup-branding --token=your-token

All Options

npx headkit-cli@latest setup-branding \
  --token=your-token \
  --path=./path/to/tailwind.config.ts \
  --assets-dir=./public/brand

Options

  • --token, -t (Required): Your HeadKit API token
  • --path, -p (Optional): Path to your Tailwind config file (default: ./tailwind.config.ts)
  • --assets-dir (Optional): Directory to save brand assets (default: ./public/brand)

Error Cases

The CLI will show clear error messages for:

  • Invalid or missing API token
  • Tailwind config file not found
  • Colors section not found in Tailwind config
  • Brand asset files already exist
  • Network or API errors

License

MIT © HeadKit. See LICENSE for details.