Skip to content

Add xmd run -e "<inline document>" to run inline content without a file #76

Description

@taras

Follow-up from #75.

The website hero wants a self-contained first command that doesn't reference a file the visitor doesn't have. The natural fit is an inline form of run:

xmd run -e "<inline EMA document>"

e.g. the motivating demo:

xmd run -e "<ClaudeCode>Hello World</ClaudeCode>"

Scope

  • -e / --eval flag on run (cli/src/cli.ts): make docPath optional and accept an inline content string instead; run it through the same pipeline (e.g. write to a temp doc or add a content path to runDocument in core/src/run-document.ts, which today only takes docPath).
  • For the <ClaudeCode> demo to actually work out-of-the-box it also needs:
    • a shipped/embeddable ClaudeCode component (a provider that shells out to the claude CLI) — relates to embedding built-in components (Embed built-in components in the xmd binary #67), since inline docs have no component-dir,
    • the claude CLI present on the user's machine.
  • Pick a simpler inline example if the ClaudeCode path isn't ready (e.g. an inline bash exec block works with zero external deps).

Owner (Taras) plans to implement this separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions