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
56 changes: 28 additions & 28 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: 2

project_name: req
project_name: breq

builds:
- id: req
main: ./cmd/req
binary: req
- id: breq
main: ./cmd/breq
binary: breq
env:
- CGO_ENABLED=0
goos:
Expand All @@ -21,8 +21,8 @@ builds:
- -trimpath

archives:
- id: req
name_template: "req_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
- id: breq
name_template: "breq_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
formats:
- tar.gz
- zip
Expand All @@ -37,25 +37,25 @@ archives:
- none*

nfpms:
- id: req
package_name: req
- id: breq
package_name: breq
ids:
- req
- breq
vendor: BlueFunda
maintainer: BlueFunda <support@bluefunda.com>
description: Cross-platform CLI for the bluerequests change and release management platform.
license: Apache-2.0
formats:
- deb
- rpm
bindir: /opt/req/bin
bindir: /opt/breq/bin
contents:
- dst: /opt/req/etc
- dst: /opt/breq/etc
type: dir
- dst: /opt/req/log
- dst: /opt/breq/log
type: dir
- dst: /usr/local/bin/req
src: /opt/req/bin/req
- dst: /usr/local/bin/breq
src: /opt/breq/bin/breq
type: symlink

notarize:
Expand All @@ -70,11 +70,11 @@ notarize:
key: "{{ .Env.NOTARIZATION_KEY }}"

homebrew_casks:
- name: req
- name: breq
ids:
- req
- breq
binaries:
- req
- breq
homepage: https://github.com/bluefunda/bluerequests
description: CLI for the bluerequests change and release management platform
directory: Casks
Expand Down Expand Up @@ -102,9 +102,9 @@ release:
name: bluerequests
draft: false
replace_existing_draft: true
name_template: "req v{{ .Version }}"
name_template: "breq v{{ .Version }}"
header: |
## bluerequests CLI (req) v{{ .Version }}
## bluerequests CLI (breq) v{{ .Version }}

Cross-platform CLI for the bluerequests change and release management platform.

Expand All @@ -113,7 +113,7 @@ release:
**Homebrew (macOS):**
```bash
brew tap bluefunda/tap
brew install --cask req
brew install --cask breq
```

**One-line installer (macOS and Linux):**
Expand All @@ -123,30 +123,30 @@ release:

**Debian/Ubuntu (x86_64):**
```bash
curl -sL https://github.com/bluefunda/bluerequests/releases/download/v{{ .Version }}/req_{{ .Version }}_linux_amd64.deb -o req.deb
sudo dpkg -i req.deb
curl -sL https://github.com/bluefunda/bluerequests/releases/download/v{{ .Version }}/breq_{{ .Version }}_linux_amd64.deb -o breq.deb
sudo dpkg -i breq.deb
```

**Debian/Ubuntu (ARM64):**
```bash
curl -sL https://github.com/bluefunda/bluerequests/releases/download/v{{ .Version }}/req_{{ .Version }}_linux_arm64.deb -o req.deb
sudo dpkg -i req.deb
curl -sL https://github.com/bluefunda/bluerequests/releases/download/v{{ .Version }}/breq_{{ .Version }}_linux_arm64.deb -o breq.deb
sudo dpkg -i breq.deb
```

**RHEL / Fedora / Rocky (x86_64):**
```bash
sudo dnf install https://github.com/bluefunda/bluerequests/releases/download/v{{ .Version }}/req_{{ .Version }}_linux_amd64.rpm
sudo dnf install https://github.com/bluefunda/bluerequests/releases/download/v{{ .Version }}/breq_{{ .Version }}_linux_amd64.rpm
```

**RHEL / Fedora / Rocky (ARM64):**
```bash
sudo dnf install https://github.com/bluefunda/bluerequests/releases/download/v{{ .Version }}/req_{{ .Version }}_linux_arm64.rpm
sudo dnf install https://github.com/bluefunda/bluerequests/releases/download/v{{ .Version }}/breq_{{ .Version }}_linux_arm64.rpm
```

**Linux (manual):**
```bash
curl -sL https://github.com/bluefunda/bluerequests/releases/download/v{{ .Version }}/req_{{ .Version }}_linux_amd64.tar.gz | tar xz
chmod +x req && sudo mv req /usr/local/bin/
curl -sL https://github.com/bluefunda/bluerequests/releases/download/v{{ .Version }}/breq_{{ .Version }}_linux_amd64.tar.gz | tar xz
chmod +x breq && sudo mv breq /usr/local/bin/
```

snapshot:
Expand Down
32 changes: 16 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Instructions for AI coding agents working on bluerequests.

Go 1.25 CLI for the BlueFunda bluerequests change/release management platform. All requests flow through `trm-bff` via gRPC — the CLI never talks to NATS or backend services directly.

Binary name: `req`
Binary name: `breq`
Module: `github.com/bluefunda/bluerequests`
Entry point: `cmd/req/main.go`
Config location: `~/.req/config.yaml`
Entry point: `cmd/breq/main.go`
Config location: `~/.breq/config.yaml`

## Build and Test Commands

Expand All @@ -35,7 +35,7 @@ All must pass with zero errors before committing.
## Project Structure

```
cmd/req/main.go # Entry point: invokes root command
cmd/breq/main.go # Entry point: invokes root command
api/proto/
bff.proto # BFFService definition — keep in sync with trm-bff
bff/
Expand All @@ -57,7 +57,7 @@ internal/
auth/
auth.go # OAuth2 device authorization grant (RFC 8628)
config/
config.go # ~/.req/config.yaml loader; token storage
config.go # ~/.breq/config.yaml loader; token storage
ui/
output.go # Printer: table/json/quiet output modes
scripts/
Expand All @@ -72,16 +72,16 @@ scripts/
| `req events sub` | SubscribeEvents | Stream realm-scoped events |
| `req events pub` | PublishEvent | Publish event to NATS subject |
| `req rpc request` | RequestReply | NATS request-reply |
| `req cr list` | ListChangeRequests | List change requests with filters |
| `req cr get` | GetChangeRequest | Get a single change request by ID |
| `req cr create` | CreateChangeRequest | Create a new change request |
| `req cr update` | UpdateChangeRequest | Update fields on a change request |
| `req cr delete` | DeleteChangeRequest | Archive a change request |
| `req cr stage` | UpdateChangeRequestStage | Advance the workflow stage |
| `req cr comment list` | ListComments | List comments on a change request |
| `req cr comment add` | AddComment | Add a comment |
| `req cr comment update` | UpdateComment | Edit a comment |
| `req cr comment delete` | DeleteComment | Delete a comment |
| `breq cr list` | ListChangeRequests | List change requests with filters |
| `breq cr get` | GetChangeRequest | Get a single change request by ID |
| `breq cr create` | CreateChangeRequest | Create a new change request |
| `breq cr update` | UpdateChangeRequest | Update fields on a change request |
| `breq cr delete` | DeleteChangeRequest | Archive a change request |
| `breq cr stage` | UpdateChangeRequestStage | Advance the workflow stage |
| `breq cr comment list` | ListComments | List comments on a change request |
| `breq cr comment add` | AddComment | Add a comment |
| `breq cr comment update` | UpdateComment | Edit a comment |
| `breq cr comment delete` | DeleteComment | Delete a comment |

## Adding a New Command

Expand Down Expand Up @@ -152,5 +152,5 @@ Follows `bluefunda` org-level standards:

- Connect to NATS, trm-backend-go, or Keycloak directly from the CLI — all traffic goes through `trm-bff` via gRPC
- Edit `api/proto/bff/bff.pb.go` or `bff_grpc.pb.go` by hand — regenerate with `make proto`
- Commit tokens, credentials, or `~/.req/` contents
- Commit tokens, credentials, or `~/.breq/` contents
- Modify `.github/workflows/` without explicit request
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Open a [GitHub Issue](https://github.com/bluefunda/bluerequests/issues) with:
- A clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Version (`req version`) and OS/arch
- Version (`breq version`) and OS/arch

## License

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ COPY . .
ARG VERSION=dev
RUN CGO_ENABLED=0 go build \
-ldflags "-X github.com/bluefunda/bluerequests/internal/cmd.Version=${VERSION}" \
-o /req ./cmd/req
-o /breq ./cmd/req

FROM alpine:3.21
RUN apk --no-cache add ca-certificates
COPY --from=builder /req /usr/local/bin/req
ENTRYPOINT ["req"]
COPY --from=builder /breq /usr/local/bin/req
ENTRYPOINT ["breq"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.PHONY: build clean vet fmt tidy test proto snapshot release

BINARY := req
BINARY := breq
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
LDFLAGS := -ldflags "-X github.com/bluefunda/bluerequests/internal/cmd.Version=$(VERSION)"

build: tidy
go build $(LDFLAGS) -o $(BINARY) ./cmd/req
go build $(LDFLAGS) -o $(BINARY) ./cmd/breq

clean:
rm -f $(BINARY)
Expand Down
Loading
Loading