CLI Reference
Complete reference for every ink command -- project setup, content management, components, and builds.
Overview
The ink package provides the ink command (when installed globally) or can be invoked with npx ink. All commands follow the pattern:
npx ink <command> [arguments] [options]
Project Commands
ink init [dir]
Interactively scaffold a new Ink project.
npx ink init my-site
The wizard prompts for site name, URL, brand colors, CSS framework (Tailwind or plain CSS custom properties), and which content types to include. If dir is omitted, the project is created in the current directory.
ink serve
Start the Eleventy development server with live reload.
npx ink serve
Runs at http://localhost:8080 by default. File changes trigger an automatic browser refresh.
ink build
Build the site for production. Output goes to _site/.
npx ink build
ink --version
Print the currently installed ink version.
npx ink --version
ink help
Display a summary of all available commands.
npx ink help
Content Type Commands
ink add <type>
Add a content type to your project. This creates the content directory, layout, includes, and updates contentTypes.json.
npx ink add blog
npx ink add services
npx ink add docs
Available types: blog, docs, features, faq, team, services, portfolio, service-areas
ink add <type> "Title"
Create a new content entry for an existing content type.
npx ink add blog "My First Post"
npx ink add services "Web Design"
npx ink add team "Jane Smith"
This generates a Markdown file with pre-filled frontmatter in the correct directory.
ink add custom
Launch an interactive wizard to define a completely custom content type.
npx ink add custom
You'll be prompted for the type name, directory, tag name, sort field, and layout. The CLI generates all necessary files and registers the type in contentTypes.json.
ink generate <type> [count]
Generate sample content entries for a given type. Defaults to 3 entries if count is omitted.
npx ink generate blog 5
npx ink generate services
npx ink generate faq 10
ink list [type]
List all content entries. If type is provided, only entries of that type are shown.
npx ink list # List all content
npx ink list blog # List only blog posts
npx ink list services # List only services
ink remove <type>
Remove an entire content type from the project. This deletes the directory, layout, and unregisters it from contentTypes.json.
npx ink remove faq
ink delete <type> <slug>
Delete a single content entry by its slug.
npx ink delete blog my-first-post
npx ink delete services web-design
Component Commands
ink add component [name]
Install a pre-built UI component. If name is omitted, the CLI lists all available components so you can choose interactively.
npx ink add component # List all available components
npx ink add component contact-form # Install the contact form
npx ink add component pricing-table # Install the pricing table
Available components: contact-form, feature-grid, testimonials, pricing-table, stats-counter, image-gallery, tabs, logo-cloud, newsletter-signup, timeline, modal, social-share
Each component installs a Nunjucks macro, associated CSS, and any required JavaScript.
ink remove component <name>
Uninstall a previously installed component.
npx ink remove component contact-form
Icon Commands
ink add icons
Install the Lucide icon system. This adds an icon partial and a helper macro for rendering SVG icons inline.
npx ink add icons
After installation, use icons in your templates:
{{ icon("mail") }}
{{ icon("phone", { size: 24, class: "text-primary" }) }}
Quick Reference Table
| Command | Description |
|---|---|
ink init [dir] |
Create a new project |
ink serve |
Start dev server |
ink build |
Build for production |
ink add <type> |
Add a content type |
ink add <type> "Title" |
Create a content entry |
ink add custom |
Create a custom content type |
ink add component [name] |
Install a UI component |
ink add icons |
Add Lucide icon system |
ink generate <type> [count] |
Generate sample content |
ink list [type] |
List content entries |
ink remove <type> |
Remove a content type |
ink remove component <name> |
Uninstall a component |
ink delete <type> <slug> |
Delete a single entry |
ink --version |
Show version |
ink help |
Show help |