Swift PiecesPro

CLI reference

Every swiftpieces command. New here? Start with the Quickstart.

The CLI runs through npx, so there is nothing to install. It fetches pieces with your license key; it contains no source itself. For the first-time setup, follow the Quickstart.

Commands

CommandWhat it does
npx swiftpieces login sp_live_...Saves your license key to ~/.swiftpieces/auth.json
npx swiftpieces whoamiConfirms the saved key has Pro access
npx swiftpieces initCreates the SwiftPieces folder and swiftpieces.json
npx swiftpieces add wallet-stackAdds a piece and everything it depends on
npx swiftpieces add wallet-stack --overwriteReplaces files you already have
npx swiftpieces list --proLists every Pro piece with its id
npx swiftpieces add style-studio brief-financeInstalls Build Kit items as skills for your coding agent
npx swiftpieces add tool-review --agent codexPicks the agent: claude, codex, cursor or xcode (comma-separate for several)
npx swiftpieces add swift-pieces --globalInstalls a skill for every project instead of this one
npx swiftpieces list --kitLists every Build Kit item with its id

In CI, set SWIFTPIECES_LICENSE_KEY instead of running login.

How add behaves

  • Dependencies come along. Adding a template or themed screen also adds the design system and the pieces it composes.
  • Your edits are safe. Existing files are skipped unless you pass --overwrite.
  • Shaders come along. Metal files a piece needs are written next to it and compile into your app.
  • Kit ids go to your agent. Ids starting with style-, brief-, recipe- or tool- (and swift-pieces) are written as skills to your agent's skills folder, not to SwiftPieces/. They don't need swiftpieces.json.
  • Project settings are listed, not changed. Required capabilities and Info.plist keys print after install for you to apply.

swiftpieces.json

{
  "directory": "MyApp/SwiftPieces",
  "minIOSVersion": "17.0"
}

On this page