···11+Copyright 2025 Tim Culverhouse
22+33+Permission is hereby granted, free of charge, to any person obtaining a copy of
44+this software and associated documentation files (the “Software”), to deal in
55+the Software without restriction, including without limitation the rights to
66+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
77+the Software, and to permit persons to whom the Software is furnished to do so,
88+subject to the following conditions:
99+1010+The above copyright notice and this permission notice shall be included in all
1111+copies or substantial portions of the Software.
1212+1313+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1414+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
1515+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
1616+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1717+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1818+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+37
README.md
···11+# knit
22+33+A CLI for tangled.sh
44+55+## Installation
66+77+`go install tangled.sh/rockorager.dev/knit`
88+99+## Usage
1010+1111+`knit` has similar usage patterns as the Github CLI (`gh`). Prior to making any
1212+authenticated calls, you must authenticate with tangled.sh
1313+1414+```
1515+knit auth login
1616+```
1717+1818+This will require your ATProto handle and app password (the app password can be
1919+specific to knit). Knit will *not* store the password. Instead, knit
2020+authenticates with tangled.sh and stores the session cookie into your system
2121+keyring. Note to linux users: Your keyring *must be setup* for this to work
2222+properly
2323+2424+Authenticating will also create a default configuration file which maps a list
2525+of handles to a host. The first handle in the list is the default handle.
2626+2727+### Creating repos
2828+2929+To create a repo, run:
3030+3131+```
3232+knit repo create
3333+```
3434+3535+This will guide you through an interactive prompt to set up the repository.
3636+Currently, we can't request the configured knot servers for a given user - the
3737+only option is the default tangled.sh server
···11+package knit
22+33+import "errors"
44+55+// DefaultHost is the default host for tangled.sh services
66+const DefaultHost = "tangled.sh"
77+88+// DefaultKnot is the default knot host
99+const DefaultKnot = "knot1.tangled.sh"
1010+1111+// ErrRequiresAuth is returned when a command requires authentication but the
1212+// user has not authenticated with the host
1313+var ErrRequiresAuth = errors.New("authentication required")