bluesky-social / indigo

Go source code for Bluesky's atproto services.
https://atproto.com
Apache License 2.0
640 stars 97 forks source link

How do we use ./cmd/gosky to do things like log in and post? #141

Open johnhorner opened 1 year ago

johnhorner commented 1 year ago

There doesn't seem to be any documentation and the help is minimal.

There's a command createSession, that looks like how you log in. So … how? I tried things like

go run ./cmd/gosky createSession -u <username> -p <password>

and

go run ./cmd/gosky createSession --username <username>

but they don't work. When I do

go run ./cmd/gosky help createSession

I just get this:

NAME:
   gosky createSession

USAGE:
   gosky createSession [command options] [arguments...]
bradfitz commented 1 year ago

First, I'd make an app password if you don't know about those (https://staging.bsky.app/settings/app-passwords).

Then:

$ gosky createSession bradfitz.com $(cat ~/secrets/bluesky-app-pass) > bsky.auth
$ gosky feed | head -10                                                         
------------------------------------------------------------
filmgirl.bsky.social (2023-04-28T03:32:39.619Z):
The firehose! The firehose! I got so excited!
------------------------------------------------------------

(where my username is bradfitz.com and I put my app password at ~/secrets/bluesky-app-pass)