Skip to content

wrkstrm/swift-cli-kit

Repository files navigation

Swift CLI Kit

Swift CLI Kit is a small toolbox of developer commands built on Wrkstrm’s CommonShell/CommonCLI. It also provides public utilities that follow our JSON formatting policy (human‑friendly, deterministic, atomic writes).

Random Strings and Emoji

Generate random characters:

swift run --package-path code/mono/orgs/wrkstrm/public/spm/clis/swift-cli-kit swift-cli-kit random --length 6 --kind ascii

Generate a random emoji from curated sets (status, momentum, work, conventions/all):

swift run --package-path code/mono/orgs/wrkstrm/public/spm/clis/swift-cli-kit swift-cli-kit random \
  --kind emoji --category conventions --length 1

What’s New

JSON Formatter (Human‑friendly)

Format JSON files with a single, consistent policy (prettyPrinted + sortedKeys + withoutEscapingSlashes). Supports globs, check mode, and stdin/stdout.

# In‑place files
swift run --package-path code/mono/orgs/wrkstrm/public/spm/clis/swift-cli-kit swift-cli-kit json format \
  --file path/to/a.json --file path/to/b.json

# Mirror to review dir (originals untouched)
swift run --package-path code/mono/orgs/wrkstrm/public/spm/clis/swift-cli-kit swift-cli-kit json format \
  --glob "**/*.json" --write-to .clia/tmp/formatted

# Check only (CI)
swift run --package-path code/mono/orgs/wrkstrm/public/spm/clis/swift-cli-kit swift-cli-kit json format \
  --glob ".clia/agents/**/*.json" --check --quiet

# Stream format
cat data.json | swift run --package-path code/mono/orgs/wrkstrm/public/spm/clis/swift-cli-kit swift-cli-kit json format --stdin

Docs:

  • JSON formatter usage: code/mono/orgs/wrkstrm/public/spm/clis/swift-cli-kit/sources/cli-kit/Documentation.docc/JSONFormatter-Usage.md
  • Design & Problem/Solution: see the other JSONFormatter docs in the same DocC bundle

About

Opinionated CLI things. Like Emoji.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages