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! :)

Rename to `tang` and prepare for publishing on npm

markbennett.ca cbffd393 be8c8e56

verified
+68 -8
+48 -5
README.md
··· 1 - # Tangled CLI: Architecture & Implementation Plan 1 + # tang 2 + 3 + A CLI for [Tangled.org](https://tangled.org) — manage issues and repository context from the terminal. Designed to be usable by both humans and AI agents. 4 + 5 + ## Installation 6 + 7 + ```bash 8 + npm install -g @markbennett/tang 9 + ``` 10 + 11 + ## Quick Start 12 + 13 + ```bash 14 + # Authenticate with your Tangled PDS handle and an App Password 15 + tang auth login 16 + 17 + # From inside a git repo cloned from tangled.org: 18 + tang issue list 19 + tang issue create "Bug: something is broken" --body "Detailed description" 20 + tang issue view 1 21 + tang issue close 1 22 + 23 + # SSH key management 24 + tang ssh-key add ~/.ssh/id_ed25519.pub 25 + ``` 26 + 27 + ## Commands 28 + 29 + | Command | Description | 30 + | :--- | :--- | 31 + | `tang auth login` | Authenticate with your PDS handle and App Password | 32 + | `tang auth logout` | Log out and clear stored session | 33 + | `tang issue list` | List issues for the current repo | 34 + | `tang issue create <title>` | Create a new issue | 35 + | `tang issue view <n>` | View an issue | 36 + | `tang issue close <n>` | Close an issue | 37 + | `tang issue reopen <n>` | Reopen an issue | 38 + | `tang ssh-key add <path>` | Upload a public SSH key to your account | 39 + | `tang context` | Show resolved repo context (DID, handle, name) | 40 + | `tang config` | View or set CLI configuration | 41 + 42 + Most commands accept `--json [fields]` for machine-readable output, useful for scripting and LLM integrations. 43 + 44 + --- 2 45 3 - ## Project Overview 46 + # Architecture & Implementation Notes 4 47 5 48 **Goal:** Create a context-aware CLI for tangled.org that bridges the gap between the AT Protocol (XRPC) and standard Git. 6 49 ··· 228 271 229 272 # Install globally for local testing 230 273 npm link 231 - tangled --version 232 - tangled --help 233 - npm unlink -g tangled-cli # Unlink when done 274 + tang --version 275 + tang --help 276 + npm unlink -g @markbennett/tang # Unlink when done 234 277 ``` 235 278 236 279 ### Project Structure
+15 -3
package.json
··· 1 1 { 2 - "name": "tangled-cli", 2 + "name": "@markbennett/tang", 3 3 "version": "0.0.1", 4 4 "description": "A simple CLI for Tangled.org. Inspired by GitHub CLI, and usable by humans and AI.", 5 5 "type": "module", 6 6 "main": "./dist/index.js", 7 + "exports": { 8 + ".": "./dist/index.js" 9 + }, 7 10 "bin": { 8 - "tangled": "./dist/index.js" 11 + "tang": "./dist/index.js" 12 + }, 13 + "files": [ 14 + "dist", 15 + "README.md", 16 + "LICENSE" 17 + ], 18 + "publishConfig": { 19 + "access": "public" 9 20 }, 10 21 "scripts": { 11 22 "dev": "tsx src/index.ts", 12 - "build": "tsc", 23 + "build": "tsc -p tsconfig.build.json", 24 + "clean": "rm -rf dist", 13 25 "test": "vitest run", 14 26 "test:watch": "vitest watch", 15 27 "test:coverage": "vitest run --coverage",
+5
tsconfig.build.json
··· 1 + { 2 + "extends": "./tsconfig.json", 3 + "include": ["src/**/*"], 4 + "exclude": ["node_modules", "dist", "src/lexicon/**"] 5 + }