backlot

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: BSD-3-Clause Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Backlot

Backlot runs isolated development and test environments from a project's backlot.yaml: native processes, optional containers, private resources and HTTPS routes. Each Git worktree gets its own instance, ports and canonical origin.

Install Backlot

Install with Go 1.27.1 or newer. Backlot targets macOS ARM64, Ubuntu 24.04 amd64 and Debian 13.4 amd64; see the platform policy for runtime gates and Linux prerequisites:

go install github.com/octacian/backlot/cmd/backlot@latest
backlot version --json

If backlot is not found, add the directory reported by go env GOBIN to PATH when set; otherwise add bin under the first directory in go env GOPATH (default $HOME/go/bin). Save any PATH change in your shell profile. Git is needed for project worktrees; Make is needed only for the alternative source build.

Installation details and reproducible source builds.

Run an existing configured project

Prepare this machine once for local HTTPS. Install stock Caddy separately (brew install caddy if you use Homebrew). Save this private configuration outside your project; replace the executable with the absolute command -v caddy path:

umask 077
case "$(uname -s)" in
  Darwin) backlot_config_dir="$HOME/Library/Application Support/backlot" ;;
  Linux) backlot_config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/backlot" ;;
esac
mkdir -p "$backlot_config_dir"
cat > "$backlot_config_dir/config.yaml" <<'YAML'
version: backlot/v1
caddy:
  mode: managed
  executable: /opt/homebrew/bin/caddy
  endpoint: http://127.0.0.1:2020
  https_port: 8443
YAML
backlot daemon start --json
backlot gateway start --json
/opt/homebrew/bin/caddy trust --address 127.0.0.1:2020 --ca local

The default machine file is ~/Library/Application Support/backlot/config.yaml on macOS and ${XDG_CONFIG_HOME:-$HOME/.config}/backlot/config.yaml on Linux. Daemon state defaults to daemon/ in that same Backlot directory. Use --config and --state-dir to select other paths. First gateway start/restart loads the default; later commands with no --config reuse retained gateway settings even if the file changes or disappears. An explicit file must match those retained settings.

Use free ports 2020/8443; if occupied, select other unprivileged ports in the file and trust command. Run the stock trust command yourself against your owned gateway; it may ask for administrator authorization. Backlot never changes system/browser trust. If your browser uses a separate store, import the public $backlot_config_dir/daemon/gateway/data/pki/authorities/local/root.crt as a trusted authority. If you tried HTTPS before installing trust, stop/start the daemon and start the gateway again to refresh cached roots. Trust and recovery.

Install your project's declared application dependencies using its own setup instructions. From that project's checkout, daily use is:

backlot scene start dev --json

Open result.instance.execution.origin from the result: https://bl-<instance-label>.backlot.localhost:8443. Record result.instance.id. The command returns when ready; closing your terminal leaves the persistent scene running. Scene names are project-defined; use the project's development scene if it is not named dev. Application trust must already be configured in its manifest. No public domain, Certbot, router DNS or resolver file is needed.

backlot scene stop --json dev

Repeat scene start dev to resume with the same logical origin. After a daemon stop or machine restart, repeat daemon start and gateway start before running scenes; retained state preserves the CA. Native-only unpublished scenes need no gateway; Docker is needed only for container scenes.

Set up a project

Follow the runnable macOS HTTPS quickstart for a minimal working manifest, included frontend/API/native SSR code, explicit Node CA settings and disposable tests with retained reports. It also walks through two concurrent Git worktrees, CA persistence and scoped cleanup. Node/npm are example application dependencies, not Backlot contributor requirements.

For more: manifest reference, HTTPS and application trust, logs and evidence, operations and diagnosis, and the advanced four-workflow/container fixture. For separate worktree databases on one retained server, try the minimal shared MariaDB example. Use backlot list --json to discover recorded IDs, and backlot status --json INSTANCE_ID to inspect one. Add --follow to observe it, or use scene status dev --follow to watch the named scene through recreation. See targeting and follow.

Native commands and descendants must stay in their supervised process group; detachment and delegation to another supervisor are unsupported. See the platform guide for supported topologies, WSL configuration and planned Windows work. See release preparation for CI-led readiness and targeted diagnostics for checks beyond CI coverage.

For GitHub Actions, follow the CI quickstart and minimal two-shard adopter workflow.

Development

See Developer documentation for contributor setup and checks.

License

Backlot is BSD 3-Clause licensed.

For project-specific credentials with shared machine providers, run backlot project setup --project /path/to/project once; ordinary scene commands automatically reuse the private layer across linked worktrees. See private project setup.

Documentation

Overview

Package backlot provides the attribution bundled with the Backlot executable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteLicenses

func WriteLicenses(w io.Writer) error

WriteLicenses writes the full project license and generated dependency notices.

Types

This section is empty.

Directories

Path Synopsis
api
v1
Package v1 defines the shared JSON contract for Backlot API version 1.
Package v1 defines the shared JSON contract for Backlot API version 1.
cmd
adr command
backlot command
notices command
Command notices assembles the licenses of packages linked into the CLI and acceptance application, plus the Go standard library, from local module source.
Command notices assembles the licenses of packages linked into the CLI and acceptance application, plus the Go standard library, from local module source.
schema command
Command schema generates or checks committed editor schemas from Go contracts.
Command schema generates or checks committed editor schemas from Go contracts.
examples
container-https command
A mixed native/container HTTPS application with explicit application trust.
A mixed native/container HTTPS application with explicit application trust.
release-acceptance command
The release fixture is application code, not a Backlot lifecycle wrapper.
The release fixture is application code, not a Backlot lifecycle wrapper.
internal
adr
Package adr creates and validates frontmatter-based architecture decisions.
Package adr creates and validates frontmatter-based architecture decisions.
cli
Package cli adapts Backlot operations to human and machine-readable commands.
Package cli adapts Backlot operations to human and machine-readable commands.
client
Package client provides the typed v1 Unix-socket client shared by CLI adapters.
Package client provides the typed v1 Unix-socket client shared by CLI adapters.
daemon
Package daemon owns private preparation snapshots, native/container execution, retained resource generations, leases and durable recovery.
Package daemon owns private preparation snapshots, native/container execution, retained resource generations, leases and durable recovery.
evidenceaudit
Package evidenceaudit rejects unsafe portable evidence, including nested archives.
Package evidenceaudit rejects unsafe portable evidence, including nested archives.
gateway
Package gateway mutates only children of an operator-installed Caddy subroute.
Package gateway mutates only children of an operator-installed Caddy subroute.
gateway/gatewaytest
Package gatewaytest owns opt-in Docker fixture resources by unique labels.
Package gatewaytest owns opt-in Docker fixture resources by unique labels.
localipc
Package localipc enforces the user-owned filesystem boundary for daemon transport.
Package localipc enforces the user-owned filesystem boundary for daemon transport.
manager
Package manager owns resource-specific allocation effects.
Package manager owns resource-specific allocation effects.
manifest
Package manifest decodes and validates the shared versioned project contracts.
Package manifest decodes and validates the shared versioned project contracts.
native
Package native supervises cooperative applications in an owned session and strict system helpers in a pinned group.
Package native supervises cooperative applications in an owned session and strict system helpers in a pinned group.
native/procidentity
Package procidentity acquires ephemeral kernel process identities.
Package procidentity acquires ephemeral kernel process identities.
plan
Package plan resolves offline scene plans without executing or provisioning work.
Package plan resolves offline scene plans without executing or provisioning work.
projectconfig
Package projectconfig owns offline project-private association and atomic publication.
Package projectconfig owns offline project-private association and atomic publication.
schema
Package schema generates editor schemas from the shared versioned Go contracts.
Package schema generates editor schemas from the shared versioned Go contracts.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL