Skip to content

Add scripting command families#20

Merged
maniramezan merged 5 commits into
mainfrom
feature/scripting-command-families
May 22, 2026
Merged

Add scripting command families#20
maniramezan merged 5 commits into
mainfrom
feature/scripting-command-families

Conversation

@maniramezan
Copy link
Copy Markdown
Owner

@maniramezan maniramezan commented May 22, 2026

Summary

Adds typed command families for Make, Node, Npm, Yarn, Pnpm, Bun, Terraform, Kubectl, and Python so scripting-oriented tools can be composed through SwiftyShell with package-trait gating.

Changes

  • Added public fluent wrappers and command builders for Make, Node, Npm, Yarn, Pnpm, Bun, Terraform, Kubectl, and Python.
  • Added trait declarations, All umbrella wiring, CI trait detection, and reusable CI matrix entries.
  • Added mock-based tests for each new family.
  • Added DocC pages, updated the landing page, trait selection docs, getting started inventory, README, and shared agent guidance.

Testing

  • swift test --enable-all-traits (full surface)
  • swift test (default = Core only)
  • swift-format lint --strict --recursive Sources Tests Scripts
  • swift -warnings-as-errors Scripts/validate-traits.swift
  • swift -warnings-as-errors Scripts/validate-docc-coverage.swift
  • swift test -Xswiftc -warnings-as-errors
  • Full local trait matrix before adding Yarn/Pnpm/Bun: "" Git Brew Grep Fzf Rg Swift Gh Docker Make Node Npm Terraform Kubectl Python Rsync Tar Zip Unzip CommonUtilities All
  • Isolated build/test for new additional traits: Yarn, Pnpm, Bun
  • swift package -Xswiftc -warnings-as-errors --allow-writing-to-directory docs generate-documentation --target SwiftyShell --output-path docs --transform-for-static-hosting --hosting-base-path SwiftyShell
  • swift test --enable-all-traits --enable-code-coverage -Xswiftc -warnings-as-errors --show-codecov-path
  • swift test --enable-all-traits --enable-code-coverage -Xswiftc -warnings-as-errors
  • swift -warnings-as-errors Scripts/validate-code-coverage.swift --input .build/arm64-apple-macosx/debug/codecov/SwiftyShell.json --minimum-line-coverage 84 (90.53%)
  • make linux-ci

New Command Family Checklist

  • Trait declared in Package.swift (PascalCase, matches type name)
  • Trait added to the All umbrella enabled traits
  • Every source file in the family is wrapped in #if <Trait> ... #endif
  • Tests exist under Tests/SwiftyShellTests/<Trait>/ and are wrapped in #if <Trait>
  • swift build --traits <Trait> succeeds in isolation (covered by local trait checks)
  • swift test --enable-all-traits passes
  • Public API is documented per the rules in AGENTS.md
  • DocC landing page and trait table updated
  • swift Scripts/validate-traits.swift passes locally
  • swift-format lint --strict clean on every touched Swift file

Notes

  • Tests are mock/command-shape based, so CI does not require Node, npm, Yarn, pnpm, Bun, Terraform, kubectl, Make, or Python executables for these families.

@maniramezan maniramezan merged commit 315082b into main May 22, 2026
55 checks passed
@maniramezan maniramezan deleted the feature/scripting-command-families branch May 22, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant