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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Report a security vulnerability
url: https://github.com/zongqichen/cfs/security/advisories/new
url: https://github.com/zongqichen/cloud-foundry-cli-contexts/security/advisories/new
about: Report security issues privately. Never include credentials in a public issue.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ permissions:

jobs:
release:
if: github.repository == 'zongqichen/cfs'
if: github.repository == 'zongqichen/cloud-foundry-cli-contexts'
runs-on: ubuntu-latest
timeout-minutes: 30
environment: release
Expand Down
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ contract may still change while cfs is pre-1.0.

## [Unreleased]

### Changed

- Renamed the canonical repository to `cloud-foundry-cli-contexts` for clearer
discovery while preserving the `cfs` command and original Go module path.

## [0.3.0] - 2026-09-23

### Added
Expand Down Expand Up @@ -93,8 +98,8 @@ contract may still change while cfs is pre-1.0.
- Linux and macOS release builds, checksums, provenance, CI, smoke tests, and an
Apache-2.0 license.

[Unreleased]: https://github.com/zongqichen/cfs/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/zongqichen/cfs/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/zongqichen/cfs/compare/v0.1.1...v0.2.0
[0.1.1]: https://github.com/zongqichen/cfs/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/zongqichen/cfs/releases/tag/v0.1.0
[Unreleased]: https://github.com/zongqichen/cloud-foundry-cli-contexts/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/zongqichen/cloud-foundry-cli-contexts/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/zongqichen/cloud-foundry-cli-contexts/compare/v0.1.1...v0.2.0
[0.1.1]: https://github.com/zongqichen/cloud-foundry-cli-contexts/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/zongqichen/cloud-foundry-cli-contexts/releases/tag/v0.1.0
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ officially representing the community in public spaces.
## Enforcement

Report unacceptable behavior privately through the repository's
[private report form](https://github.com/zongqichen/cfs/security/advisories/new)
[private report form](https://github.com/zongqichen/cloud-foundry-cli-contexts/security/advisories/new)
and prefix the title with `Conduct:`. Reports will be reviewed promptly and
fairly, and the privacy and security of reporters will be respected.

Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# cfs: isolated Cloud Foundry CLI contexts

[![CI](https://github.com/zongqichen/cfs/actions/workflows/ci.yml/badge.svg)](https://github.com/zongqichen/cfs/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/zongqichen/cfs?include_prereleases&sort=semver)](https://github.com/zongqichen/cfs/releases)
[![CI](https://github.com/zongqichen/cloud-foundry-cli-contexts/actions/workflows/ci.yml/badge.svg)](https://github.com/zongqichen/cloud-foundry-cli-contexts/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/zongqichen/cloud-foundry-cli-contexts?include_prereleases&sort=semver)](https://github.com/zongqichen/cloud-foundry-cli-contexts/releases)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)

Run independent Cloud Foundry CLI targets in parallel.
Expand All @@ -19,14 +19,17 @@ targets.
## Quick start

Install the [official CF CLI](https://github.com/cloudfoundry/cli), then download
`cfs` from [GitHub Releases](https://github.com/zongqichen/cfs/releases) or build
`cfs` from [GitHub Releases](https://github.com/zongqichen/cloud-foundry-cli-contexts/releases) or build
it with Go 1.26.8+:

```sh
go install github.com/zongqichen/cfs/cmd/cfs@latest
cfs setup
```

The Go module keeps its original `github.com/zongqichen/cfs` path for
compatibility.

Prebuilt binaries support Linux and macOS on x86-64 and arm64. Put the shim
directory printed by `cfs setup` first on `PATH`, open a new shell, and run
`cfs doctor`.
Expand Down Expand Up @@ -122,7 +125,7 @@ discover existing contexts, fail closed on ambiguity, and preserve user
authorization. Install it for Codex, Claude Code, or another supported agent:

```sh
npx skills add zongqichen/cfs --skill cfs
npx skills add zongqichen/cloud-foundry-cli-contexts --skill cfs
```

To make invocation explicit, add `Use $cfs for Cloud Foundry context
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fixes are not routinely backported to earlier releases.
## Reporting a vulnerability

Please do not open a public issue for a suspected vulnerability. Use the
[private vulnerability reporting form](https://github.com/zongqichen/cfs/security/advisories/new).
[private vulnerability reporting form](https://github.com/zongqichen/cloud-foundry-cli-contexts/security/advisories/new).

Include the affected version, operating system, reproduction steps, and the
expected security impact. Do not include live Cloud Foundry credentials, access
Expand Down
4 changes: 4 additions & 0 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ but does not publish GitHub archives on its own:
$ go install github.com/zongqichen/cfs/cmd/cfs@v0.1.0
```

The Go module intentionally keeps its original `github.com/zongqichen/cfs`
path after the repository rename. Changing it would break existing installation
and update paths.

After pushing the immutable tag and manually running the Release workflow,
request it through the public Go proxy:

Expand Down
4 changes: 2 additions & 2 deletions internal/app/command_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestUpdateReportsAvailableRelease(t *testing.T) {
}
for _, expected := range []string{
"Update available: 0.2.0 -> 0.3.0",
"https://github.com/zongqichen/cfs/releases/tag/v0.3.0",
"https://github.com/zongqichen/cloud-foundry-cli-contexts/releases/tag/v0.3.0",
"go install github.com/zongqichen/cfs/cmd/cfs@v0.3.0",
"cfs setup",
"cfs doctor",
Expand Down Expand Up @@ -226,7 +226,7 @@ func availableUpdate() updatecheck.Result {
LatestVersion: "0.3.0",
UpdateAvailable: true,
Status: updatecheck.StatusUpdateAvailable,
ReleaseURL: "https://github.com/zongqichen/cfs/releases/tag/v0.3.0",
ReleaseURL: "https://github.com/zongqichen/cloud-foundry-cli-contexts/releases/tag/v0.3.0",
Commands: []string{
"go install github.com/zongqichen/cfs/cmd/cfs@v0.3.0",
"cfs setup",
Expand Down
7 changes: 4 additions & 3 deletions internal/updatecheck/updatecheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ import (
)

const (
DefaultEndpoint = "https://api.github.com/repos/zongqichen/cfs/releases?per_page=100"
DefaultEndpoint = "https://api.github.com/repos/zongqichen/cloud-foundry-cli-contexts/releases?per_page=100"
DefaultCheckInterval = 24 * time.Hour
DefaultHTTPTimeout = 3 * time.Second

cacheVersion = 1
cacheFileName = "update-check.json"
cacheReadLimit = 64 * 1024
responseReadLimit = 1024 * 1024
repositoryReleaseURL = "https://github.com/zongqichen/cfs/releases/tag/"
repositoryReleaseURL = "https://github.com/zongqichen/cloud-foundry-cli-contexts/releases/tag/"
goInstallPackage = "github.com/zongqichen/cfs/cmd/cfs"
)

type Status string
Expand Down Expand Up @@ -225,7 +226,7 @@ func compare(currentVersion, latestVersion string) Result {
result.Status = StatusUpdateAvailable
result.UpdateAvailable = true
result.Commands = []string{
"go install github.com/zongqichen/cfs/cmd/cfs@" + latest,
"go install " + goInstallPackage + "@" + latest,
"cfs setup",
"cfs doctor",
}
Expand Down
15 changes: 15 additions & 0 deletions internal/updatecheck/updatecheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ func TestCheckSelectsHighestPublishedSemanticVersion(t *testing.T) {
}
}

func TestRepositoryLocationsKeepGoInstallCompatibility(t *testing.T) {
const canonicalRepository = "zongqichen/cloud-foundry-cli-contexts"
if !strings.Contains(DefaultEndpoint, canonicalRepository) {
t.Fatalf("default endpoint = %q, want canonical repository", DefaultEndpoint)
}

result := compare("0.2.0", "v0.3.0")
if !strings.Contains(result.ReleaseURL, canonicalRepository) {
t.Fatalf("release URL = %q, want canonical repository", result.ReleaseURL)
}
if got, want := result.Commands[0], "go install github.com/zongqichen/cfs/cmd/cfs@v0.3.0"; got != want {
t.Fatalf("install command = %q, want %q", got, want)
}
}

func TestCompareVersionStates(t *testing.T) {
tests := []struct {
name string
Expand Down
Loading