New to Claude Skills? Learn how to install them →

Khkuds on GitHub

Krita CLI Harness

Free

Manage Krita projects and layers from the command line.

by hkuds46.9k stars on hkuds/cli-anything
2 views
Updated Aug 3, 2026
Get this skill

Free · Opens the source repo

What Krita CLI Harness does

The Krita CLI Harness provides a command-line interface for managing projects, layers, and filters within the Krita digital painting application. This tool is particularly useful for artists and developers looking to automate their workflows, perform batch processing, or operate Krita without relying on a graphical user interface. By leveraging the command line, users can streamline their creative processes and integrate Krita into larger automated systems.

With the CLI, users can create and manage projects, add or modify layers, apply filters, and export images in various formats. The commands allow for detailed control over project settings, layer properties, and canvas operations, making it easier to manipulate digital artwork programmatically. For example, users can create a new project, add layers of different types, and apply effects like blur or sharpen—all from the command line.

The CLI also supports JSON output for machine-readable responses, which can be beneficial for integration with other tools or scripts. This feature allows users to retrieve information about their projects and layers in a structured format, facilitating further automation or analysis. The ability to export images in multiple formats ensures that users can easily share their work or integrate it into other workflows.

Overall, the Krita CLI Harness is an essential tool for anyone looking to enhance their productivity in Krita, particularly those who prefer command-line operations or need to automate repetitive tasks.

When to use it

Use this tool when you need to automate tasks in Krita, such as creating multiple projects or applying effects to layers without opening the application.

When not to use it

This tool is not suitable for users who prefer a graphical interface or for tasks that require complex visual interactions that cannot be easily scripted.

What you can build with it

Batch Processing Images

Automate the application of effects or filters to multiple images in a single command, saving time on repetitive tasks.

Project Setup Automation

Quickly create and configure new projects with predefined settings and layers, streamlining the initial setup process.

Integrate with Other Tools

Use the JSON output feature to integrate Krita commands into larger scripts or workflows, enhancing overall productivity.

How to install Krita CLI Harness

View source

1. Install with the skills CLI

npx skills add hkuds/cli-anything/skills --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by hkuds

cli-anything-krita

CLI harness for Krita, the professional open-source digital painting application.

Prerequisites

  • Krita installed on the system
  • Python 3.10+

Install the CLI:

cd krita/agent-harness && pip install -e .

Command Reference

Project Management

cli-anything-krita project new -n "My Art" -w 2048 -h 2048 -o project.json
cli-anything-krita project open project.json
cli-anything-krita --project project.json project save
cli-anything-krita --project project.json project info

Layer Management

cli-anything-krita -p project.json layer add "Sketch" -t paintlayer
cli-anything-krita -p project.json layer add "Colors" --opacity 200
cli-anything-krita -p project.json layer add "Group" -t grouplayer
cli-anything-krita -p project.json layer remove "Sketch"
cli-anything-krita -p project.json layer list
cli-anything-krita -p project.json layer set "Colors" opacity 180
cli-anything-krita -p project.json layer set "Colors" visible false
cli-anything-krita -p project.json layer set "Colors" blending_mode multiply

Layer types: paintlayer, grouplayer, vectorlayer, filterlayer, filllayer, clonelayer, filelayer

Filters

cli-anything-krita -p project.json filter apply blur -l "Background"
cli-anything-krita -p project.json filter apply sharpen
cli-anything-krita -p project.json filter apply levels -c '{"shadows": 10, "highlights": 240}'
cli-anything-krita filter list

Available: blur, sharpen, desaturate, levels, curves, brightness-contrast, hue-saturation, color-balance, unsharp-mask, posterize, threshold

Canvas Operations

cli-anything-krita -p project.json canvas resize -w 4096 -h 4096
cli-anything-krita -p project.json canvas resize --resolution 600
cli-anything-krita -p project.json canvas info

Export

cli-anything-krita -p project.json export render output.png -p png --overwrite
cli-anything-krita -p project.json export render output.jpg -p jpeg
cli-anything-krita -p project.json export render output.psd -p psd
cli-anything-krita -p project.json export animation ./frames/ -p png
cli-anything-krita export presets
cli-anything-krita export formats

Presets: png, png-web, jpeg, jpeg-web, jpeg-low, tiff, tiff-lzw, psd, pdf, svg, webp, gif, bmp

Session (Undo/Redo)

cli-anything-krita session undo
cli-anything-krita session redo
cli-anything-krita session history

Status

cli-anything-krita status

Agent Usage (JSON Mode)

All commands support --json for machine-readable output:

cli-anything-krita --json -p project.json project info
cli-anything-krita --json -p project.json layer list
cli-anything-krita --json status

Example Workflow

# 1. Create project
cli-anything-krita --json project new -n "Illustration" -w 3000 -h 4000 -o art.json

# 2. Set up layer stack
cli-anything-krita --json -p art.json layer add "Background" -t paintlayer
cli-anything-krita --json -p art.json layer add "Sketch" -t paintlayer --opacity 180
cli-anything-krita --json -p art.json layer add "Inking" -t paintlayer
cli-anything-krita --json -p art.json layer add "Colors" -t paintlayer
cli-anything-krita --json -p art.json layer add "Effects" -t paintlayer --opacity 128

# 3. Apply effects
cli-anything-krita --json -p art.json filter apply blur -l "Background"

# 4. Export
cli-anything-krita --json -p art.json export render final.png -p png --overwrite

Frequently asked questions about Krita CLI Harness

Similar skills