制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗⚠️ Experimental — This project is in active development and is not recommended for production use. If you choose to use it in production, you do so at your own risk.
A modular Bash CLI that manages local development environments and produces Coolify-ready production files for a high-performance monolith:
Go 1.25+ (Echo v5) + htmx + Alpine.js + Cockpit CMS, Tailwind optional, with
Redis cache-aside in front of the CMS. Server-side HTML uses the standard
library's html/template - no code generation, no build step.
| Layer | Scope | Contents |
|---|---|---|
| Shared infrastructure | One per machine | Traefik proxy + Redis + MongoDB + MinIO on the gosite-network Docker network |
| Per project | One per site | Its own Go app container (air hot reload) + its own Cockpit container |
Projects never define Redis, MongoDB or MinIO. They attach to
gosite-network as an external network and reach the shared services by
container name (gosite-redis, gosite-mongo, gosite-minio) on their
in-network ports. Cockpit stores its content models and entries in MongoDB and
its app memory on the infra Redis (DB 1), so nothing project-wide is written to
local files. Production and QA follow the same rule: neither compose defines
MongoDB or Redis, they point at shared external servers and separate themselves
by database name and Redis database index.
One line, straight from GitHub — installs per user into ~/.local, no sudo:
curl -fsSL https://raw.githubusercontent.com/Avanxo-Technology/gosite-cli/main/install.sh | bash
Or from a clone:
git clone [email protected]:Avanxo-Technology/gosite-cli.git
cd gosite-cli && ./install.sh
Then check the toolchain:
gosite doctor
| Command | Modules | Binary | sudo |
|---|---|---|---|
./install.sh (default) | ~/.local/share/gosite | ~/.local/bin/gosite | no |
./install.sh --system | /usr/local/share/gosite | /usr/local/bin/gosite | yes |
Either way the installer copies src/ into the share directory and symlinks
<share>/gosite/src/main.sh to <bin>/gosite (chmod +x), so gosite runs
from any directory. main.sh resolves the symlink chain to find its own
modules. If the bin directory is not on your PATH, the installer prints the
exact line to add to your shell profile.
When piped from curl the script has no src/ beside it, so it downloads the
repository tarball to a temp directory and installs from there — you never need
curl | sudo bash.
| Variable / flag | Default | Purpose |
|---|---|---|
--system / --user | --user | Machine-wide vs per-user install |
GOSITE_PREFIX | ~/.local or /usr/local | Custom install prefix |
GOSITE_REF | main | Install a branch or release tag |
GOSITE_REPO | Avanxo-Technology/gosite-cli | Install from a fork |
# pin a release tag
curl -fsSL https://raw.githubusercontent.com/Avanxo-Technology/gosite-cli/main/install.sh | GOSITE_REF=v0.1.0 bash
# machine-wide
curl -fsSL https://raw.githubusercontent.com/Avanxo-Technology/gosite-cli/main/install.sh | bash -s -- --system
Update: re-run the install command; it replaces the installed modules in
place. Uninstall: rm -rf ~/.local/share/gosite ~/.local/bin/gosite
(prefix sudo and use /usr/local for a system install).
gosite doctor # toolchain check + security audit of projects & infra (--strict fails on findings)
gosite versions local # image tags in infra and dev files vs the newest Docker Hub tag (read-only)
gosite versions prod # the same check for prod and QA files (--patch DIR writes diffs, --strict fails)
gosite docs [topic] # agent notes on Cockpit and Medusa (no topic lists them)
gosite infra up # gosite-network + Traefik and Redis
gosite create my-site # scaffold ~/gosites/my-site + issue its TLS cert
gosite start my-site # app (air hot reload) + Cockpit
# -> https://my-site.test, https://cms.my-site.test
gosite logs my-site # follow the logs
gosite list # projects, URLs, container status (shop URL with Commerce; --prune cleans the registry)
gosite open my-site # open in Finder (macOS)
gosite restart my-site # recreate containers (--build to rebuild)
gosite stop my-site
gosite remove my-site # deletes containers, cert and the directory
gosite addons add Blog my-site # install an addon into a project that already exists
gosite infra down
Every project command takes an optional project name. Omit it to act on the project in the current directory; pass it to act on any project from anywhere.
Sites are created under ~/gosites regardless of the current directory, so
they stay in one place instead of scattered across the filesystem. Override the
location with GOSITE_WORKSPACE, or pass --here to scaffold into the current
directory for a one-off:
gosite create my-site # -> ~/gosites/my-site
GOSITE_WORKSPACE=~/work gosite create other # -> ~/work/other
gosite create scratch --here # -> ./scratch
Every project includes a CSS reset (@aprinciple/modern-reset)
via CDN. Tailwind CSS is offered as an interactive prompt during creation
(enabled by default, answer n for plain CSS):
gosite create my-site # Tailwind utility classes
gosite create my-site --no-tailwind # semantic classes + static/styles.css
gosite create also asks two questions (both answerable with a flag to skip the
prompt): where uploaded assets live (--storage s3|local, default s3 /
MinIO) and where content lives (--database mongodb|local, default
mongodb / the shared infra). Everything else defaults automatically, and
-y/--yes accepts all defaults.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗