{"id":24801217,"url":"https://github.com/MasterJ93/ATProtoKit","last_synced_at":"2025-10-13T02:31:41.101Z","repository":{"id":222780200,"uuid":"758142409","full_name":"MasterJ93/ATProtoKit","owner":"MasterJ93","description":"A straightforward solution for using the AT Protocol and Bluesky, written in Swift.","archived":false,"fork":false,"pushed_at":"2025-10-02T05:14:41.000Z","size":424743,"stargazers_count":174,"open_issues_count":15,"forks_count":34,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-10-02T07:14:13.312Z","etag":null,"topics":["api","atproto","atprotocol","bluesky","decentralized","lexicon","social-media","swift","swift-package-manager","xrpc"],"latest_commit_sha":null,"homepage":"https://atprotokit.cjrriley.com/documentation/atprotokit/","language":"Swift","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/MasterJ93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"MasterJ93"}},"created_at":"2024-02-15T17:50:18.000Z","updated_at":"2025-10-02T05:14:45.000Z","dependencies_parsed_at":"2024-07-22T07:28:18.418Z","dependency_job_id":"922230d0-176e-4a93-ba3c-51cf72219a67","html_url":"https://github.com/MasterJ93/ATProtoKit","commit_stats":{"total_commits":1286,"total_committers":11,"mean_commits":116.9090909090909,"dds":"0.017884914463452528","last_synced_commit":"73aeb944443c4abe80405c66cb6fabc52a065be3"},"previous_names":["masterj93/atprotokit"],"tags_count":126,"template":false,"template_full_name":null,"purl":"pkg:github/MasterJ93/ATProtoKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterJ93%2FATProtoKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterJ93%2FATProtoKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterJ93%2FATProtoKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterJ93%2FATProtoKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MasterJ93","download_url":"https://codeload.github.com/MasterJ93/ATProtoKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterJ93%2FATProtoKit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014022,"owners_count":26085346,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","atproto","atprotocol","bluesky","decentralized","lexicon","social-media","swift","swift-package-manager","xrpc"],"created_at":"2025-01-30T04:02:23.470Z","updated_at":"2025-10-13T02:31:41.088Z","avatar_url":"https://github.com/MasterJ93.png","language":"Swift","funding_links":["https://github.com/sponsors/MasterJ93"],"categories":["Swift"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/MasterJ93/ATProtoKit/blob/main/Sources/ATProtoKit/ATProtoKit.docc/Resources/atprotokit_icon.png\" height=\"128\" alt=\"A icon for ATProtoKit, which contains three stacks of rounded rectangles in an isometric top view. At the top stack, the at symbol is in a thick weight, with clouds as the symbol’s colour. The three stacks are darker shades of blue.\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eATProtoKit\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eA straightforward solution for using the AT Protocol and Bluesky, written in Swift.\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FMasterJ93%2FATProtoKit%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/MasterJ93/ATProtoKit)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FMasterJ93%2FATProtoKit%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/MasterJ93/ATProtoKit)\n\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/masterj93/atprotokit?logo=github)](https://github.com/MasterJ93/ATProtoKit)\n[![GitHub Repo stars](https://img.shields.io/github/stars/masterj93/atprotokit?style=flat\u0026logo=github)](https://github.com/MasterJ93/ATProtoKit)\n\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![Static Badge](https://img.shields.io/badge/Follow-%40cjrriley.ca-0073fa?style=flat\u0026logo=bluesky\u0026labelColor=%23151e27\u0026link=https%3A%2F%2Fbsky.app%2Fprofile%2Fcjrriley.ca)](https://bsky.app/profile/cjrriley.ca)\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/masterj93?color=%23cb5f96\u0026link=https%3A%2F%2Fgithub.com%2Fsponsors%2FMasterJ93)](https://github.com/sponsors/MasterJ93)\n\n\u003c/div\u003e\n\n---\n\u003e [!CAUTION]\n\u003e ***This API library is highly unstable. Things will change. Things are incomplete. Things will break. Until the project reaches version 1.0.0, stability will not be guaranteed.***\n\nATProtoKit is an easy-to-understand API library that leverages the AT Protocol with the type-safety and ease-of-use you’ve come to expect with the Swift programming language. Whether you’re building a bot, a server app, or just another user-facing Bluesky client, this project should hopefully get you up to speed.\n\nThis Swift package mainly focuses on the client side of the AT Protocol. This is essentially a combination of the [`api`](https://github.com/bluesky-social/atproto/tree/main/packages/api) and [`xrpc`](https://github.com/bluesky-social/atproto/tree/main/packages/xrpc) packages from the official [`atproto`](https://github.com/bluesky-social/atproto) TypeScript repository.\n\n\n## Example Usage\n```swift\nlet config = ATProtocolConfiguration()\n\nTask {\n    print(\"Starting application...\")\n\n    do {\n        try await config.authenticate(with: \"lucy.bsky.social\", password: \"hunter2\")\n\n        let atProtoKit = await ATProtoKit(sessionConfiguration: config)\n        let atProtoBluesky = ATProtoBluesky(atProtoKitInstance: atProtoKit)\n\n        let postResult = try await atProtoBluesky.createPostRecord(text: \"Hello Bluesky!\")\n\n        print(postResult)\n    } catch {\n        print(\"Error: \\(error)\")\n    }\n}\n```\n\n## Motivation\nI believe Bluesky and its accompanying AT Protocol gives the perfect balance between embracing decentralization and simplifying the user experience. Because of this, I wanted a way for Swift developers to use the AT Protocol in a way that feels right at home, both client-side with Apple's platforms, and server-side with Linux. For this reason, I decided to open source this project.\n\n\n## Features\n- [x] Full compatibility with Apple’s APIs for each of the platforms.\n- [x] Written with adherence to the Swift API Design Guidelines.\n- [ ] Well-written documentation for all of the AT Protocol and Bluesky APIs.\n- [x] A RichText helper to parse text into the applicable facets.\n- [x] Easily validate different identifiers.\n- [ ] A powerful Firehose API that retrieves and filters events and records in real-time.\n- [ ] A logging tool for easy debugging.\n\n\u003e [!NOTE]\n\u003e Not all features above have been implemented; however, they will be, soon.\n\n\n## Installation\nYou can use the Swift Package Manager to download and import the library into your project:\n```swift\ndependencies: [\n    .package(url: \"https://github.com/MasterJ93/ATProtoKit.git\", from: \"0.32.0\")\n]\n```\n\nThen under `targets`:\n```swift\ntargets: [\n    .target(\n        // name: \"[name of target]\",\n        dependencies: [\n            .product(name: \"ATProtoKit\", package: \"atprotokit\")\n        ]\n    )\n]\n```\n\n## Roadmap\nThe Projects page isn't completed, but you can still view it through its [Projects](https://github.com/users/MasterJ93/projects/2) page.\n\n## Quick Start\nAs shown in the Example Usage, it all starts with `ATProtocolConfiguration`:\n```swift\nimport ATProtoKit\n\nlet config = ATProtocolConfiguration()\n```\n\nBy default, `ATProtocolConfiguration` conforms to `https://bsky.social`. However, if you’re using a different distributed service, you can specify the URL:\n```swift\nlet result = ATProtocolConfiguration(pdsURL: \"https://example.social\")\n```\n\nAfter that, use the `authenticate()` method, and pass in the handle and password of the user account. Once you've passed in the `ATProtocolConfiguration` object to the `ATProtoKit` `class`, use the `getUserSession()` method, as well as the `ATProtocolConfiguration.sessionConfiguration.keychainProtocol` property. These two contains all of the elements you need, such as the session tokens, decentralized identifier (DID), and service endpoint:\n```swift\nTask {\n    do {\n        try await config.authenticate(with: \"lucy.bsky.social\", appPassword: \"hunter2\")\n\n        // The session object is contains in the `ATProtoKit` object:\n        let atProtoKit = ATProtoKit(sessionConfiguration: config)\n\n        if let keychain = try await atProtoKit.keychainProtocol() {\n            print(\"Result (Access Token): \\(keychain.retrieveAccessToken())\")\n            print(\"Result (Refresh Token): \\(keychain.retrieveRefreshToken())\")\n        }\n        \n        if let session = try await atProtoKit.getUserSession() {\n            print(\"Result (Service Endpoint): \\(session.serviceEndpoint)\")\n            print(\"Result (DID): \\(session.sessionDID)\")\n        }\n    } catch {\n        print(\"Error: \\(error)\")\n    }\n}\n```\n\n## Requirements\nTo use ATProtoKit in your apps, your app should target the specific version numbers:\n- **iOS** and **iPadOS** 14 or later.\n- **macOS** 13 or later.\n- **tvOS** 14 or later.\n- **visionOS** 1 or later.\n- **watchOS** 9 or later.\n\nFor Linux, you need to use Swift 6.0 or later. On Linux, the minimum requirements include:\n- **Amazon Linux** 2\n- **Debian** 12\n- **Fedora** 39\n- **Red Hat UBI** 9\n- **Ubuntu** 20.04\n\nFor Windows, you'll need Swift 6.1 or later. On Windows, the minimum requirements include:\n- **Windows 10** or later\n- **Windows Server** 2022 or later.\n\n\u003e [!WARNING]\n\u003e Direct support for Windows 11 on ARM is not supported. x86 builds may not fully work on Windows on ARM, either.\n\nFor Android, you'll need Swift 6.1 or later. On Android, the minimum requirements include:\n- **Android** 10 or later.\n- **Android SDK** version 29 or later.\n\nAt the moment, Android is in its experimental phase. Plans to take it out of this phase will require testing all parts of the package.\n\nYou can also use this project for any programs you make using Swift and running on **Docker**.\n\n\u003e [!WARNING]\n\u003e Support for WebAssembly is currently not supported. Plans are underway to make this package a supported platform.\n\n\n## Submitting Contributions and Feedback\nWhile this project will change significantly, feedback, issues, and contributions are highly welcomed and encouraged. If you'd like to contribute to this project, please be sure to read both the [API Guidelines](https://github.com/MasterJ93/ATProtoKit/blob/main/API_GUIDELINES.md) as well as the [Contributor Guidelines](https://github.com/MasterJ93/ATProtoKit/blob/main/CONTRIBUTING.md) before submitting a pull request. Any issues (such as bug reports or feedback) can be submitted in the [Issues](https://github.com/MasterJ93/ATProtoKit/issues) tab. Finally, if there are any security vulnerabilities, please read [SECURITY.md](https://github.com/MasterJ93/ATProtoKit/blob/main/SECURITY.md) for how to report it.\n\nIf you have any questions, you can ask me on Bluesky ([@cjrriley.ca](https://bsky.app/profile/cjrriley.ca)). And while you're at it, give me a follow! I'm also active on the [ATProto Touchers](https://discord.gg/3srmDsHSZJ) Discord server.\n\n## License and Acknowledgments\nThis Swift package is using the MIT License. Please view [LICENSE.md](https://github.com/MasterJ93/ATProtoKit/blob/main/LICENSE.md) for more details.\n\nATProtoKit contains a number of third-party Swift packages in order to run effectively. Please see [NOTICE.txt](NOTICE.txt) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMasterJ93%2FATProtoKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMasterJ93%2FATProtoKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMasterJ93%2FATProtoKit/lists"}