Moul

Quick Start

Install Moul, start your local server, and launch the Web Admin and TUI consoles in minutes.

This guide walks you through installing Moul, launching the backend daemon (moul), populating demo collections, and administering your database through both the Web Admin Console and the Terminal UI (moul-ctl).


Getting Started Workflow

Install Moul

Install the official pre-compiled binaries via the automated install script. This installs both moul (the server daemon) and moul-ctl (the terminal management client) directly into /usr/local/bin:

# Downloads and installs 'moul' and 'moul-ctl' binaries
curl -fsSL https://moul.dev/install.sh | sh

Verify that both commands are accessible in your shell:

moul --version
moul-ctl --version

Download the pre-compiled archive for your operating system and architecture from the GitHub Releases page:

# Extract the archive and move binaries to your system PATH
tar -xzf moul_*_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz
sudo mv moul /usr/local/bin/

tar -xzf moul-ctl_*_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz
sudo mv moul-ctl /usr/local/bin/

Building from source? If you are contributing to Moul or embedding it into your custom Go application, see the Building from Source guide.

Start the Local Engine

Start the moul server engine. By default, it creates an embedded SQLite database (moul-local.db), launches the background worker pool, and listens on port :8090:

moul start

You should see startup logs confirming the database is ready:

{"time":"...","level":"INFO","msg":"Database initialized at moul-local.db"}
{"time":"...","level":"INFO","msg":"Worker engine started with 10 workers"}
{"time":"...","level":"INFO","msg":"Server listening on :8090"}

You can customize the SQLite database path by setting the --db flag or MOUL_DB_PATH environment variable:

moul start --db /path/to/my-app.db

Seed Demo Data & Schema Fixtures

In a new terminal window, populate your database with demonstration collections (users, posts, categories, tasks_queue, events), relationship records, worker jobs, and OpenFeature flags:

moul seed

Output:

Seeding database at: moul-local.db...
Successfully seeded database with demo collections, records, and feature flags!

Access the Admin Consoles

Moul includes two built-in management interfaces to inspect and configure your engine:

1. Web Admin Console (Browser)

Open http://localhost:8090/moul/ in your web browser.

  • Complete the initial root admin setup or log in with your master administrative key (MOUL_ADMIN_KEY).
  • Browse dynamic collections, edit schema fields visually, monitor background worker queues, and inspect real-time telemetry.

2. Terminal User Interface (moul-ctl)

Launch the keyboard-driven terminal console in your terminal:

moul-ctl
# Or via convenience subcommand:
moul ctl
  • When prompted, connect to http://localhost:8090 using your admin key.
  • Use arrow keys and shortcuts to navigate collections, inspect JSON records, and manage worker queues without leaving the terminal.

Perform Your First API Call

Query the newly seeded posts collection from your terminal or application code:

# List records in the "posts" collection
curl -s "http://localhost:8090/api/moul/posts/records?page=1&perPage=10"
interface Post {
  id: string;
  title: string;
  content: string;
  published: boolean;
}

const response = await fetch('http://localhost:8090/api/moul/posts/records?page=1&perPage=10');
const data = await response.json();
console.log(data.items);
package main

import (
	"encoding/json"
	"fmt"
	"net/http"
)

func main() {
	resp, err := http.Get("http://localhost:8090/api/moul/posts/records?page=1&perPage=10")
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	var result map[string]any
	if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
		panic(err)
	}
	fmt.Printf("Fetched %v records\n", result["totalItems"])
}

Interactive API Exploration

moul serves interactive API documentation directly at runtime:


Next Steps

On this page