From bab98346caeda7faa6fd7ce9f2dc5eadb828bc63 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 26 Oct 2022 20:36:03 -0700 Subject: rename main crate to '-pds', start '-cli' crate --- adenosine-cli/Cargo.toml | 33 ++++++++++++++++++++++++ adenosine-cli/README.md | 5 ++++ adenosine-cli/plan.txt | 65 +++++++++++++++++++++++++++++++++++++++++++++++ adenosine-cli/src/main.rs | 3 +++ 4 files changed, 106 insertions(+) create mode 100644 adenosine-cli/Cargo.toml create mode 100644 adenosine-cli/README.md create mode 100644 adenosine-cli/plan.txt create mode 100644 adenosine-cli/src/main.rs (limited to 'adenosine-cli') diff --git a/adenosine-cli/Cargo.toml b/adenosine-cli/Cargo.toml new file mode 100644 index 0000000..8d42961 --- /dev/null +++ b/adenosine-cli/Cargo.toml @@ -0,0 +1,33 @@ +[package] +name = "adenosine-cli" +version = "0.1.0-dev.0" +edition = "2021" +authors = ["Bryan Newbold "] +license = "AGPLv3" +description = "Informal implementation of atproto.com" +readme = "../README.md" +repository = "https://gitlab.com/bnewbold/adenosine" +keywords = ["atproto"] +#categories = [] + +[dependencies] +structopt = "*" +# NOTE: could try 'rustls-tls' feature instead of default native TLS? +reqwest = { version = "0.11", features = ["blocking", "json"] } +serde_json = "*" + +# uncertain about these... +anyhow = "1.0" +atty = "0.2" +colored_json = "*" + +[package.metadata.deb] +maintainer = "Bryan Newbold " +depends = "$auto" +section = "utility" +priority = "optional" +extended-description = """"TODO""" +assets = [ + ["target/release/adenosine", "usr/bin/", "755"], + #["../extra/adenosine.1", "usr/share/man/man1/", "644"], +] diff --git a/adenosine-cli/README.md b/adenosine-cli/README.md new file mode 100644 index 0000000..a5a692c --- /dev/null +++ b/adenosine-cli/README.md @@ -0,0 +1,5 @@ + +`adenosine-cli`: atproto command-line client +============================================ + + diff --git a/adenosine-cli/plan.txt b/adenosine-cli/plan.txt new file mode 100644 index 0000000..fc7b6dc --- /dev/null +++ b/adenosine-cli/plan.txt @@ -0,0 +1,65 @@ + +CLI name is `adenosine`. + +This is (for now) a "light" or "delegated" client which has no local state and +just talks to the remote. + +config variables: + + ATP_SERVICE: prefix, eg http://localhost:1234 + ATP_AUTH_TOKEN: JWT string + +at-uri can be either a global `at://` URI string, or a user-local referene of +the form /. + +like in httpie, params can be '=' for a JSON field assignment; '==' for query +parameters (though there are usually CLI args instead); '@' to import a JSON +file; '-' to read a JSON file from stdin. + + get + ls ? + + create + + update + + delete + + describe + resolve => output DID doc (optionally do this directly?) + + validate + + + status + => status of configuration, registration, logged in, current did/username (from JWT?), etc + + account + register + delete + login + logout + info ? + create-revocation-key + + repo + root + export ? + import [--from ] + + xrpc get|post []+ + => generic method + + bsky + feed ? + notifications + + post []+ + repost + like + unlike + follow + unfollow + + follows ? + followers ? + profile ? + search-users + diff --git a/adenosine-cli/src/main.rs b/adenosine-cli/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/adenosine-cli/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} -- cgit v1.2.3