Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A command line tool for the Authenticated Transfer Protocol

License

NotificationsYou must be signed in to change notification settings

nrempel/atp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌐AT Protocol Core Implementation 🌐

A command-line interface for the AT Protocol, focusing on the corecom.atproto.* namespace with additional Bluesky social features.

License: MITRustTests

🚀 Features

ATP CLI provides comprehensive access to the AT Protocol with primary focus on core protocol operations:

Core AT Protocol (com.atproto.*)

  • 🔐 Authentication & Session Management - Full session lifecycle support
  • 👤 Identity Resolution - Handle and DID resolution and management
  • 📦 Repository Operations - Complete CRUD operations for AT Protocol records
  • 🔄 Synchronization - Repository sync and blob management
  • 🖥️ Server Management - Server capabilities and session management

Additional Features

  • 🎯 Bluesky Integration - Native support for Bluesky social features (app.bsky.*)

📦 Installation

From Source

git clone https://github.com/yourusername/atpcd atpcargo build --release

Using Cargo

cargo install atp

🛠️ Usage

Authentication

# Login with your credentialsatp auth login --identifier your.handle --password your-app-password# Check current sessionatp auth session

Core AT Protocol Operations

Identity Management

# Resolve handle to DIDatp atproto identity resolve-handle --handle alice.bsky.social# Resolve DID to DID documentatp atproto identity resolve-did --did did:plc:example123# Update your handleatp atproto identity update-handle --handle new.handle.com

Repository Operations

# Create a new recordatp atproto repo create-record \  --repo did:plc:example \  --collection app.bsky.feed.post \  --record'{"text": "Hello AT Protocol!", "createdAt": "2024-01-01T00:00:00Z"}'# Get a specific recordatp atproto repo get-record \  --repo did:plc:example \  --collection app.bsky.feed.post \  --rkey 3k2a4b5c6d7e8f9g# List records in a collectionatp atproto repo list-records \  --repo did:plc:example \  --collection app.bsky.feed.post \  --limit 50# Delete a recordatp atproto repo delete-record \  --repo did:plc:example \  --collection app.bsky.feed.post \  --rkey 3k2a4b5c6d7e8f9g# Upload a blobatp atproto repo upload-blob --file image.jpg# Describe a repositoryatp atproto repo describe-repo --repo did:plc:example

Server Operations

# Create a session (alternative to auth login)atp atproto server create-session \  --identifier your.handle \  --password your-password# Get current session infoatp atproto server get-session# Refresh session tokensatp atproto server refresh-session# Delete session (logout)atp atproto server delete-session# Get server capabilitiesatp atproto server describe-server

Synchronization Operations

# Get a blobatp atproto sync get-blob --did did:plc:example --cid bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi# Get repository headatp atproto sync get-head --did did:plc:example# Get latest commitatp atproto sync get-latest-commit --did did:plc:example# Get repository statusatp atproto sync get-repo-status --did did:plc:example# List repositoriesatp atproto sync list-repos --limit 100

Bluesky Social Features

# View a user's profileatp bsky actor profile --actor alice.bsky.social# Get multiple profilesatp bsky actor profiles --actors alice.bsky.social,bob.bsky.social# Search for usersatp bsky actor search --query"rust developer" --limit 25# Get user suggestionsatp bsky actor suggestions --limit 50# Get user preferencesatp bsky actor preferences

📊 AT Protocol Core Support (com.atproto.*)

Current Implementation Status

NamespaceCommandsCoverageStatus
com.atproto.identity3/9🟡33%Core identity operations
com.atproto.repo6/12🟡50%Repository management
com.atproto.server5/25🔴20%Server operations
com.atproto.sync5/17🔴29%Synchronization
com.atproto.admin0/15🔴0%Administrative functions
com.atproto.label0/3🔴0%Content labeling
com.atproto.moderation0/3🔴0%Moderation tools
com.atproto.temp0/4🔴0%Temporary operations

Detailed Feature Matrix

✅ Implemented Features (Click to expand)

Identity Management (com.atproto.identity)

  • resolveHandle - Resolve handle to DID
  • resolveDid - Resolve DID to DID document
  • updateHandle - Update account handle

Repository Operations (com.atproto.repo)

  • createRecord - Create new record
  • getRecord - Get specific record
  • listRecords - List records in collection
  • deleteRecord - Delete record
  • uploadBlob - Upload blob
  • describeRepo - Get repository metadata

Server Management (com.atproto.server)

  • createSession - Login/create session
  • getSession - Get current session info
  • refreshSession - Refresh tokens
  • deleteSession - Logout
  • describeServer - Get server capabilities

Synchronization (com.atproto.sync)

  • getBlob - Get blob data
  • getHead - Get repository head
  • getLatestCommit - Get latest commit
  • getRepoStatus - Get repository status
  • listRepos - List repositories
🚧 Planned Core Features (Click to expand)

High Priority

  • com.atproto.repo.applyWrites - Batch repository operations
  • com.atproto.repo.putRecord - Update existing records
  • com.atproto.server.createAccount - Account creation
  • com.atproto.identity.getRecommendedDidCredentials - DID credential management
  • com.atproto.moderation.createReport - Content reporting

Medium Priority

  • com.atproto.label.queryLabels - Query content labels
  • com.atproto.sync.subscribeRepos - Subscribe to repository events
  • com.atproto.server.createAppPassword - App password management
  • com.atproto.identity.signPlcOperation - PLC operations
  • com.atproto.repo.importRepo - Repository import/export

Low Priority

  • com.atproto.admin.* - Administrative operations (15 commands)
  • com.atproto.temp.* - Temporary/experimental features (4 commands)

Overall Progress

CategoryImplementedTotalCoverage
Core AT Protocol1966🟡29%
Bluesky Features595+🔴5%
Total24161+🔴15%

🧪 Testing

ATP CLI has comprehensive test coverage with93 passing integration tests covering:

  • ✅ All command-line argument validation
  • ✅ Authentication and authorization flows
  • ✅ Error handling and edge cases
  • ✅ Parameter validation and boundary testing
  • ✅ JSON validation and parsing
  • ✅ Help system consistency
  • ✅ Unicode and special character handling
# Run all testscargotest# Run only integration testscargotest --test integration_tests# Run with verbose outputcargotest -- --nocapture

🔧 Configuration

ATP CLI stores configuration and session data in your system's local config directory:

  • Linux:~/.config/atp/config.toml
  • macOS:~/Library/Application Support/atp/config.toml
  • Windows:%APPDATA%\atp\config.toml

Configuration Format

[session]did ="did:plc:example123"handle ="alice.bsky.social"email ="alice@example.com"accessJwt ="..."refreshJwt ="..."

🏗️ Architecture

ATP CLI is built with:

  • 🦀 Rust 2024 Edition - Modern, safe systems programming
  • ⚡ Tokio - Async runtime for high-performance networking
  • 🔧 Clap - Powerful command-line argument parsing
  • 🌐 Reqwest - HTTP client with JSON support
  • 📝 Serde - Serialization/deserialization
  • ✅ TDD Approach - Test-driven development with comprehensive coverage

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Priority Areas for Contribution

  1. Core AT Protocol Features - Complete thecom.atproto.* namespace implementation
  2. Batch Operations - ImplementapplyWrites and bulk operations
  3. Identity Management - Complete DID and handle operations
  4. Event Streaming - Add support for real-time subscriptions
  5. Documentation - Improve examples and API documentation

Development Setup

git clone https://github.com/yourusername/atpcd atpcargo buildcargotest

📝 License

This project is licensed under the MIT License - see theLICENSE file for details.

🙏 Acknowledgments

  • Built on theAT Protocol specification
  • Compatible withBluesky and other AT Protocol servers
  • Inspired by the vision of a decentralized social web
  • Thanks to all contributors and testers

🔗 Resources

AT Protocol Documentation

API References


AT ProtocolIssuesDiscussions

Made with ❤️ for the decentralized social web

About

A command line tool for the Authenticated Transfer Protocol

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp