Files
marqdo/lib/sys.mq.md
T
cflmyandCursor bfb10d172b feat(markup): adopt v0.3 as sole mapping (** code, * return)
Make prose-unified Markup the only runtime: bold segments are executable,
italic is return, params can be inferred from body/prose, with no v0.2 dual
mode. Migrate lib and structure/keywords golds; gate on tests/markup-v03.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 20:38:53 +08:00

1.0 KiB

title, description
title description
lib/sys English system wrappers (load_dotenv accepts optional path via host alias)

env_get

+ `name`

> host_env_get name=name

env_set

+ `name`
+ `value`

> host_env_set name=name value=value

load_dotenv

+ `path`=None

Load .env (optional named arg path=). Existing process env is not overridden.

> host_dotenv_load path=path

args

> host_args

cwd

> host_cwd

exit

+ `code`

> host_exit code=code

exec

+ `cmd`
+ `args`=None
+ `capture`=False

Run a process. Default return is the exit code (int).

With capture=True, return a map {code, stdout, stderr} (stdout/stderr may be truncated for huge output).

Inside **…** prefer bare args=args (variable); args=`args` is also accepted.

> host_exec cmd=cmd args=args capture=capture

stream_publish

+ `event`

Publish a stream event map onto the process EventBus (marqdo view SSE). No-op when nothing is subscribed.

> host_stream_publish event=event