Your 60-second setup Step 1 of 3
Let's get dot-prompt running
Follow these three steps to create your first compiled prompt.
1
Start Docker
The easiest way to run dot-prompt is via Docker. Copy this into your terminal:
docker run -v ./prompts:/app/priv/prompts -p 4040:4040 -p 4041:4041 dotprompt/server 2
Create Your First Prompt
Create a file called prompts/hello.prompt with this content:
init do@major: 1@version: 1.0.0params:@name: strend initHello @name! Welcome to dot-prompt.
3
Test It
Run this curl command to test your prompt:
curl -X POST http://localhost:4041/api/render \
-H "Content-Type: application/json" \
-d '{"prompt": "hello", "runtime": {"name": "Developer"}}'Let's fix it
▶ Docker isn't running
Make sure Docker Desktop is running on your machine. Try running docker ps to check.
▶ Port already in use
Another service is using port 4040 or 4041. Try stopping other services or changing the ports in the docker command.
▶ Prompt file not found
Make sure you created the file at prompts/hello.prompt (note: create the prompts folder first).
▶ Still stuck?
Check our docs or open an issue.