{"id":19233726,"url":"https://github.com/brightdigit/sappi","last_synced_at":"2025-10-13T22:02:08.755Z","repository":{"id":81650775,"uuid":"297450873","full_name":"brightdigit/Sappi","owner":"brightdigit","description":"Command Line Tool for Gathering System Information using Swift Argument Parser","archived":false,"fork":false,"pushed_at":"2022-01-14T20:52:31.000Z","size":3724,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T09:51:13.818Z","etag":null,"topics":["arm","hardware","memory-usage","raspberry-pi","swift","swift-argument-parser","system-information"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brightdigit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-09-21T20:15:52.000Z","updated_at":"2025-03-24T11:22:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"f41f498b-7387-4151-bc7c-02b37542038a","html_url":"https://github.com/brightdigit/Sappi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightdigit%2FSappi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightdigit%2FSappi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightdigit%2FSappi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightdigit%2FSappi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightdigit","download_url":"https://codeload.github.com/brightdigit/Sappi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249996257,"owners_count":21358097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm","hardware","memory-usage","raspberry-pi","swift","swift-argument-parser","system-information"],"created_at":"2024-11-09T16:11:40.408Z","updated_at":"2025-10-13T22:02:03.720Z","avatar_url":"https://github.com/brightdigit.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u0026nbsp;\n\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"Sappi\" title=\"Sappi\" src=\"Assets/logo.svg\" height=\"200\"\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eSappi\u003c/h1\u003e\n\nCommand Line Tool for Gathering System Information using Swift Argument Parser\n\n[![SwiftPM](https://img.shields.io/badge/SPM-Linux%20%7C%20iOS%20%7C%20macOS%20%7C%20watchOS%20%7C%20tvOS-success?logo=swift)](https://swift.org)\n[![Twitter](https://img.shields.io/badge/twitter-@brightdigit-blue.svg?style=flat)](http://twitter.com/brightdigit)\n![GitHub](https://img.shields.io/github/license/brightdigit/Sappi)\n![GitHub issues](https://img.shields.io/github/issues/brightdigit/Sappi)\n\n[![macOS](https://github.com/brightdigit/Sappi/workflows/macOS/badge.svg)](https://github.com/brightdigit/Sappi/actions?query=workflow%3AmacOS)\n[![ubuntu](https://github.com/brightdigit/Sappi/workflows/ubuntu/badge.svg)](https://github.com/brightdigit/Sappi/actions?query=workflow%3Aubuntu)\n[![Travis (.com)](https://img.shields.io/travis/com/brightdigit/Sappi?logo=travis\u0026?label=travis-ci)](https://travis-ci.com/brightdigit/Sappi)\n[![Bitrise](https://img.shields.io/bitrise/0271aac7908e09e7?logo=bitrise\u0026?label=bitrise\u0026token=xFr5fBpmZrMixL-YQKEhRQ)](https://app.bitrise.io/app/0271aac7908e09e7)\n[![CircleCI](https://img.shields.io/circleci/build/github/brightdigit/Sappi?logo=circleci\u0026?label=circle-ci\u0026token=f7c9bff37b0287d33ed3796b933ee2c1a425f9f2)](https://app.circleci.com/pipelines/github/brightdigit/Sappi)\n\n[![Codecov](https://img.shields.io/codecov/c/github/brightdigit/Sappi)](https://codecov.io/gh/brightdigit/Sappi)\n[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/brightdigit/Sappi)](https://www.codefactor.io/repository/github/brightdigit/Sappi)\n[![codebeat badge](https://codebeat.co/badges/c47b7e58-867c-410b-80c5-57e10140ba0f)](https://codebeat.co/projects/github-com-brightdigit-Sappi-main)\n[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/brightdigit/Sappi)](https://codeclimate.com/github/brightdigit/Sappi)\n[![Code Climate technical debt](https://img.shields.io/codeclimate/tech-debt/brightdigit/Sappi?label=debt)](https://codeclimate.com/github/brightdigit/Sappi)\n[![Code Climate issues](https://img.shields.io/codeclimate/issues/brightdigit/Sappi)](https://codeclimate.com/github/brightdigit/Sappi)\n[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)\n\n```bash\n$ sappi -h\nOVERVIEW: Prints and exports system information.\n\nUSAGE: sappi \u003csubcommand\u003e\n\nOPTIONS:\n  -h, --help              Show help information.\n\nSUBCOMMANDS:\n  print (default)         Prints system information out to the console.\n  export                  Exports system information in any format.\n\n  See 'sappi help \u003csubcommand\u003e' for detailed help.\n\n\n$ sappi \nCPU Usage: 6%\nMemory Usage: 95%\nUsage of VM: 28% of 1000.24GB\nUsage of Preboot: 28% of 1000.24GB\nUsage of Media: 42% of 8001.35GB\nUsage of Google Drive: 41% of 16.1GB\nUsage of Update: 28% of 1000.24GB\nUsage of Photos: 26% of 2000.18GB\nUsage of Macintosh HD: 28% of 1000.24GB\nUsage of Time Machine: 77% of 5000.28GB\nProcesses: 662\nIPv6 address for en0: fe80::10cb:4190:8fe4:ed28\nIPv4 address for en0: 192.168.1.76\nIPv6 address for en0: 2600:1702:4050:7d30:4e9:86:816d:7e4d\nIPv6 address for en0: 2600:1702:4050:7d30:88d3:849e:4a65:6aa3\nIPv6 address for en0: 2600:1702:4050:7d30::51e\nIPv6 address for en1: fe80::10c0:5193:8bf8:b99\nIPv6 address for en1: 2600:1702:4050:7d30:cdb:5f0f:d5be:d86a\nIPv6 address for en1: 2600:1702:4050:7d30:192e:3dc6:3d66:6acc\nIPv4 address for en1: 192.168.1.82\nIPv6 address for en1: 2600:1702:4050:7d30::72f\nIPv6 address for en1: 2600:1702:4050:7d30:2193:e7f4:7fc4:97ef\n```\n\n# Introduction\n\nThis is a simple command line Swift Package for displaying system information as well as showing the power of the Swift Argument Parser:\n\n* An example of optional **Arguments**\n* Using enums in **Options**\n* How to use **Flags** for verbose information\n\n# Installation\n\nThe simplest way to install this application is via **mint**. Install **mint** via homebrew then run:\n\n```bash\n$ mint install brightdigit/Sappi\n```\n\n# Usage \n\n## Specifying Information _Flags_\n\nUsing flags you can specify specific system information. There are 5 accepted `InfoType` values:\n\n* `--cpu` CPU and Core Usage. Includes temperature information in verbose mode.\n* `--memory` Memory Usage.\n* `--disks` Disk Volume Usage.\n* `--processes`  Number of Active Processes.\n* `--network` Each connected network and address.\n\n\n```bash\n$ sappi --cpu\nCPU Usage: 10%\n```\n\nIf no arguments are supplied then all `InfoType` values are assumed:\n\n```bash\n$ sappi\nCPU Usage: 11%\nMemory Usage: 37%\nUsage of Media: 42% of 8001.35GB\nUsage of Google Drive: 41% of 16.1GB\nUsage of VM: 29% of 1000.24GB\nUsage of Preboot: 29% of 1000.24GB\nUsage of Update: 29% of 1000.24GB\nUsage of Time Machine: 77% of 5000.28GB\nUsage of Macintosh HD: 29% of 1000.24GB\nUsage of Photos: 26% of 2000.18GB\nProcesses: 489\nIPv6 address for en0: fe80::1ca8:35c4:4859:684e\nIPv6 address for en0: 2600:1702:4050:7d30:4e9:86:816d:7e4d\nIPv6 address for en0: 2600:1702:4050:7d30:64a9:183f:3960:86bc\nIPv4 address for en0: 192.168.1.76\nIPv6 address for en0: 2600:1702:4050:7d30::51e\nIPv6 address for en1: fe80::81f:e405:7602:4003\nIPv6 address for en1: 2600:1702:4050:7d30:cdb:5f0f:d5be:d86a\nIPv6 address for en1: 2600:1702:4050:7d30:30dc:a334:3675:e05a\nIPv4 address for en1: 192.168.1.82\nIPv6 address for en1: 2600:1702:4050:7d30::72f\n```\n\nMultiple `InfoType` values are accepted:\n\n```bash\n$ sappi --cpu --disks\nCPU Usage: 10%\nUsage of Media: 42% of 8001.35GB\nUsage of Time Machine: 77% of 5000.28GB\nUsage of Photos: 26% of 2000.18GB\nUsage of Update: 29% of 1000.24GB\nUsage of Macintosh HD: 29% of 1000.24GB\nUsage of Preboot: 29% of 1000.24GB\nUsage of Google Drive: 41% of 16.1GB\nUsage of VM: 29% of 1000.24GB\n```\n\nFor more information, check out [the code documentation page on `InfoType` here.](Documentation/Reference/enums/InfoType.md)\n\n## Formatting _Options_ For Values\n\n**Sappi** gives you the ability to format cetain numerical values. \n\nValues such _CPU_, _Memory_, and _Disk_ allow for different ways to display usage or availability in relationship to the total by using the `--value-format=` option:\n\n* `percent` - percent value\n* `ratio` - units / total units\n* `percentTotal` - percent / total units\n* `default` - `percent` for _CPU_ and _Memory, `percentTotal` for _Disks_\n\n```bash\n$ sappi --cpu --memory --disks --value-format=percent\nCPU Usage: 20%\nMemory Usage: 98%\nUsage of Google Drive: 41%\nUsage of Update: 15%\nUsage of System: 15%\nUsage of VM: 15%\nUsage of Preboot: 15%\n```\n\nor\n\n```bash\n$ sappi --cpu --memory --disks --value-format=ratio  \nCPU Usage: 2416633 idle, 3053548 total\nMemory Usage: 43 free, 6504 total\nUsage of Update: 1619969011712 available, 1920140099584 total\nUsage of Preboot: 1619969011712 available, 1920140099584 total\nUsage of VM: 1619969011712 available, 1920140099584 total\nUsage of Google Drive: 9482440704 available, 16106127360 total\nUsage of System: 1619969011712 available, 1920140099584 total\n```\n\nFor more information on the different value formats, check out [the documentation page on `RatioFormat` here.](Documentation/Reference/enums/RatioFormat.md)\n\n## Getting CPU Temperature\n\n__Sappi__ also has the ability to get various temperature available for your hardware. First you'll need to enable the `--verbose` option to get this information:\n\n```bash\n$ sappi --cpu --verbose\nCPU Usage: 20%\nCPU 1 Usage: 31%\nCPU 2 Usage: 13%\nCPU 3 Usage: 26%\nCPU 4 Usage: 11%\nCPU Die Temperature: 64.0°C\nCore 1 Temperature: 64.0°C\n```\n\n__Sappi__ also gives you the option to format the temperature in various scales:\n\n* `celsuis` Celsuis Scale _default_\n* `fahrenheit` Fahrenheit Scale\n* `kelvin` Kelvin Scale\n* `rankine` Rankine Scale\n* `delisle` Delisle Scale\n* `newton` Newton Scale\n* `réaumur` Réaumur Scale\n* `rømer` Rømer Scale\n\nSo for instance if you want your temperatures in Kelvin, simply use:\n\n```bash\n$ sappi --cpu --verbose --temperature-unit=kelvin\nCPU Usage: 20%\nCPU 1 Usage: 31%\nCPU 2 Usage: 13%\nCPU 3 Usage: 26%\nCPU 4 Usage: 11%\nCPU Die Temperature: 324.15°K\nCore 1 Temperature: 331.15°K\n```\n\nFor more information, check out [the documentation page for `TemperatureUnit` here.](Documentation/Reference/enums/TemperatureUnit.md)\n\n## Exporting Your Data\n\nLastly, __Sappi__ supports exporting data in various formats via the `exporting` subcommand. You've already seen the default subcommand `print` which only supports the `text` format.\n\n```bash\n$ sappi --cpu --disks\nCPU Usage: 10%\nUsage of Media: 42% of 8001.35GB\nUsage of Time Machine: 77% of 5000.28GB\nUsage of Photos: 26% of 2000.18GB\nUsage of Update: 29% of 1000.24GB\nUsage of Macintosh HD: 29% of 1000.24GB\nUsage of Preboot: 29% of 1000.24GB\nUsage of Google Drive: 41% of 16.1GB\nUsage of VM: 29% of 1000.24GB\n$ sappi print --cpu --disks\nCPU Usage: 10%\nUsage of Media: 42% of 8001.35GB\nUsage of Time Machine: 77% of 5000.28GB\nUsage of Photos: 26% of 2000.18GB\nUsage of Update: 29% of 1000.24GB\nUsage of Macintosh HD: 29% of 1000.24GB\nUsage of Preboot: 29% of 1000.24GB\nUsage of Google Drive: 41% of 16.1GB\nUsage of VM: 29% of 1000.24GB\n$ sappi export --cpu --disks --export-format=text\nCPU Usage: 10%\nUsage of Media: 42% of 8001.35GB\nUsage of Time Machine: 77% of 5000.28GB\nUsage of Photos: 26% of 2000.18GB\nUsage of Update: 29% of 1000.24GB\nUsage of Macintosh HD: 29% of 1000.24GB\nUsage of Preboot: 29% of 1000.24GB\nUsage of Google Drive: 41% of 16.1GB\nUsage of VM: 29% of 1000.24GB\n```\n\nTo export in various formats, use the subcommand `export`. Then use the `--format=` to specify a different format other than `text`:\n\n* `text` - Standard text format _default_\n* `json` - JSON format (ignores  `--value-format` and `--verbose`)\n* `csv` - Comma-Separated Values \n\nFor instance, to export all the CPU values including temperature (in Fahrenheit) in csv format:\n\n```bash\n$ sappi export --format=csv --cpu --verbose --temperature-unit=fahrenheit\nCPU,Usage,2005257,2138565\nCPU,CPU 1,1636746,2138725\nCPU,CPU 2,2117266,2138553\nCPU,CPU 3,1772240,2138579\nCPU,CPU 4,2119185,2138551\nCPU,CPU 5,1847133,2138575\nCPU,CPU 6,2119695,2138548\nCPU,CPU 7,1898309,2138571\nCPU,CPU 8,2119747,2138546\nCPU,CPU 9,1941927,2138567\nCPU,CPU 10,2119781,2138544\nCPU,CPU 11,1990327,2138564\nCPU,CPU 12,2120116,2138541\nCPU,CPU 13,2008236,2138560\nCPU,CPU 14,2120426,2138539\nCPU,CPU 15,2032377,2138556\nCPU,CPU 16,2120604,2138535\nCPU,Die Temperature °F,,123.8\nCPU,Core 1 Temperature °F,,123.8\nCPU,Core 2 Temperature °F,,123.8\nCPU,Core 3 Temperature °F,,122.0\nCPU,Core 4 Temperature °F,,123.8\n```\n\nTo export the data in JSON format use:\n\n```bash\nsappi export --format=json                     \n{\n  \"cpu\" : {\n    \"cores\" : [\n      {\n        \"idle\" : 1646402,\n        \"sum\" : 2151846\n      },...\n    ],\n    \"cpu\" : {\n      \"idle\" : 2017769,\n      \"sum\" : 2151686\n    },\n    \"temperatures\" : [\n      {\n        \"key\" : \"TC0P\",\n        \"value\" : 51\n      },...\n    ]\n  },\n  \"memory\" : {\n    \"free\" : 92161,\n    \"total\" : 131066\n  },\n  \"networks\" : [\n    {\n      \"address\" : \"192.168.1.76\",\n      \"family\" : 0,\n      \"name\" : \"en0\"\n    },...\n  ],\n  \"processes\" : 561,\n  \"volumes\" : [\n    {\n      \"available\" : 694472245248,\n      \"name\" : \"Macintosh HD\",\n      \"total\" : 1000240963584\n    },...\n  ]\n\n```\n\nFor more information, check out [the documentation page for `ExportFormat` here.](Documentation/Reference/enums/ExportFormat.md)\n\n# Support \n\nIf you have any questions or issues with the application, feel free to post [an issue here.](issues) \n\n# License \n\nThis code is distributed under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightdigit%2Fsappi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrightdigit%2Fsappi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightdigit%2Fsappi/lists"}