WIP: A simple cli for daily tangled use cases and AI integration. This is for my personal use right now, but happy if others get mileage from it! :)

README updates

markbennett.ca 349e5779 c5a49559

verified
+32 -3
+32 -3
README.md
··· 67 67 68 68 LLMs can't read error messages buried in HTML or long stack traces. Provide a `--no-input` flag that forces the CLI to error if it can't resolve context or if required flags are missing. 69 69 70 + ### Rule 4: Flexible Input for Issue Bodies 71 + 72 + Following `gh`'s pattern, `tangled issue create` will support various ways to provide the issue body, making it LLM-friendly and flexible for scripting. It will accept: 73 + - `--body "Text"` or `-b "Text"` for a direct string. 74 + - `--body-file ./file.md` or `-F ./file.md` to read from a file. 75 + - `--body-file -` or `-F -` to read from standard input (stdin). 76 + 70 77 ### Summary of Improvements 71 78 72 - - **Context Inference:** This is the "killer feature" of gh that we are copying. It makes the tool usable for humans and safer for LLMs (less typing \= fewer errors). 79 + - **Context Inference:** This is the "killer feature" of gh that we are copying. It makes the tool usable for humans and safer for LLMs (less typing = fewer errors). 73 80 - **Filtered JSON:** Saves tokens for LLM context windows. 74 81 - **Git Config Integration:** Treats the local .git folder as a database of configuration, reducing the need for environment variables or complex flags. 82 + - **Flexible Issue Body Input:** Improves usability for both humans and LLMs by allowing diverse input methods for issue descriptions. 75 83 76 84 ## 6. Examples Tangled CLI Usage 77 85 ··· 79 87 tangled auth login (opens a browser for auth) 80 88 tangled repo create my-new-repo 81 89 cd my-new-repo 82 - tangled issue create "Bug: Something is broken" 90 + tangled issue create "Bug: Something is broken" --body "Detailed description of the bug here." 91 + echo "Another bug description from stdin." | tangled issue create "Bug: From stdin" --body-file - 83 92 tangled issue list --json "id,title" 84 93 ``` 85 94 95 + ## 7. Basic Commands 96 + 97 + Basic commands include auth, key management, repo creation, and issue management. 98 + 99 + `tangled auth login` 100 + 101 + - Logs in the user, ideally through a web browser flow for security. 102 + `tangled auth logout` 103 + - Logs out the user, clearing the session. 104 + `tangled ssh-key add <public-key-path>` 105 + - Uploads the provided public SSH key to the user's tangled.org account via the API. 106 + `tangled ssh-key verify` 107 + - Verifies that the user's SSH key is correctly set up and can authenticate with tangled.org. Returns the associated DID and handle if successful. 108 + `tangled repo create <repo-name>` 109 + - Creates a new repository under the user's account. 110 + `tangled repo view [--json <fields>]` 111 + - Displays details about the current repository. If `--json` is provided, outputs only the specified fields in JSON format. 112 + `tangled issue create "<title>" [--body "<body>" | --body-file <file> | -F -]` 113 + - Creates a new issue in the current repository with the given title and optional body, which can be provided via flag, file, or stdin. 114 + 86 115 ## 7. Task Management 87 116 88 117 We're bootstrapping task tracking with TODO.md, but will migrate all tasks into Tangled issues and dog food the product as soon as we have basic issue creation and listing working. ··· 92 121 1. Can we allow auth through the web browser, rather than just CLI username/password? This would be more secure and user-friendly. 93 122 2. The GitHub CLI manages the private keys allowing you to authenticate git operations. Can we do something similar, or will users have to manage SSH keys separately? Currently, I store my SSH keys in 1Password which signs requests for me. It would be great if tangled CLI could detect this and use it seamlessly, itentifying the user by the signed ssh key. 94 123 3. How should we handle storing the AT Proto session securely? The GitHub CLI uses the OS keychain. We could do something similar. How does this work across different platforms (Windows, macOS, Linux)? We want to avoid storing sensitive tokens in plaintext files. 95 - 4. How are settings resolved (e.g. local config file, home folder, command-line flags)? We should define a clear precedence order. 124 + 4. How are settings resolved (e.g. local config file, home folder, command-line flags)? We should define a clear precedence order.