{"id":15570808,"url":"https://github.com/keith/skit","last_synced_at":"2025-10-03T00:31:18.164Z","repository":{"id":143169489,"uuid":"89678520","full_name":"keith/skit","owner":"keith","description":"yaml -\u003e sourcekit -\u003e json","archived":false,"fork":false,"pushed_at":"2023-03-01T04:27:00.000Z","size":35,"stargazers_count":29,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-09T03:23:13.662Z","etag":null,"topics":["sourcekit","swift","xcode"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/keith.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-28T07:11:07.000Z","updated_at":"2024-07-30T12:14:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"388d009a-d41a-4031-a4f6-345124a5bc5b","html_url":"https://github.com/keith/skit","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fskit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fskit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fskit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keith%2Fskit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keith","download_url":"https://codeload.github.com/keith/skit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235053750,"owners_count":18928440,"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":["sourcekit","swift","xcode"],"created_at":"2024-10-02T17:45:07.856Z","updated_at":"2025-10-03T00:31:12.891Z","avatar_url":"https://github.com/keith.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# skit\n\n`skit` is a dead simple CLI for interacting with\n[`sourcekit`][sourcekit].\n\n## Usage\n\nHere's an example of a request that returns the structure of the source:\n\nCreate a `request.yaml`:\n\n```yaml\nkey.request: source.request.editor.open\nkey.name: \"example.swift\"\nkey.sourcetext: \"struct Foo {}\"\n```\n\nRun `skit`:\n\n```sh\n$ skit request.yaml\n```\n\nGet the response from `sourcekitd`:\n\n```json\n{\n  \"key.offset\": 0,\n  \"key.length\": 14,\n  \"key.diagnostic_stage\": \"source.diagnostic.stage.swift.parse\",\n  \"key.syntaxmap\": [\n    {\n      \"key.kind\": \"source.lang.swift.syntaxtype.keyword\",\n      \"key.offset\": 0,\n      \"key.length\": 6\n    },\n    {\n      \"key.kind\": \"source.lang.swift.syntaxtype.identifier\",\n      \"key.offset\": 7,\n      \"key.length\": 3\n    }\n  ],\n  \"key.substructure\": [\n    {\n      \"key.kind\": \"source.lang.swift.decl.struct\",\n      \"key.accessibility\": \"source.lang.swift.accessibility.internal\",\n      \"key.name\": \"Foo\",\n      \"key.offset\": 0,\n      \"key.length\": 13,\n      \"key.nameoffset\": 7,\n      \"key.namelength\": 3,\n      \"key.bodyoffset\": 12,\n      \"key.bodylength\": 0\n    }\n  ]\n}\n```\n\n`sourcekit` supports many request types, for details on what you can do\nsee the [protocol documentation][protocol].\n\n## Installation\n\n### [Homebrew](https://brew.sh/)\n\n```sh\n$ brew install keith/formulae/skit\n```\n\n### [Docker](https://www.docker.com/) ([hub page][hub])\n\n```sh\n$ docker pull smileykeith/skit:TAG\n```\n\nNOTE: The tags for docker line up with the git tags on this repo.\n\n### Manually\n\n```sh\n$ make install\n```\n\n## Resources\n\n- The [protocol documentation][protocol] defines most of the requests\n  you can use with `sourcekit`\n\n- [`SourceKitten`](https://github.com/jpsim/SourceKitten/) provides a\n  much better interface for specific requests, meaning you don't need to\n  deal with the implementation details of `sourcekit`\n\n- `sourcekit` is [open source!][sourcekit] so you can read the source\n  for more details on how the pieces fit together\n\n- JP Simard (the author of `SourceKitten`) has written some [blog\n  posts](http://www.jpsim.com/uncovering-sourcekit/) and done [a\n  talk](https://news.realm.io/news/appbuilders-jp-simard-sourcekit/)\n  about how `sourcekit` works\n\n- If you're interested in reproducing something that Xcode does, you can\n  see the communication between Xcode and `sourcekitd` by setting\n  `SOURCEKIT_LOGGING=3` and launching Xcode\n\n[hub]: https://hub.docker.com/r/smileykeith/skit/\n[protocol]: https://github.com/apple/swift/blob/master/tools/SourceKit/docs/Protocol.md\n[sourcekit]: https://github.com/apple/swift/tree/master/tools/SourceKit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeith%2Fskit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeith%2Fskit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeith%2Fskit/lists"}