Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DevCloud

DevCloud is a local development orchestrator for web apps with cold-start support.

It includes:

  • devcloudd: a lazy-loading reverse proxy and process manager
  • devcloudctl: a CLI for listing apps, warming them up, killing them, and editing config

Install the binaries

Install both binaries into your Cargo bin directory so you can run them directly:

cargo install --path ./devcloudd
cargo install --path ./devcloudctl

After that, use them directly:

devcloudctl ls
devcloudctl reload
devcloudctl hosts check
devcloudd

Cargo usually installs binaries to:

  • macOS: ~/.cargo/bin
  • Linux: ~/.cargo/bin
  • Windows: %USERPROFILE%\.cargo\bin

Make sure that directory is on your PATH.

Default config location

By default, DevCloud uses a single OS-specific config file:

  • macOS: ~/Library/Application Support/devcloud/devcloud.toml
  • Linux: ~/.config/devcloud/devcloud.toml
  • Windows: %APPDATA%\devcloud\devcloud.toml

You can always override it with --config:

devcloudd --config /path/to/devcloud.toml
devcloudctl --config /path/to/devcloud.toml ls
devcloudctl --config /path/to/devcloud.toml reload
devcloudctl --config /path/to/devcloud.toml hosts check

Quick start

  1. Create the config file in the default location above, or start from devcloud.toml.example.
  2. Add your .local domains to /etc/hosts on macOS/Linux, or C:\Windows\System32\drivers\etc\hosts on Windows.
  3. Start the daemon:
devcloudd
  1. In another terminal, inspect state:
devcloudctl ls
devcloudctl ps
devcloudctl reload
devcloudctl hosts check
  1. Visit the configured domain through the proxy on http://<domain>:8080, or forward port 80 -> 8080.

CLI commands

devcloudctl ls
devcloudctl ps
devcloudctl reload
devcloudctl hosts check
devcloudctl hosts print
devcloudctl start alpha
devcloudctl kill alpha
devcloudctl add /abs/path/to/project
devcloudctl config

Run devcloudd as a real daemon

macOS with launchd

Before installing the agent, make sure the binary works normally:

devcloudd

Create ~/Library/LaunchAgents/com.devcloud.devcloudd.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>com.devcloud.devcloudd</string>
    <key>ProgramArguments</key>
    <array>
      <string>/Users/YOUR_USER/.cargo/bin/devcloudd</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>StandardOutPath</key>
    <string>/tmp/devcloudd.log</string>
    <key>StandardErrorPath</key>
    <string>/tmp/devcloudd.err.log</string>
  </dict>
</plist>

Load it:

launchctl bootstrap "gui/$(id -u)" ~/Library/LaunchAgents/com.devcloud.devcloudd.plist
launchctl enable "gui/$(id -u)/com.devcloud.devcloudd"
launchctl print "gui/$(id -u)/com.devcloud.devcloudd"

If you want a custom config path, add --config and the file path inside ProgramArguments.

Restart it after changing the plist:

launchctl bootout "gui/$(id -u)" ~/Library/LaunchAgents/com.devcloud.devcloudd.plist
launchctl bootstrap "gui/$(id -u)" ~/Library/LaunchAgents/com.devcloud.devcloudd.plist
launchctl print "gui/$(id -u)/com.devcloud.devcloudd"

If you still want to use kickstart, use it only after the job already exists:

launchctl kickstart -kp "gui/$(id -u)/com.devcloud.devcloudd"

If startup fails, inspect:

tail -n 100 /tmp/devcloudd.log
tail -n 100 /tmp/devcloudd.err.log
launchctl print "gui/$(id -u)/com.devcloud.devcloudd"

Linux with systemd --user

Create ~/.config/systemd/user/devcloudd.service:

[Unit]
Description=DevCloud daemon
After=network.target

[Service]
ExecStart=%h/.cargo/bin/devcloudd
Restart=always
RestartSec=2

[Install]
WantedBy=default.target

Enable and start it:

systemctl --user daemon-reload
systemctl --user enable --now devcloudd

If you want a custom config path, change ExecStart to:

ExecStart=%h/.cargo/bin/devcloudd --config %h/path/to/devcloud.toml

Windows as a background service

The simplest reliable approach is to wrap devcloudd.exe with NSSM.

Install the service:

nssm install devcloudd "$env:USERPROFILE\.cargo\bin\devcloudd.exe"
nssm start devcloudd

If you want a custom config path:

nssm set devcloudd AppParameters "--config C:\path\to\devcloud.toml"
nssm restart devcloudd

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages