Build From Terminal
This guide covers the direct local workflow for building and running Sloppy without Docker.
Supported environments
| Platform | Status | Notes |
|---|---|---|
| macOS 14+ | Supported | Primary local development environment |
| Linux | Supported | CI runs on Ubuntu with Swift 6.2 and libsqlite3-dev |
Prerequisites
Swift runtime
- Swift 6 toolchain
sqlite3runtime available on the machine
Dashboard runtime
- Node.js
- npm
Linux packages
On Ubuntu or Debian-based systems, install the SQLite development headers before building:
bash
sudo apt-get update
sudo apt-get install -y libsqlite3-devResolve dependencies
From the repository root:
bash
swift package resolveBuild the Swift targets
Development build:
bash
swift buildRelease builds:
bash
swift build -c release --product Core
swift build -c release --product Node
swift build -c release --product AppRun the Swift targets
Start the core runtime:
bash
swift run CoreUseful runtime variants:
bash
swift run Core --oneshot
swift run Core --run-demo-request
swift run Core --config-path sloppy.jsonRun the other executables when needed:
bash
swift run Node
swift run AppRun the Swift tests
Full suite:
bash
swift test --parallelRun a single test or group:
bash
swift test --filter CoreTests.postChannelMessageEndpoint
swift test --filter CoreTests
swift test --filter AgentRuntimeTestsList tests:
bash
swift test listRun the dashboard
From Dashboard/:
bash
npm install
npm run devProduction build:
bash
npm run buildPreview the production bundle:
bash
npm run previewTypical local development loop
- Start
Corefrom the repository root withswift run Core. - Start the dashboard from
Dashboard/withnpm run dev. - Make a focused code change.
- Run the smallest relevant verification first.
- Before opening a PR, run the CI-parity checks listed below.
CI-parity checks
These are the commands the repository expects contributors to keep green:
bash
swift test --parallel
swift build -c release --product Core
swift build -c release --product Node
swift build -c release --product App
cd Dashboard
npm install
npm run buildNotes
- On first
swift run Core, Sloppy can create a workspace layout and a defaultsloppy.json. - The generated config includes
visor.scheduler.enabled,visor.scheduler.intervalSeconds,visor.scheduler.jitterSeconds, andvisor.bootstrapBulletin. - Model providers use environment variables for API keys when no key is set in config. See the Model Providers guide for details.
- Ollama uses the local endpoint by default and requires no API key.
Environment variables
| Variable | Purpose |
|---|---|
OPENAI_API_KEY | OpenAI model provider |
GEMINI_API_KEY | Google Gemini model provider |
ANTHROPIC_API_KEY | Anthropic Claude model provider |
BRAVE_API_KEY | Brave web search tool |
PERPLEXITY_API_KEY | Perplexity web search tool |
Environment values take precedence over empty sloppy.json keys but are overridden when a config key is explicitly set.