aboutsummaryrefslogtreecommitdiffstats
path: root/adenosine-cli
diff options
context:
space:
mode:
authorbryan newbold <bnewbold@robocracy.org>2023-03-04 16:48:20 -0800
committerbryan newbold <bnewbold@robocracy.org>2023-03-04 16:48:20 -0800
commita16558ed05428661936c317c0da15bd07eeaaba1 (patch)
tree45e145f727b8accab2e3a4582d8d475fb0abc0f1 /adenosine-cli
parent6c44f0ee841fe1bf84a8a299e0bf78a01e84f03a (diff)
downloadadenosine-a16558ed05428661936c317c0da15bd07eeaaba1.tar.gz
adenosine-a16558ed05428661936c317c0da15bd07eeaaba1.zip
cli: ATP_PDS_HOST as env var
Diffstat (limited to 'adenosine-cli')
-rw-r--r--adenosine-cli/README.md8
-rw-r--r--adenosine-cli/plan.txt2
-rw-r--r--adenosine-cli/src/bin/adenosine.rs10
3 files changed, 10 insertions, 10 deletions
diff --git a/adenosine-cli/README.md b/adenosine-cli/README.md
index c66479d..e5a3cce 100644
--- a/adenosine-cli/README.md
+++ b/adenosine-cli/README.md
@@ -63,15 +63,15 @@ official official [`bluesky-social/atproto`](https://github.com/bluesky-social/a
prototype (see [local atproto dev quickstart](./../notes/atproto_quickstart.md)).
-Set the `ATP_HOST` environment variable. Then either register a test account,
+Set the `ATP_PDS_HOST` environment variable. Then either register a test account,
or create a new session for an existing account, and save the JWT token to the
`ATP_AUTH_TOKEN`:
# default port for bluesky-social/atproto implementation
- export ATP_HOST=http://localhost:2583
+ export ATP_PDS_HOST=http://localhost:2583
# default port for adenosine-pds implementation
- export ATP_HOST=http://localhost:3030
+ export ATP_PDS_HOST=http://localhost:3030
# register a new account
adenosine account register -u voltaire.test -p bogus -e voltaire@example.com
@@ -96,7 +96,7 @@ or create a new session for an existing account, and save the JWT token to the
export ATP_AUTH_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6cGxjOnlxdHVrc3ZhdG1tZ25nZDVua2t3NzVobiIsImlhdCI6MTY2Njk5NjQxNX0.j2wcF1g9NxT_1AvYRiplNf_jtK6S81y3L38AkcBwOqY
-You could save the `ATP_HOST` and `ATP_AUTH_TOKEN` values in `~/.bashrc` so you
+You could save the `ATP_PDS_HOST` and `ATP_AUTH_TOKEN` values in `~/.bashrc` so you
don't need to enter them every time.
Now you can start posting and poking around:
diff --git a/adenosine-cli/plan.txt b/adenosine-cli/plan.txt
index 32e5070..f7f65fe 100644
--- a/adenosine-cli/plan.txt
+++ b/adenosine-cli/plan.txt
@@ -6,7 +6,7 @@ just talks to the remote.
config variables:
- ATP_HOST: prefix, eg http://localhost:1234
+ ATP_PDS_HOST: 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
diff --git a/adenosine-cli/src/bin/adenosine.rs b/adenosine-cli/src/bin/adenosine.rs
index ae03a2c..b031353 100644
--- a/adenosine-cli/src/bin/adenosine.rs
+++ b/adenosine-cli/src/bin/adenosine.rs
@@ -24,11 +24,11 @@ struct Opt {
/// HTTP(S) URL of Personal Data Server to connect to
#[structopt(
global = true,
- long = "--host",
- env = "ATP_HOST",
+ long = "--pds-host",
+ env = "ATP_PDS_HOST",
default_value = "http://localhost:2583"
)]
- atp_host: String,
+ pds_host: String,
/// Authentication session token (JWT), for operations that need it
#[structopt(
@@ -333,7 +333,7 @@ fn require_auth_did(opt: &Opt, xrpc_client: &mut XrpcClient) -> Result<Did> {
fn run(opt: Opt) -> Result<()> {
let mut xrpc_client = XrpcClient::new(
- opt.atp_host.clone(),
+ opt.pds_host.clone(),
opt.auth_token.clone(),
opt.admin_password.clone(),
)?;
@@ -347,7 +347,7 @@ fn run(opt: Opt) -> Result<()> {
let result = match opt.cmd {
Command::Status => {
println!("Configuration");
- println!(" ATP_HOST: {}", opt.atp_host);
+ println!(" ATP_PDS_HOST: {}", opt.pds_host);
if opt.auth_token.is_some() {
println!(" ATP_AUTH_TOKEN: <configured>");
} else {