Garden Layout Planner
Design your garden with smart planning tools for companion planting, spacing, and sun requirements.
Quick Start
Add a garden bed to your layout
garden_layout.py add-bed "<bed_name>" --width <feet> --length <feet> --sun "full/partial/shade"
Add plants to a bed
garden_layout.py add-plant "<bed_name>" "<plant>" --row <row> --col <col>
Get companion planting suggestions
garden_layout.py companions "<plant>"
Get spacing requirements
garden_layout.py spacing "<plant>"
Show complete garden layout
garden_layout.py layout
Export layout to markdown
garden_layout.py export "<output_file>"
Usage Patterns
For new garden setup
# Define your beds
garden_layout.py add-bed "Bed 1" --width 4 --length 8 --sun "full"
garden_layout.py add-bed "Bed 2" --width 3 --length 6 --sun "partial"
# Check companion planting
garden_layout.py companions "tomato" # Best with basil, carrots, onions
garden_layout.py companions "cucumber" # Best with beans, corn, peas
# Add plants with proper spacing
garden_layout.py add-plant "Bed 1" "tomato" --row 1 --col 1
garden_layout.py add-plant "Bed 1" "basil" --row 1 --col 3 # Companion!
garden_layout.py add-plant "Bed 2" "beans" --row 1 --col 1
garden_layout.py add-plant "Bed 2" "corn" --row 2 --col 1 # Companion!
# Review your layout
garden_layout.py layout
For companion planting optimization
# Check what grows well together
garden_layout.py companions "carrots" # Good with tomatoes, onions, lettuce
garden_layout.py companions "onions" # Good with carrots, tomatoes, beets
# Avoid bad combinations
garden_layout.py incompatible "potatoes" # Avoid with tomatoes, cucumbers
For small space maximization
# Use vertical growing for space efficiency
garden_layout.py add-bed "Trellis" --width 1 --length 6 --sun "full"
garden_layout.py add-plant "Trellis" "cucumber" --row 1 --col 1
garden_layout.py add-plant "Trellis" "peas" --row 2 --col 1
# Intensive planting with succession
garden_layout.py add-bed "Intensive Bed" --width 3 --length 4 --sun "full"
garden_layout.py add-plant "Intensive Bed" "lettuce" --row 1 --col 1
garden_layout.py add-plant "Intensive Bed" "radishes" --row 1 --col 2 # Fast harvest
For crop rotation planning
# Track what you planted each year
garden_layout.py add-season "2026" # Starts fresh layout
garden_layout.py add-plant "Bed 1" "tomatoes" --row 1 --col 1
garden_layout.py add-plant "Bed 2" "beans" --row 1 --col 1
# Next year, change families
garden_layout.py add-season "2027" # New layout
garden_layout.py add-plant "Bed 1" "carrots" --row 1 --col 1 # Different family
garden_layout.py add-plant "Bed 2" "corn" --row 1 --col 1 # Different family
Companion Planting Guide
Best Combinations (Good Together)
| Plant |
Good With |
Why |
| Tomatoes |
Basil, carrots, onions, marigolds |
Basil enhances flavor, carrots repel pests |
| Cucumbers |
Beans, corn, peas, radishes |
Beans fix nitrogen, corn provides support |
| Lettuce |
Carrots, radishes, onions |
Radishes mark rows, carrots break soil |
| Peppers |
Basil, onions, carrots |
Basil repels aphids |
| Beans |
Corn, potatoes, cucumbers |
Nitrogen fixation benefits neighbors |
| Carrots |
Tomatoes, onions, lettuce |
Onions repel carrot fly |
| Corn |
Beans, squash, cucumbers |
Three Sisters method |
| Squash |
Corn, beans, radishes |
Beans repel squash beetles |
Incompatible Plants (Avoid Together)
| Plant |
Avoid With |
Why |
| Tomatoes |
Potatoes, cucumbers, fennel |
Same pests/diseases |
| Beans |
Onions, garlic |
Inhibit growth |
| Carrots |
Dill, parsnips |
Dill attracts carrot fly |
| Cucumbers |
Potatoes, sage |
Potatoes compete for space |
| Onions |
Beans, peas |
Inhibit bean growth |
Spacing Requirements
Small Plants (6-12 inches apart)
- Lettuce: 6-8 inches
- Spinach: 4-6 inches
- Radishes: 2-3 inches
- Onions: 4-6 inches
- Carrots: 2-3 inches
Medium Plants (12-24 inches apart)
- Peppers: 18-24 inches
- Eggplant: 18-24 inches
- Beans (bush): 12-18 inches
- Cabbage: 18-24 inches
Large Plants (24+ inches apart)
- Tomatoes: 24-36 inches
- Squash: 24-48 inches (or trellis)
- Corn: 12-18 inches (in blocks for pollination)
- Potatoes: 12-15 inches
Sun Requirements
Full Sun (6-8+ hours daily)
- Tomatoes, peppers, eggplant, squash, corn, beans, cucumbers
Partial Sun (4-6 hours daily)
- Lettuce, spinach, kale, peas, carrots, beets
Shade (<4 hours daily)
- Some leafy greens, herbs like mint, chives
Examples
Three Sisters Garden (Traditional)
# Classic Native American companion planting
garden_layout.py add-bed "Three Sisters" --width 8 --length 8 --sun "full"
# Plant corn in center (support)
garden_layout.py add-plant "Three Sisters" "corn" --row 4 --col 4
# Plant beans around corn (nitrogen)
garden_layout.py add-plant "Three Sisters" "beans" --row 4 --col 2
garden_layout.py add-plant "Three Sisters" "beans" --row 4 --col 6
# Plant squash at edges (ground cover)
garden_layout.py add-plant "Three Sisters" "squash" --row 1 --col 1
garden_layout.py add-plant "Three Sisters" "squash" --row 1 --col 8
garden_layout.py add-plant "Three Sisters" "squash" --row 8 --col 1
garden_layout.py add-plant "Three Sisters" "squash" --row 8 --col 8
Tomato-Basil Garden
# Simple companion planting
garden_layout.py add-bed "Tomato Patch" --width 4 --length 6 --sun "full"
garden_layout.py add-plant "Tomato Patch" "tomato" --row 1 --col 1
garden_layout.py add-plant "Tomato Patch" "basil" --row 1 --col 3 # Companion!
garden_layout.py add-plant "Tomato Patch" "carrots" --row 2 --col 1 # Under tomatoes
garden_layout.py add-plant "Tomato Patch" "carrots" --row 2 --col 3
Mixed Bed for Small Spaces
# Intensive planting
garden_layout.py add-bed "Small Space" --width 3 --length 4 --sun "partial"
garden_layout.py add-plant "Small Space" "lettuce" --row 1 --col 1
garden_layout.py add-plant "Small Space" "radishes" --row 1 --col 2 # Fast, marks row
garden_layout.py add-plant "Small Space" "lettuce" --row 1 --col 3
garden_layout.py add-plant "Small Space" "spinach" --row 2 --col 1
garden_layout.py add-plant "Small Space" "onions" --row 2 --col 2
garden_layout.py add-plant "Small Space" "spinach" --row 2 --col 3
Search Features
- Find compatible plants for companion planting
- Get spacing requirements for any plant
- Search layouts by plant name
- Filter by sun requirements
Security
Path Validation
The export function validates output paths to prevent malicious writes:
- ✅ Allowed:
~/.openclaw/workspace/, /tmp/, and home directory
- ❌ Blocked: System paths (
/etc/, /usr/, /var/, etc.)
- ❌ Blocked: Sensitive dotfiles (
~/.bashrc, ~/.ssh, etc.)
Data Storage
- Garden layouts stored in:
~/.openclaw/workspace/garden_layout_db.json
- Each bed tracks: dimensions, sun exposure, plants with positions
- Companion database built-in with 50+ plant relationships
- JSON format makes it easy to backup or migrate
Best Practices
- Plan before planting - Use layout planner to visualize before putting seeds in ground
- Use companion planting - Plant compatible species together
- Check spacing - Don't overcrowd, plants need room to grow
- Track sun exposure - Different beds have different sun requirements
- Plan for rotation - Track what you plant where each year
- Export for reference - Keep a backup of your garden plan
Related Skills
- plant-tracker - Track individual plants with care schedules and harvests
- seasonal-planting-guide - What to plant when in your growing zone
Use together for complete garden management!
1---2name: garden-layout-planner3description: Garden design and layout planning for gardeners. Plan your garden with companion planting, spacing, and sun requirements. Use when designing a new garden, planning crop rotation, or optimizing space. Security: file exports restricted to safe directories. Perfect for home gardeners, small farmers, and anyone maximizing their growing space.4---5
6
7# Garden Layout Planner
8
9Design your garden with smart planning tools for companion planting, spacing, and sun requirements.
10
11## Quick Start
12
13### Add a garden bed to your layout
14```bash
15garden_layout.py add-bed "<bed_name>" --width <feet> --length <feet> --sun "full/partial/shade"
16```
17
18### Add plants to a bed
19```bash
20garden_layout.py add-plant "<bed_name>" "<plant>" --row <row> --col <col>
21```
22
23### Get companion planting suggestions
24```bash
25garden_layout.py companions "<plant>"
26```
27
28### Get spacing requirements
29```bash
30garden_layout.py spacing "<plant>"
31```
32
33### Show complete garden layout
34```bash
35garden_layout.py layout
36```
37
38### Export layout to markdown
39```bash
40garden_layout.py export "<output_file>"
41```
42
43## Usage Patterns
44
45### For new garden setup
46```bash
47# Define your beds
48garden_layout.py add-bed "Bed 1" --width 4 --length 8 --sun "full"
49garden_layout.py add-bed "Bed 2" --width 3 --length 6 --sun "partial"
50
51# Check companion planting
52garden_layout.py companions "tomato" # Best with basil, carrots, onions
53garden_layout.py companions "cucumber" # Best with beans, corn, peas
54
55# Add plants with proper spacing
56garden_layout.py add-plant "Bed 1" "tomato" --row 1 --col 1
57garden_layout.py add-plant "Bed 1" "basil" --row 1 --col 3 # Companion!
58garden_layout.py add-plant "Bed 2" "beans" --row 1 --col 1
59garden_layout.py add-plant "Bed 2" "corn" --row 2 --col 1 # Companion!
60
61# Review your layout
62garden_layout.py layout
63```
64
65### For companion planting optimization
66```bash
67# Check what grows well together
68garden_layout.py companions "carrots" # Good with tomatoes, onions, lettuce
69garden_layout.py companions "onions" # Good with carrots, tomatoes, beets
70
71# Avoid bad combinations
72garden_layout.py incompatible "potatoes" # Avoid with tomatoes, cucumbers
73```
74
75### For small space maximization
76```bash
77# Use vertical growing for space efficiency
78garden_layout.py add-bed "Trellis" --width 1 --length 6 --sun "full"
79garden_layout.py add-plant "Trellis" "cucumber" --row 1 --col 1
80garden_layout.py add-plant "Trellis" "peas" --row 2 --col 1
81
82# Intensive planting with succession
83garden_layout.py add-bed "Intensive Bed" --width 3 --length 4 --sun "full"
84garden_layout.py add-plant "Intensive Bed" "lettuce" --row 1 --col 1
85garden_layout.py add-plant "Intensive Bed" "radishes" --row 1 --col 2 # Fast harvest
86```
87
88### For crop rotation planning
89```bash
90# Track what you planted each year
91garden_layout.py add-season "2026" # Starts fresh layout
92garden_layout.py add-plant "Bed 1" "tomatoes" --row 1 --col 1
93garden_layout.py add-plant "Bed 2" "beans" --row 1 --col 1
94
95# Next year, change families
96garden_layout.py add-season "2027" # New layout
97garden_layout.py add-plant "Bed 1" "carrots" --row 1 --col 1 # Different family
98garden_layout.py add-plant "Bed 2" "corn" --row 1 --col 1 # Different family
99```
100
101## Companion Planting Guide
102
103### Best Combinations (Good Together)
104| Plant | Good With | Why |
105|-------|-----------|------|
106| Tomatoes | Basil, carrots, onions, marigolds | Basil enhances flavor, carrots repel pests |
107| Cucumbers | Beans, corn, peas, radishes | Beans fix nitrogen, corn provides support |
108| Lettuce | Carrots, radishes, onions | Radishes mark rows, carrots break soil |
109| Peppers | Basil, onions, carrots | Basil repels aphids |
110| Beans | Corn, potatoes, cucumbers | Nitrogen fixation benefits neighbors |
111| Carrots | Tomatoes, onions, lettuce | Onions repel carrot fly |
112| Corn | Beans, squash, cucumbers | Three Sisters method |
113| Squash | Corn, beans, radishes | Beans repel squash beetles |
114
115### Incompatible Plants (Avoid Together)
116| Plant | Avoid With | Why |
117|-------|-----------|------|
118| Tomatoes | Potatoes, cucumbers, fennel | Same pests/diseases |
119| Beans | Onions, garlic | Inhibit growth |
120| Carrots | Dill, parsnips | Dill attracts carrot fly |
121| Cucumbers | Potatoes, sage | Potatoes compete for space |
122| Onions | Beans, peas | Inhibit bean growth |
123
124## Spacing Requirements
125
126### Small Plants (6-12 inches apart)
127- Lettuce: 6-8 inches
128- Spinach: 4-6 inches
129- Radishes: 2-3 inches
130- Onions: 4-6 inches
131- Carrots: 2-3 inches
132
133### Medium Plants (12-24 inches apart)
134- Peppers: 18-24 inches
135- Eggplant: 18-24 inches
136- Beans (bush): 12-18 inches
137- Cabbage: 18-24 inches
138
139### Large Plants (24+ inches apart)
140- Tomatoes: 24-36 inches
141- Squash: 24-48 inches (or trellis)
142- Corn: 12-18 inches (in blocks for pollination)
143- Potatoes: 12-15 inches
144
145## Sun Requirements
146
147### Full Sun (6-8+ hours daily)
148- Tomatoes, peppers, eggplant, squash, corn, beans, cucumbers
149
150### Partial Sun (4-6 hours daily)
151- Lettuce, spinach, kale, peas, carrots, beets
152
153### Shade (<4 hours daily)
154- Some leafy greens, herbs like mint, chives
155
156## Examples
157
158### Three Sisters Garden (Traditional)
159```bash
160# Classic Native American companion planting
161garden_layout.py add-bed "Three Sisters" --width 8 --length 8 --sun "full"
162
163# Plant corn in center (support)
164garden_layout.py add-plant "Three Sisters" "corn" --row 4 --col 4
165
166# Plant beans around corn (nitrogen)
167garden_layout.py add-plant "Three Sisters" "beans" --row 4 --col 2
168garden_layout.py add-plant "Three Sisters" "beans" --row 4 --col 6
169
170# Plant squash at edges (ground cover)
171garden_layout.py add-plant "Three Sisters" "squash" --row 1 --col 1
172garden_layout.py add-plant "Three Sisters" "squash" --row 1 --col 8
173garden_layout.py add-plant "Three Sisters" "squash" --row 8 --col 1
174garden_layout.py add-plant "Three Sisters" "squash" --row 8 --col 8
175```
176
177### Tomato-Basil Garden
178```bash
179# Simple companion planting
180garden_layout.py add-bed "Tomato Patch" --width 4 --length 6 --sun "full"
181
182garden_layout.py add-plant "Tomato Patch" "tomato" --row 1 --col 1
183garden_layout.py add-plant "Tomato Patch" "basil" --row 1 --col 3 # Companion!
184garden_layout.py add-plant "Tomato Patch" "carrots" --row 2 --col 1 # Under tomatoes
185garden_layout.py add-plant "Tomato Patch" "carrots" --row 2 --col 3
186```
187
188### Mixed Bed for Small Spaces
189```bash
190# Intensive planting
191garden_layout.py add-bed "Small Space" --width 3 --length 4 --sun "partial"
192
193garden_layout.py add-plant "Small Space" "lettuce" --row 1 --col 1
194garden_layout.py add-plant "Small Space" "radishes" --row 1 --col 2 # Fast, marks row
195garden_layout.py add-plant "Small Space" "lettuce" --row 1 --col 3
196
197garden_layout.py add-plant "Small Space" "spinach" --row 2 --col 1
198garden_layout.py add-plant "Small Space" "onions" --row 2 --col 2
199garden_layout.py add-plant "Small Space" "spinach" --row 2 --col 3
200```
201
202## Search Features
203
204- Find compatible plants for companion planting
205- Get spacing requirements for any plant
206- Search layouts by plant name
207- Filter by sun requirements
208
209## Security
210
211### Path Validation
212The `export` function validates output paths to prevent malicious writes:
213- ✅ Allowed: `~/.openclaw/workspace/`, `/tmp/`, and home directory
214- ❌ Blocked: System paths (`/etc/`, `/usr/`, `/var/`, etc.)
215- ❌ Blocked: Sensitive dotfiles (`~/.bashrc`, `~/.ssh`, etc.)
216
217## Data Storage
218
219- Garden layouts stored in: `~/.openclaw/workspace/garden_layout_db.json`
220- Each bed tracks: dimensions, sun exposure, plants with positions
221- Companion database built-in with 50+ plant relationships
222- JSON format makes it easy to backup or migrate
223
224## Best Practices
225
2261. **Plan before planting** - Use layout planner to visualize before putting seeds in ground
2272. **Use companion planting** - Plant compatible species together
2283. **Check spacing** - Don't overcrowd, plants need room to grow
2294. **Track sun exposure** - Different beds have different sun requirements
2305. **Plan for rotation** - Track what you plant where each year
2316. **Export for reference** - Keep a backup of your garden plan
232
233## Related Skills
234
235- **plant-tracker** - Track individual plants with care schedules and harvests
236- **seasonal-planting-guide** - What to plant when in your growing zone
237
238Use together for complete garden management!