Files
marqdo/public/stdlib/sys.mq.md
T
cflmyandCursor d5a9301c7f docs(public): finish stdlib bracket-call demos and fix import returns
Prefer [lib.fn] in remaining public/stdlib samples, correct italic returns in structure import modules, and keep lib/系统 narration from starting with backticks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 13:32:17 +08:00

515 B


title: lib/sys — process description: Env, dotenv, cwd, args, exit, exec import sys:lib/sys.mq.md

main

Import lib/sys.mq.md. Functions: env_get, env_set, load_dotenv(optional path), args, cwd, exit(code), exec(cmd), stream_publish(event). load_dotenv does not override existing variables. Under view, exit soft-fails instead of killing the process. stream_publish feeds the view SSE EventBus.

d = [sys.cwd]

n = [len] d

  1. n > 0

print text=cwd-ok

print text=cwd-empty