Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 13 additions & 62 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,73 +9,24 @@ permissions:
contents: write

jobs:
build:
name: Build binaries
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
GOOS: linux
GOARCH: amd64
filename: dot-linux-amd64
- os: ubuntu-latest
GOOS: linux
GOARCH: arm64
filename: dot-linux-arm64
- os: macos-latest
GOOS: darwin
GOARCH: amd64
filename: dot-darwin-amd64
- os: macos-latest
GOOS: darwin
GOARCH: arm64
filename: dot-darwin-arm64
- os: windows-latest
GOOS: windows
GOARCH: amd64
filename: dot-windows-amd64.exe
steps:
- uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26'

- name: Build binary
run: go build -v -o ${{ matrix.filename }} ./cmd/dot
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.filename }}
path: ${{ matrix.filename }}

release:
name: Create GitHub Release
goreleaser:
name: Release
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
path: artifacts

- name: Flatten artifacts
run: |
mkdir -p binaries
find artifacts -type f -exec mv {} binaries/ \;
go-version-file: go.mod

- name: Create release
uses: softprops/action-gh-release@v2
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
files: binaries/*
generate_release_notes: true
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
81 changes: 81 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
version: 2

project_name: dot

before:
hooks:
- go mod tidy
- go generate ./...

builds:
- id: dot
main: ./cmd/dot
binary: dot
ldflags:
- -s -w -X main.buildVersion={{.Version}}
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64

archives:
- id: dot
formats:
- tar.gz
format_overrides:
- goos: windows
formats:
- zip
name_template: "dot_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- README.md
- LICENSE*

checksum:
name_template: "checksums.txt"
algorithm: sha256

changelog:
sort: asc
use: github
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"
- Merge pull request
- Merge branch

brews:
- name: dot
repository:
owner: version14
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
commit_author:
name: goreleaserbot
email: bot@goreleaser.com
commit_msg_template: "chore(brew): update dot to {{ .Tag }}"
homepage: "https://github.com/version14/dot"
description: "Universal project companion — scaffold and extend any project from the terminal."
license: "MIT"
install: |
bin.install "dot"
test: |
system "#{bin}/dot", "version"

release:
github:
owner: version14
name: dot
draft: false
prerelease: auto
name_template: "v{{ .Version }}"
65 changes: 50 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ dot is a **universal project companion**. Describe what you want — dot builds
## Table of Contents

- [Overview](#overview)
- [Getting Started](#getting-started)
- [Install](#install)
- [Usage](#usage)
- [Development](#development)
- [Architecture](#architecture)
- [CI/CD](#cicd)
Expand Down Expand Up @@ -47,40 +48,74 @@ After `dot init`, the project has a `.dot/config.json` that knows which generato

---

## Getting Started
## Install

### Prerequisites
### Homebrew (macOS / Linux)

| Tool | Version | Install |
|------|---------|---------|
| go | 1.26+ | [go.dev/doc/install](https://go.dev/doc/install) |
| git | Latest | [git-scm.com](https://git-scm.com/) |
```bash
brew install version14/tap/dot
```

### curl (macOS / Linux — no Go required)

```bash
curl -fsSL https://raw.githubusercontent.com/version14/dot/main/install.sh | sh
```

### Install
Installs to `/usr/local/bin/dot` by default. Override with `INSTALL_DIR=~/bin sh install.sh`.

### go install

```bash
# Via go install (recommended)
go install github.com/version14/dot/cmd/dot@latest
```

Requires Go 1.21+. Binary lands in `$GOPATH/bin` (usually already on `$PATH`).

# From source
### From source

```bash
git clone https://github.com/version14/dot.git
cd dot
make build
./bin/dot init
make build # → bin/dot
./bin/dot version
```

### Keep it up to date

```bash
dot self-update
```

Fetches the latest release from GitHub and replaces the binary in place. Works regardless of how you installed it.

### Uninstall

```bash
# Homebrew
brew uninstall dot

# curl / go install / from source
curl -fsSL https://raw.githubusercontent.com/version14/dot/main/uninstall.sh | sh
```

### Usage
Project `.dot/` directories are left untouched — remove them manually if needed.

---

## Usage

```bash
dot init # Launch TUI → generate project
dot new route <name> # Generate a new route in the current project
dot new route <name> # Generate a new artifact in the current project
dot help # List available commands for the current project
dot version # Print version
dot self-update # Update to the latest release
```

All commands except `dot init` look for `.dot/config.json` by traversing up from `$PWD` to the git root.

See [docs/getting-started](docs/getting-started/README.md) for the full setup guide.
See [docs/getting-started](docs/getting-started/README.md) for the full walkthrough.

---

Expand Down
Binary file modified bin/dot
Binary file not shown.
Loading
Loading