Hugoifier

hugoifier / docs / cli-reference.md
Source Blame History 123 lines
04b8794… lmata 1 # CLI Reference
04b8794… lmata 2
04b8794… lmata 3 All commands are invoked via `python src/cli.py`.
04b8794… lmata 4
04b8794… lmata 5 ## Global Options
04b8794… lmata 6
04b8794… lmata 7 ```
04b8794… lmata 8 python src/cli.py [--backend {anthropic,openai,google}] <command> ...
04b8794… lmata 9 ```
04b8794… lmata 10
04b8794… lmata 11 | Flag | Description |
04b8794… lmata 12 |------|-------------|
04b8794… lmata 13 | `--backend` | Override `HUGOIFIER_BACKEND` env var for this run |
04b8794… lmata 14
04b8794… lmata 15 ---
04b8794… lmata 16
04b8794… lmata 17 ## `complete` — Full Pipeline
04b8794… lmata 18
04b8794… lmata 19 Runs the full pipeline: detect → copy/convert → patch → decapify.
04b8794… lmata 20
04b8794… lmata 21 ```bash
04b8794… lmata 22 python src/cli.py complete <path> [options]
04b8794… lmata 23 ```
04b8794… lmata 24
04b8794… lmata 25 | Argument | Description |
04b8794… lmata 26 |----------|-------------|
04b8794… lmata 27 | `path` | Path to a Hugo theme directory or raw HTML directory |
04b8794… lmata 28 | `--output`, `-o` | Output directory (default: `output/{theme-name}`) |
04b8794… lmata 29 | `--cms-name` | Whitelabel CMS name shown in admin UI |
04b8794… lmata 30 | `--cms-logo` | URL to a logo image for the admin UI |
04b8794… lmata 31 | `--cms-color` | Hex color for the admin top bar (e.g. `#1a1a2e`) |
04b8794… lmata 32
04b8794… lmata 33 **Examples:**
04b8794… lmata 34
04b8794… lmata 35 ```bash
04b8794… lmata 36 # Hugo theme with exampleSite
04b8794… lmata 37 python src/cli.py complete themes/revolve-hugo
04b8794… lmata 38
04b8794… lmata 39 # Custom output path
04b8794… lmata 40 python src/cli.py complete themes/revolve-hugo --output /var/www/mysite
04b8794… lmata 41
04b8794… lmata 42 # With whitelabel CMS
04b8794… lmata 43 python src/cli.py complete themes/revolve-hugo \
04b8794… lmata 44 --cms-name "My Studio" \
04b8794… lmata 45 --cms-color "#0d1117"
04b8794… lmata 46 ```
04b8794… lmata 47
04b8794… lmata 48 ---
04b8794… lmata 49
04b8794… lmata 50 ## `analyze` — Inspect Theme Structure
04b8794… lmata 51
04b8794… lmata 52 Analyzes a theme and reports its layout files, content types, and exampleSite location. For raw HTML, uses AI to suggest partials and Hugo template tags.
04b8794… lmata 53
04b8794… lmata 54 ```bash
04b8794… lmata 55 python src/cli.py analyze <path>
04b8794… lmata 56 ```
04b8794… lmata 57
04b8794… lmata 58 ---
04b8794… lmata 59
04b8794… lmata 60 ## `hugoify` — HTML → Hugo Conversion
04b8794… lmata 61
04b8794… lmata 62 Converts a raw HTML file or directory to Hugo layout files. For an existing Hugo theme, validates its structure.
04b8794… lmata 63
04b8794… lmata 64 ```bash
04b8794… lmata 65 python src/cli.py hugoify <path>
04b8794… lmata 66 ```
04b8794… lmata 67
04b8794… lmata 68 ---
04b8794… lmata 69
04b8794… lmata 70 ## `decapify` — Add Decap CMS
04b8794… lmata 71
04b8794… lmata 72 Adds Decap CMS to an already-assembled Hugo site. Introspects `content/` to auto-generate `static/admin/config.yml`.
04b8794… lmata 73
04b8794… lmata 74 ```bash
04b8794… lmata 75 python src/cli.py decapify <path> [options]
04b8794… lmata 76 ```
04b8794… lmata 77
04b8794… lmata 78 | Argument | Description |
04b8794… lmata 79 |----------|-------------|
04b8794… lmata 80 | `path` | Path to an assembled Hugo site (contains `hugo.toml`, `content/`, `themes/`) |
04b8794… lmata 81 | `--cms-name` | Whitelabel CMS name |
04b8794… lmata 82 | `--cms-logo` | Logo URL |
04b8794… lmata 83 | `--cms-color` | Top-bar hex color |
04b8794… lmata 84
04b8794… lmata 85 ---
04b8794… lmata 86
04b8794… lmata 87 ## `translate` — Translate Content
04b8794… lmata 88
04b8794… lmata 89 Translates a content file to another language using the configured AI backend.
04b8794… lmata 90
04b8794… lmata 91 ```bash
04b8794… lmata 92 python src/cli.py translate <path> [--target-language LANGUAGE]
04b8794… lmata 93 ```
04b8794… lmata 94
04b8794… lmata 95 | Argument | Default | Description |
04b8794… lmata 96 |----------|---------|-------------|
04b8794… lmata 97 | `path` | — | Path to the content file |
04b8794… lmata 98 | `--target-language` | `Spanish` | Language to translate into |
04b8794… lmata 99
04b8794… lmata 100 ---
04b8794… lmata 101
04b8794… lmata 102 ## `deploy` — Deploy to Cloudflare _(stub)_
04b8794… lmata 103
04b8794… lmata 104 ```bash
04b8794… lmata 105 python src/cli.py deploy <path> <zone>
04b8794… lmata 106 ```
04b8794… lmata 107
04b8794… lmata 108 ---
04b8794… lmata 109
04b8794… lmata 110 ## `cloudflare` — Configure Cloudflare _(stub)_
04b8794… lmata 111
04b8794… lmata 112 ```bash
04b8794… lmata 113 python src/cli.py cloudflare <path> <zone>
04b8794… lmata 114 ```
04b8794… lmata 115
04b8794… lmata 116 ---
04b8794… lmata 117
04b8794… lmata 118 ## Exit Codes
04b8794… lmata 119
04b8794… lmata 120 | Code | Meaning |
04b8794… lmata 121 |------|---------|
04b8794… lmata 122 | `0` | Success |
04b8794… lmata 123 | `1` | Error (bad input path, missing API key, etc.) — message printed to stderr |

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button