···1-# Tangled CLI: Architecture & Implementation Plan
000000000000000000000000000000000000000000023-## Project Overview
45**Goal:** Create a context-aware CLI for tangled.org that bridges the gap between the AT Protocol (XRPC) and standard Git.
6···228229# Install globally for local testing
230npm link
231-tangled --version
232-tangled --help
233-npm unlink -g tangled-cli # Unlink when done
234```
235236### Project Structure
···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+---
4546+# Architecture & Implementation Notes
4748**Goal:** Create a context-aware CLI for tangled.org that bridges the gap between the AT Protocol (XRPC) and standard Git.
49···271272# Install globally for local testing
273npm link
274+tang --version
275+tang --help
276+npm unlink -g @markbennett/tang # Unlink when done
277```
278279### Project Structure
+15-3
package.json
···1{
2- "name": "tangled-cli",
3 "version": "0.0.1",
4 "description": "A simple CLI for Tangled.org. Inspired by GitHub CLI, and usable by humans and AI.",
5 "type": "module",
6 "main": "./dist/index.js",
0007 "bin": {
8- "tangled": "./dist/index.js"
000000009 },
10 "scripts": {
11 "dev": "tsx src/index.ts",
12- "build": "tsc",
013 "test": "vitest run",
14 "test:watch": "vitest watch",
15 "test:coverage": "vitest run --coverage",