Skip to content

Commit

Permalink
feat: Rename atrium-cli to bsky-cli (#191)
Browse files Browse the repository at this point in the history
* Rename atrium-cli to bsky-cli

* Remove dependencies
  • Loading branch information
sugyan committed Jun 21, 2024
1 parent f23c121 commit 137cf2e
Show file tree
Hide file tree
Showing 16 changed files with 162 additions and 175 deletions.
31 changes: 15 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[workspace]
members = [
"atrium-api",
"atrium-cli",
"atrium-xrpc",
"atrium-xrpc-client",
"bsky-cli",
"bsky-sdk",
]
# Examples show how to use the latest published crates, not the workspace state.
Expand All @@ -25,6 +25,7 @@ keywords = ["atproto", "bluesky"]
atrium-api = { version = "0.23.0", path = "atrium-api" }
atrium-xrpc = { version = "0.11.1", path = "atrium-xrpc" }
atrium-xrpc-client = { version = "0.5.5", path = "atrium-xrpc-client" }
bsky-sdk = { version = "0.1.1", path = "bsky-sdk" }

# async in traits
# Can be removed once MSRV is at least 1.75.0.
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ Definitions for XRPC request/response, and their associated errors.

A library provides clients that implement the `XrpcClient` defined in [atrium-xrpc](./atrium-xrpc/)

### [`atrium-cli`](./atrium-cli/)
### [`bsky-sdk`](./bsky-sdk/)

[![](https://img.shields.io/crates/v/atrium-cli)](https://crates.io/crates/atrium-cli)
[![](https://img.shields.io/crates/v/bsky-sdk)](https://crates.io/crates/bsky-sdk)

ATrium-based SDK for Bluesky.

### [`bsky-cli`](./bsky-cli/)

[![](https://img.shields.io/crates/v/bsky-cli)](https://crates.io/crates/bsky-cli)

A command-line app using this API library.

Expand Down
3 changes: 0 additions & 3 deletions atrium-cli/src/lib.rs

This file was deleted.

42 changes: 0 additions & 42 deletions atrium-cli/src/store.rs

This file was deleted.

File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions atrium-cli/Cargo.toml → bsky-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
[package]
name = "atrium-cli"
name = "bsky-cli"
version = "0.1.16"
authors = ["sugyan <[email protected]>"]
edition.workspace = true
rust-version.workspace = true
description = "CLI application for AT Protocol using ATrium API"
description = "CLI application for Bluesky using ATrium API"
readme = "README.md"
repository.workspace = true
license.workspace = true
keywords.workspace = true
keywords = ["atproto", "bluesky", "atrium", "cli"]

[dependencies]
anyhow.workspace = true
async-trait.workspace = true
atrium-api.workspace = true
atrium-xrpc-client.workspace = true
bsky-sdk.workspace = true
chrono.workspace = true
clap.workspace = true
dirs.workspace = true
Expand All @@ -23,5 +22,5 @@ serde_json.workspace = true
tokio = { workspace = true, features = ["full"] }

[[bin]]
name = "atrium-cli"
name = "bsky-cli"
path = "src/bin/main.rs"
8 changes: 4 additions & 4 deletions atrium-cli/README.md → bsky-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# ATrium CLI
# Bsky CLI

[![](https://img.shields.io/crates/v/atrium-cli)](https://crates.io/crates/atrium-cli)
[![](https://img.shields.io/crates/v/bsky-cli)](https://crates.io/crates/bsky-cli)

CLI application for AT Protocol using ATrium API
CLI application for Bluesky using ATrium API

```
Usage: atrium-cli [OPTIONS] <COMMAND>
Usage: bsky-cli [OPTIONS] <COMMAND>
Commands:
login Login (Create an authentication session)
Expand Down
File renamed without changes.
17 changes: 10 additions & 7 deletions atrium-cli/src/bin/main.rs → bsky-cli/src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use atrium_cli::runner::Runner;
use bsky_cli::{Command, Runner};
use clap::Parser;
use std::fmt::Debug;

Expand All @@ -20,16 +20,19 @@ struct Args {
debug: bool,
#[command(subcommand)]
// command: Command,
command: atrium_cli::commands::Command,
command: Command,
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Args::parse();
Ok(
Runner::new(args.pds_host, args.limit.try_into()?, args.debug)
.await?
.run(args.command)
.await?,
Ok(Runner::new(
args.pds_host,
args.limit.try_into()?,
args.debug,
matches!(args.command, Command::Login(_)),
)
.await?
.run(args.command)
.await?)
}
2 changes: 1 addition & 1 deletion atrium-cli/src/commands.rs → bsky-cli/src/commands.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use atrium_api::types::string::AtIdentifier;
use bsky_sdk::api::types::string::AtIdentifier;
use clap::Parser;
use std::path::PathBuf;
use std::str::FromStr;
Expand Down
5 changes: 5 additions & 0 deletions bsky-cli/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mod commands;
mod runner;

pub use commands::Command;
pub use runner::Runner;
Loading

0 comments on commit 137cf2e

Please sign in to comment.