diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000000000000000000000000000000000..dfbfe28c5b3e2417d2bab68da0fcb120d0aa7ea9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,73 @@ +name: Release + +on: + push: + branches: + - main + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Generate version tag + id: version + run: | + # Get commit count as version number + COUNT=$(git rev-list --count HEAD) + SHORT_SHA=$(git rev-parse --short=6 HEAD) + # Convert 6-char hex SHA to octal, prefixed with 9 to ensure valid semver + SHA_OCTAL=$(printf '%o' "0x${SHORT_SHA}") + VERSION="0.${COUNT}.9${SHA_OCTAL}" + TAG="v${VERSION}" + + echo "version=${VERSION}" >> $GITHUB_OUTPUT + echo "tag=${TAG}" >> $GITHUB_OUTPUT + echo "sha=${SHORT_SHA}" >> $GITHUB_OUTPUT + + # Create and push tag + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git tag -a "${TAG}" -m "Release ${TAG} (${SHORT_SHA})" + git push origin "${TAG}" + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24' + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Build UI + run: | + cd ui + npm ci + npm run build + + - name: Build templates + run: | + for dir in templates/*/; do + name=$(basename "$dir") + echo "Creating $name.tar.gz..." + tar -czf "templates/$name.tar.gz" -C "templates/$name" --exclude='.DS_Store' . + done + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000000000000000000000000000000000..43cf24174adcdf65982b3ec1bac967634872b718 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24' + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Build UI + run: | + cd ui + npm ci + npm run build + + - name: Build templates + run: | + for dir in templates/*/; do + name=$(basename "$dir") + echo "Creating $name.tar.gz..." + tar -czf "templates/$name.tar.gz" -C "templates/$name" --exclude='.DS_Store' . + done + + - name: Run Go tests + run: go test -v ./... diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000000000000000000000000000000000000..11bd8bda7bc48d6acfc430911e737b4ebe4dae68 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,64 @@ +version: 2 + +before: + hooks: + - go mod tidy + +builds: + - id: shelley + binary: shelley + main: ./cmd/shelley + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + goarch: + - amd64 + - arm64 + ldflags: + - -s -w + +archives: + - id: shelley + format: binary + name_template: >- + {{ .ProjectName }}_ + {{- .Os }}_ + {{- .Arch }} + +checksum: + name_template: 'checksums.txt' + +snapshot: + version_template: "{{ incpatch .Version }}-next" + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + - '^chore:' + - 'typo' + +release: + github: + owner: boldsoftware + name: shelley + draft: false + prerelease: auto + +brews: + - repository: + owner: philz + name: homebrew-tap + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + directory: Formula + homepage: https://github.com/boldsoftware/shelley + description: "A mobile-friendly, web-based, multi-modal coding agent" + license: Apache-2.0 + install: | + bin.install "shelley" + test: | + system "#{bin}/shelley", "--help" diff --git a/README.md b/README.md index af23ef15a49548bb2331ed1215457f6bbb22e8c4..1a2bbc2e7742d7c6155afbb4728a0012b1dbcfe1 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,49 @@ Shelley is a mobile-friendly, web-based, multi-conversation, multi-modal, multi-model, single-user coding agent built for but not exclusive to [exe.dev](https://exe.dev/). It does not come with authorization or sandboxing: -bring your own. +bring your own. *Mobile-friendly* because ideas can come any time. *Web-based*, because terminal-based scroll back is punishment for shoplifting in some countries. -*Multi-modal* because screenshots, charts, and graphs are necessary, not to mention delightful. +*Multi-modal* because screenshots, charts, and graphs are necessary, not to mention delightful. *Multi-model* to benefit from all the innovation going on. *Single-user* because it makes sense to bring the agent to the compute. +# Installation + +## Pre-Built Binaries (macOS/Linux) + +```bash +curl -Lo shelley "https://github.com/boldsoftware/shelley/releases/latest/download/shelley_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')" && chmod +x shelley +``` + +The binaries are on the [releases page](https://github.com/boldsoftware/shelley/releases/latest). + +## Homebrew (macOS/Linux) + +```bash +brew install philz/tap/shelley +``` + +## Build from Source + +You'll need Go and Node. + +```bash +git clone https://github.com/boldsoftware/shelley.git +cd shelley +make +``` + +# Releases + +New releases are automatically created on every commit to `main`. Versions +follow the pattern `v0.N.9OCTAL` where N is the total commit count and 9OCTAL is the commit SHA encoded as octal (prefixed with 9). + # Architecture The technical stack is Go for the backend, SQLite for storage, and Typescript