Swiftpack.co - Package - SDGGiesbrecht/Workspace


macOS • Linux



Workspace automates management of Swift projects.

Πᾶν ὅ τι ἐὰν ποιῆτε, ἐκ ψυχῆς ἐργάζεσθε, ὡς τῷ Κυρίῳ καὶ οὐκ ἀνθρώποις.
Whatever you do, work from the heart, as working for the Lord and not for men.



(For a list of related projects, see here.)


Workspace provides command line tools.

Paste the following into a terminal to install or update them:

curl -sL https://gist.github.com/SDGGiesbrecht/4d76ad2f2b9c7bf9072ca1da9815d7e2/raw/update.sh | bash -s Workspace "https://github.com/SDGGiesbrecht/Workspace" 0.17.2 "workspace help" workspace arbeitsbereich


Workspace provides a library for use with the Swift Package Manager.

Simply add Workspace as a dependency in Package.swift:

let package = Package(
    name: "MyPackage",
    dependencies: [
        .package(url: "https://github.com/SDGGiesbrecht/Workspace", .upToNextMinor(from: Version(0, 17, 2))),
    targets: [
        .target(name: "MyTarget", dependencies: [
            .productItem(name: "WorkspaceConfiguration", package: "Workspace"),

The library’s module can then be imported in source files:

import WorkspaceConfiguration

The Workspace Workflow

(The following sample package is a real repository. You can use it to follow along.)

When the Repository Is Cloned

The need to hunt down workflow tools can deter contributors. On the other hand, including them in the repository causes a lot of clutter. To reduce both, when a project using Workspace is pulled, pushed, or cloned...

git clone https://github.com/SDGGiesbrecht/SamplePackage

...only one small piece of Workspace comes with it: A short script called “Refresh” that comes in two variants, one for each operating system.

Hmm... I wish I had more tools at my disposal... Hey! What if I...

Refresh the Project

To refresh the project, double‐click the Refresh script for the corresponding operating system. (If you are on Linux and double‐clicking fails or opens a text file, see here.)

Refresh opens a terminal window, and in it Workspace reports its actions while it sets the project folder up for development. (This may take a while the first time, but subsequent runs are faster.)

This looks better. Let’s get coding!

[Add this... Remove that... Change something over here...]

...All done. I wonder if I broke anything while I was working? Hey! It looks like I can...

Validate Changes

When the project seems ready for a push, merge, or pull request, validate the current state of the project by double‐clicking the Validate script.

Validate opens a terminal window and in it Workspace runs the project through a series of checks.

When it finishes, it prints a summary of which tests passed and which tests failed.

Oops! I never realized that would happen...


  1. Refresh before working.
  2. Validate when it looks complete.

Wow! That was so much easier than doing it all manually!

Applying Workspace to a Project

To apply Workspace to a project, run the following command in the root of the project’s repository. (This requires a full install.)

$ workspace refresh

By default, Workspace refrains from tasks which would involve modifying project files. Such tasks must be activated with a configuration file.


The Workspace project is maintained by Jeremy David Giesbrecht.

If Workspace saves you money, consider giving some of it as a donation.

If Workspace saves you time, consider devoting some of it to contributing back to the project.

Ἄξιος γὰρ ὁ ἐργάτης τοῦ μισθοῦ αὐτοῦ ἐστι.
For the worker is worthy of his wages.



Stars: 40
Help us keep the lights on



0.17.2 - Feb 17, 2019

Bug Fixes

  • Variables containing closures handle parameter documentation correctly.
  • Continuous integration configurations work around a bug in Travis CI involving an incompatibility between the version of the available Git tool and its global configuration.

0.17.1 - Feb 12, 2019

Bug Fixes

  • Unlabelled closure parameters are flagged if they are encountered during documentation generation.
  • Inherited conformances are no longer duplicated in documentation.
  • Documentation coverage checks are significantly faster.
  • Documentation generation is faster in some situations.

0.17.0 - Jan 29, 2019

Breaking Changes

  • A braceSpacing proofreading rule has been added.

New Features

  • Individual proofreading violations can now be suppressed by placing @exempt(from: ruleIdentifier) on the same line.

Bug Fixes

  • The quality of generated documentation has been improved:
    • Parameters, Throws and Returns callouts are handled separately.
    • Conformances and inheritance are documented.
    • Corresponding import statements and dependency declarations display on each page.
      • Extensions in a separate module display on the same page as the main symbol, but categorized under their respective import statements.
  • Documentation coverage validation checks individual parameters, not just entire methods.
  • The colon spacing rule is no longer vulnerable to crashing.
  • The accuracy of several proofreading rules has been improved.

0.16.0 - Jan 7, 2019

Breaking Changes

  • Old proofreading rules in the deprecation category have been removed.

New Features

  • Generated documentation includes operators and precedence groups.
  • Documentation generation warns when no publishing date is specified for copyright.
  • Constraints are displayed near symbol names in titles and lists in documentation.
  • File headers support several new file types, including .py and .inc.

Bug Fixes

  • The documentation scroll bar is properly displayed at the extreme right of the page.
  • Callouts are handled by documentation generation.
  • Documentation content is properly escaped for HTML.

0.14.2 - Nov 5, 2018

Bug Fixes

  • Dependency updates.