@@ -30,6 +30,8 @@ stacker login
3030stacker status
3131```
3232
33+ > ** 💡 No cloud deployment yet?** You can experiment locally first — see [ Local Mode] ( #local-mode-experimental ) below.
34+
3335---
3436
3537## Example 1: Contact Form → Telegram + Slack
@@ -211,6 +213,8 @@ stacker pipe trigger <slack-pipe-id> \
211213| ` stacker pipe trigger <id> ` | Run the pipe once manually |
212214| ` stacker pipe history <id> ` | View past executions |
213215| ` stacker pipe replay <exec-id> ` | Re-run a past execution |
216+ | ` stacker pipe deploy <id> --deployment <hash> ` | Promote local pipe to remote |
217+ | ` stacker target [local\|cloud\|server] ` | Switch deployment target mode |
214218
215219### Useful flags
216220
@@ -255,6 +259,72 @@ stacker pipe trigger <id> --data '{"name":"test","email":"test@test.com","messag
255259
256260---
257261
262+ ## Local Mode (Experimental)
263+
264+ Local mode lets you design, test, and iterate on pipes ** without a cloud deployment** . Pipes run against your local Docker containers.
265+
266+ ### Setting Up Local Mode
267+
268+ ``` bash
269+ # Switch to local mode
270+ stacker target local
271+
272+ # Verify active target
273+ stacker target
274+ # Output: Active target: local
275+
276+ # All pipe commands now show [local] prefix
277+ stacker pipe scan website
278+ # [local] ✓ 3 containers discovered
279+ ```
280+
281+ ### Local Workflow
282+
283+ ``` bash
284+ # 1. Discover local containers (uses docker ps)
285+ stacker pipe scan website
286+
287+ # 2. Create a pipe — no deployment hash needed
288+ stacker pipe create website telegram
289+ # [local] ✓ Pipe instance created (id: abc-123)
290+
291+ # 3. Trigger locally (executes via docker exec)
292+ stacker pipe trigger abc-123 --data ' {"name":"test","email":"test@test.com"}'
293+
294+ # 4. Check history
295+ stacker pipe history abc-123
296+
297+ # 5. When ready — promote to a remote deployment
298+ stacker pipe deploy abc-123 --deployment < your-deployment-hash>
299+ # ✓ Local pipe promoted to remote deployment
300+ # Remote instance ID: def-456
301+ # Use 'stacker pipe activate def-456' to start the remote pipe.
302+ ```
303+
304+ ### Switching Targets
305+
306+ ``` bash
307+ stacker target local # local Docker containers
308+ stacker target cloud # cloud deployment (from prior deploy)
309+ stacker target server # dedicated server deployment
310+ stacker target # show current
311+ ```
312+
313+ ### What Works Locally
314+
315+ | Command | Local Behavior |
316+ | ---------| ---------------|
317+ | ` pipe scan ` | Runs ` docker ps ` to discover containers |
318+ | ` pipe create ` | Creates pipe with ` is_local=true ` , no deployment hash |
319+ | ` pipe list ` | Shows your local pipes only |
320+ | ` pipe trigger ` | Executes via ` docker exec ` / HTTP |
321+ | ` pipe history ` | Shows execution history |
322+ | ` pipe deploy ` | Promotes local pipe → remote deployment |
323+ | ` pipe activate/deactivate ` | Remote only (use after deploy) |
324+ | ` pipe replay ` | Remote only |
325+
326+ ---
327+
258328## What's Next?
259329
260330- ** [ Part 2: Visual Editor] ( ./DAG_PIPES_PART2_WEB_EDITOR.md ) ** — Build pipes with drag-and-drop in your browser
0 commit comments