Hugoifier

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

Keyboard Shortcuts

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