Learn / Getting Started

Getting Started

Spark is for developers who want AI in their tools without SDK glue spread across Python files. This lesson installs the runtime, runs your first dry-run (no API key), then shows optional live ask when you're ready.

Install the runtime

Download a graphical installer or runtime kit for your platform from Downloads:

curl -fsSL https://sparklang.dev/downloads/spark-install-linux.sh | bash
spark --version

macOS: curl -fsSL https://sparklang.dev/downloads/spark-install-macos.sh | bash. To build from source, download the runtime tarball from Downloads → Build from source, extract it, then run make in that directory.

Run dry-run (no API key)

Dry-run uses offline fixtures — safe for CI and learning without network access:

./spark --dry-run examples/hello.spark

You should see heuristic output (no live model call). Try the Playground page to preview sample output in the browser.

Live ask (OPENAI_API_KEY)

Live mode calls an OpenAI-compatible chat API via the spark-ask-http companion:

export OPENAI_API_KEY=your_key_here
./spark --live examples/ask_live.spark

Set the key in your shell or a local env file — never commit secrets. See Run: dry vs live in the programming guide.

Next lesson

Continue to Your First Program to write hello.spark from scratch.