Skip to content
2 changes: 2 additions & 0 deletions cmd/meta/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package meta

import (
"fmt"
"log/slog"

"github.com/calypr/forge/metadata"
"github.com/spf13/cobra"
Expand All @@ -19,6 +20,7 @@ var MetaCmd = &cobra.Command{
Example: "forge meta init --remote dev",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
slog.Info("Forge metadata generation started", "profile", args[0], "git_ref", "HEAD", "output", outPath, "remote", gitRemote)
err := metadata.CreateMeta(outPath, args[0], gitRemote)
if err != nil {
return fmt.Errorf("could not create metadata: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/publish/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ var OutputCmd = &cobra.Command{
}

func init() {
PublishCmd.Flags().StringVarP(&publishGitRemote, "remote", "r", "", "git remote name for repository URL lookup (default: dev/origin per git config)")
PublishCmd.Flags().StringVar(&publishGitRemote, "git-remote", "", "Git remote name for the repository URL (default: origin, or the only configured remote)")
ListCmd.Flags().StringVarP(&listGitRemote, "remote", "r", "", "git remote name when you want to document repo context")
StatusCmd.Flags().StringVarP(&statusGitRemote, "remote", "r", "", "git remote name when you want to document repo context")
OutputCmd.Flags().StringVarP(&outputGitRemote, "remote", "r", "", "git remote name when you want to document repo context")
Expand Down
15 changes: 8 additions & 7 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Create a metadata upload job for your project.

**Usage:**
```bash
forge publish <github_personal_access_token> [--remote REMOTE_NAME]
forge publish <profile> <github_personal_access_token> [--git-remote GIT_REMOTE_NAME]
```

**What it does:**
Expand All @@ -28,18 +28,19 @@ This is the main command you'll use. It dispatches a Sower job on the CALYPR pla

**Example:**
```bash
$ forge publish ghp_abc123def456
$ forge publish dev ghp_abc123def456

Using remote: production
Uid: job-xyz789-abc123 Name: fhir_import_export Status: Pending
```

**Flags:**
- `--remote`, `-r` - Specify which CALYPR remote to use (default: default_remote)
- `--git-remote` - Git remote containing the repository to publish. Forge uses `origin` when present, otherwise the only configured Git remote. Use this only when the repository has multiple Git remotes and the desired one is not `origin`.

The project scope comes from the repository's default git-drs remote. Bucket selection is resolved by the server from the Syfon mapping for that scope; Forge does not send a local bucket override.

**Common errors:**
- `Error: invalid token` - Your GitHub token is expired or missing the `repo` scope
- `Error: repository has no origin` - Push your repository to GitHub first
- `Error: no git remotes configured` - Push your repository to GitHub first
- `Error: could not locate remote` - Run this in a git-drs initialized repository

**When to use:** After pushing new or updated files via git-drs, run this to make them discoverable on CALYPR.
Expand Down Expand Up @@ -438,12 +439,12 @@ your-repo/

All commands support these flags:

- `--remote`, `-r` - Specify which git-drs remote to use (dev, staging, production, etc.)
- `--help`, `-h` - Show help for a command

**Examples:**
```bash
forge publish ghp_token --remote staging
forge publish staging ghp_token
forge publish staging ghp_token --git-remote mirror
forge ping --remote dev
forge list --remote production
```
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ If you need to push to a different environment:
```bash
# Specify which remote to use
forge ping --remote dev
forge publish ghp_token --remote staging
forge publish staging ghp_token
forge list --remote production
```

Expand Down
59 changes: 30 additions & 29 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
module github.com/calypr/forge

go 1.26.4
go 1.26.5

require (
github.com/bmeg/golib v0.0.0-20200725232156-e799a31439fc
github.com/bmeg/grip v0.0.0-20260315213055-7b57be8d0a5d
github.com/bmeg/jsonschema/v6 v6.0.4
github.com/bmeg/jsonschemagraph v0.0.4-0.20251017205345-236d2de9887c
github.com/bytedance/sonic v1.15.1
github.com/calypr/calypr-cli v0.0.3
github.com/bytedance/sonic v1.15.2
github.com/calypr/calypr-cli v0.0.4-0.20260628024636-bb44afe0c576
github.com/calypr/gecko v0.0.0-20260608202450-85aef064d4ae
github.com/calypr/syfon/apigen v0.2.7
github.com/calypr/syfon/client v0.3.0
github.com/calypr/git-drs v0.7.10-0.20260727230551-41211e8c328b
github.com/calypr/syfon/apigen v0.2.9-0.20260616212227-547f1e22e1ac
github.com/calypr/syfon/client v0.3.1-0.20260616212227-547f1e22e1ac
github.com/cockroachdb/errors v1.11.3
github.com/go-git/go-git/v5 v5.19.0
github.com/go-git/go-git/v5 v5.19.1
github.com/google/fhir/go v0.7.5-0.20250925033537-1f5b5b9427ff
github.com/google/uuid v1.6.0
github.com/hashicorp/go-multierror v1.1.1
Expand All @@ -26,24 +27,24 @@ require (
dario.cat/mergo v1.0.2 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/ProtonMail/go-crypto v1.4.1 // indirect
github.com/andybalholm/brotli v1.2.1 // indirect
github.com/andybalholm/brotli v1.2.2 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/bytedance/gopkg v0.1.4 // indirect
github.com/bytedance/sonic/loader v0.5.1 // indirect
github.com/calypr/syfon v0.3.1-0.20260513001653-406639e16d27 // indirect
github.com/cloudflare/circl v1.6.3 // indirect
github.com/calypr/syfon v0.3.2-0.20260616212227-547f1e22e1ac // indirect
github.com/cloudflare/circl v1.6.4 // indirect
github.com/cloudwego/base64x v0.1.7 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cyphar/filepath-securejoin v0.6.1 // indirect
github.com/cyphar/filepath-securejoin v0.7.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/getsentry/sentry-go v0.28.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
github.com/gofiber/fiber/v3 v3.2.0 // indirect
github.com/gofiber/schema v1.7.1 // indirect
github.com/gofiber/utils/v2 v2.0.5 // indirect
github.com/gofiber/fiber/v3 v3.4.0 // indirect
github.com/gofiber/schema v1.8.2 // indirect
github.com/gofiber/utils/v2 v2.2.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
Expand All @@ -59,16 +60,16 @@ require (
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v1.6.0 // indirect
github.com/klauspost/compress v1.18.6 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/klauspost/compress v1.19.0 // indirect
github.com/klauspost/cpuid/v2 v2.4.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-colorable v0.1.15 // indirect
github.com/mattn/go-isatty v0.0.22 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/oapi-codegen/runtime v1.4.0 // indirect
github.com/oapi-codegen/runtime v1.5.0 // indirect
github.com/philhofer/fwd v1.2.0 // indirect
github.com/pjbgf/sha1cd v0.6.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
Expand All @@ -81,20 +82,20 @@ require (
github.com/tinylib/msgp v1.6.4 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.71.0 // indirect
github.com/valyala/fasthttp v1.72.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
golang.org/x/arch v0.27.0 // indirect
golang.org/x/crypto v0.51.0 // indirect
golang.org/x/arch v0.29.0 // indirect
golang.org/x/crypto v0.54.0 // indirect
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect
golang.org/x/net v0.55.0 // indirect
golang.org/x/sys v0.45.0 // indirect
golang.org/x/term v0.43.0 // indirect
golang.org/x/text v0.37.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260519071638-aa98bba5eb94 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260519071638-aa98bba5eb94 // indirect
google.golang.org/grpc v1.81.1 // indirect
golang.org/x/net v0.57.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/term v0.45.0 // indirect
golang.org/x/text v0.40.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260713224248-f5fc221cf8c4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260713224248-f5fc221cf8c4 // indirect
google.golang.org/grpc v1.82.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/ini.v1 v1.67.1 // indirect
gopkg.in/ini.v1 v1.67.3 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading