-
Notifications
You must be signed in to change notification settings - Fork 43
add claude config #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
s-yonkov-yonkov
wants to merge
1
commit into
master
Choose a base branch
from
add-claude-config
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+78
−0
Open
add claude config #260
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # multiapps-cli-plugin — CLAUDE.md | ||
|
|
||
| ## Project Role | ||
|
|
||
| This is the **multiapps-cli-plugin**: a Go-based Cloud Foundry CLI plugin that extends | ||
| the CF CLI (v8) with commands for managing MTA deployments (`deploy`, `undeploy`, | ||
| `bg-deploy`, `mtas`, `mta-ops`, `dmol`). It communicates with the | ||
| **multiapps-controller** backend via auto-generated OpenAPI clients (go-openapi/runtime). | ||
|
|
||
| ## Security Boundary | ||
|
|
||
| **This is an OPEN SOURCE repository.** | ||
| Never introduce proprietary logic, credentials, or internal company context into this | ||
| codebase. No SAP-internal service integrations, no hardcoded tokens or URLs. | ||
|
|
||
| ## Tech Stack | ||
|
|
||
| - **Language**: Go 1.25.4 (go modules — `go.mod` is the source of truth) | ||
| - **CF CLI integration**: `code.cloudfoundry.org/cli/v8` | ||
| - **REST clients**: auto-generated via `swagger generate client` (see `regen-client.sh`) | ||
| — do NOT hand-edit files under `clients/` | ||
| - **Testing**: Ginkgo v1 + Gomega (`github.com/onsi/ginkgo`, `github.com/onsi/gomega`) | ||
|
|
||
| ## Key Directory Layout | ||
|
|
||
| ``` | ||
| commands/ — CF CLI command implementations (deploy, undeploy, etc.) | ||
| clients/ — AUTO-GENERATED OpenAPI REST clients (v1 + v2); never edit manually | ||
| cli/ — CF CLI plugin registration and bootstrapping | ||
| util/ — shared helpers (HTTP, logging, formatting) | ||
| secure_parameters/ — secrets collection logic (--collect-secrets flag) | ||
| cfg/VERSION — authoritative version string consumed by build.sh | ||
| regen-client.sh — regenerate clients/ from multiapps-controller Swagger specs | ||
| ``` | ||
|
|
||
| ## Build Commands | ||
|
|
||
| **Local dev binary (current platform):** | ||
| ```bash | ||
| go build -ldflags "-X main.Version=$(cat cfg/VERSION)" -o multiapps-plugin | ||
| ``` | ||
|
|
||
| **All platforms (cross-compiled, output to `build/`):** | ||
| ```bash | ||
| ./build.sh | ||
| ``` | ||
| `build.sh` produces both static (`CGO_ENABLED=0`) and non-static variants for | ||
| linux/32, linux/64, linux/arm64, windows/32, windows/64, darwin/amd64, darwin/arm64. | ||
|
|
||
| ## Running Tests | ||
|
|
||
| ```bash | ||
| go test ./... | ||
| ``` | ||
| Or with Ginkgo's verbose output: | ||
| ```bash | ||
| ginkgo -r ./... | ||
| ``` | ||
|
|
||
| ## Regenerating the Go REST Client | ||
|
|
||
| Run `regen-client.sh` after the multiapps-controller Swagger specs change. The script | ||
| rebuilds the controller API module, then calls `swagger generate client` for both v1 | ||
| and v2. Copy the generated output into `clients/`. | ||
|
|
||
| ## Adding CLI Flags | ||
|
|
||
| New flags must be registered in the command's `GetPluginCommand()` `Options` map and | ||
| documented in the CF CLI help text. Update the parent `CLAUDE.md` documentation | ||
| checklist when adding user-visible flags. | ||
|
|
||
| ## Mandatory Formatting Rule | ||
|
|
||
| **Before completing any task or committing code, you MUST run:** | ||
| ```bash | ||
| go fmt ./... | ||
| ``` | ||
| All committed Go source must conform to standard `gofmt` formatting. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Large MTAR files are split into ≤45 MB chunks (max 50 chunks) and uploaded in parallel by default. The controller URL is auto-derived from the CF API endpoint (replaces first subdomain with
deploy-service) or configured viaMULTIAPPS_CONTROLLER_URL.Maybe we should add some description on how the file upload works. like spliting parallel upload etc