CLI Reference
FigRecipe provides a comprehensive command-line interface for working with figures.
Usage
figrecipe [COMMAND] [OPTIONS]
Run figrecipe --help to see all available commands.
Figure Creation
plot
Create a figure from a declarative YAML specification.
figrecipe plot spec.yaml -o output.png
# Options:
# -o, --output PATH Output file path
# --dpi INTEGER DPI for raster output (default: 300)
# --no-recipe Don't save recipe file
reproduce
Reproduce a figure from its saved recipe.
figrecipe reproduce recipe.yaml -o reproduced.png
# Options:
# -o, --output PATH Output file path
# --format TEXT Output format: png, pdf, svg
# --dpi INTEGER DPI for raster output
compose
Compose multiple figures into a single multi-panel figure.
figrecipe compose panel_a.png panel_b.png -o figure.png
# Options:
# -o, --output PATH Output file path
# --layout TEXT Layout: horizontal, vertical, grid
# --gap FLOAT Gap between panels in mm
# --labels/--no-labels Add panel labels (A, B, C...)
# --label-style TEXT uppercase, lowercase, numeric
gui
Launch the interactive GUI editor for figure styling.
figrecipe gui recipe.yaml
# Options:
# --port INTEGER Server port (default: 5050)
# --host TEXT Host address
# --no-browser Don't open browser automatically
# --desktop Launch as native desktop window
Image Processing
convert
Convert between image formats.
figrecipe convert input.png output.pdf
crop
Crop whitespace from figure images.
figrecipe crop figure.png -o cropped.png
# Options:
# -o, --output PATH Output file path
# --margin FLOAT Margin to keep in mm (default: 1.0)
# --overwrite Overwrite input file
diff
Compare two images and show statistics.
figrecipe diff original.png reproduced.png
# Output: MSE, SSIM, and other comparison metrics
hitmap
Generate a hitmap visualization showing differences between images.
figrecipe hitmap original.png reproduced.png -o diff.png
# Options:
# -o, --output PATH Output file path
Data & Validation
extract
Extract plotted data from a recipe file.
figrecipe extract recipe.yaml
# Output: JSON with {call_id: {x: [...], y: [...], ...}}
validate
Validate that a recipe reproduces its original figure.
figrecipe validate recipe.yaml
# Options:
# --threshold FLOAT MSE threshold (default: 100)
info
Show information about a recipe file.
figrecipe info recipe.yaml
# Options:
# -v, --verbose Show detailed call information
Diagram
diagram
Create diagrams from YAML specifications.
figrecipe diagram create spec.yaml -o diagram.png
# Subcommands:
# create Create diagram from spec
# compile Compile to Mermaid/Graphviz format
# render Render to image file
# presets List available presets
Style & Appearance
style
Manage figure styles.
figrecipe style list # List available presets
figrecipe style show PRESET # Show preset details
figrecipe style apply recipe.yaml # Apply style to recipe
fonts
Check font availability.
figrecipe fonts check "Arial" # Check if font is available
figrecipe fonts list # List available fonts
Integration
mcp
MCP (Model Context Protocol) server commands for AI agent integration.
figrecipe mcp start # Start MCP server
figrecipe mcp list-tools # List available MCP tools
figrecipe mcp list-tools -v # Verbose tool listing
figrecipe mcp install --claude-code # Install to Claude Code
list-python-apis
List available Python API functions.
figrecipe list-python-apis
# Options:
# -v, --verbose Show detailed function signatures
Utility
completion
Generate shell completion scripts.
figrecipe completion bash > ~/.figrecipe-complete.bash
figrecipe completion zsh > ~/.figrecipe-complete.zsh
version
Show version information.
figrecipe version