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

Configure Feed

Select the types of activity you want to include in your feed.

Add lexicon management infrastructure

- Add scripts/update-lexicons.sh for downloading lexicons from tangled.org
- Add lexicons/README.md documenting source, structure, and update process
- Script downloads all Tangled lexicons over HTTPS from official repo

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

+162
+53
lexicons/README.md
··· 1 + # Vendored Lexicons 2 + 3 + This directory contains vendored copies of AT Protocol lexicon definitions for the Tangled.org service. 4 + 5 + ## Source 6 + 7 + These lexicons are downloaded from the tangled.org core repository: 8 + - **Source**: `https://tangled.org/tangled.org/core/raw/master/lexicons/` 9 + - **Repository**: `https://tangled.org/tangled.org/core` 10 + - **Last Updated**: 2026-02-09 11 + 12 + ## Structure 13 + 14 + - `sh/tangled/` - Tangled-specific lexicons 15 + - `issue/` - Issue record types 16 + - `pulls/` - Pull request record types 17 + - `repo/` - Repository record types 18 + - `label/` - Label/tag record types 19 + - `pipeline/` - CI/CD pipeline types 20 + - `actor/`, `feed/`, `graph/`, `git/`, `knot/`, `spindle/`, `string/` - Other types 21 + 22 + ## Updating Lexicons 23 + 24 + When Tangled.org updates their lexicon schemas, run the update script: 25 + 26 + ```bash 27 + npm run update-lexicons 28 + ``` 29 + 30 + This script: 31 + 1. Downloads the latest lexicon files from tangled.org over HTTPS 32 + 2. Saves them to the `lexicons/` directory 33 + 3. Preserves the directory structure 34 + 35 + After updating lexicons: 36 + 1. Update the "Last Updated" date in this README 37 + 2. Regenerate client code: `npm run codegen` 38 + 3. Run tests to ensure compatibility: `npm test` 39 + 4. Commit both lexicon updates and generated code changes 40 + 41 + **Manual Update** (if script fails): 42 + - Lexicons can be manually downloaded from: `https://tangled.org/tangled.org/core/raw/master/lexicons/<path>` 43 + - Example: `https://tangled.org/tangled.org/core/raw/master/lexicons/issue/issue.json` 44 + 45 + ## Code Generation 46 + 47 + Client TypeScript code is generated from these lexicons using `@atproto/lex-cli`: 48 + 49 + ```bash 50 + npm run codegen 51 + ``` 52 + 53 + This generates type-safe client code in `src/lexicon/` which is committed to version control.
+109
scripts/update-lexicons.sh
··· 1 + #!/usr/bin/env bash 2 + set -euo pipefail 3 + 4 + # Base URL for tangled.org core repository 5 + BASE_URL="https://tangled.org/tangled.org/core/raw/master/lexicons" 6 + 7 + # Create lexicons directory 8 + mkdir -p lexicons/sh/tangled 9 + 10 + # Function to download a lexicon file 11 + download_lexicon() { 12 + local path="$1" 13 + local dest="lexicons/sh/tangled/$path" 14 + local url="$BASE_URL/$path" 15 + 16 + echo "Downloading $path..." 17 + mkdir -p "$(dirname "$dest")" 18 + curl -fsSL "$url" -o "$dest" 19 + } 20 + 21 + # Download all Tangled lexicons 22 + echo "Fetching latest lexicons from tangled.org..." 23 + 24 + # Issue lexicons 25 + download_lexicon "issue/issue.json" 26 + download_lexicon "issue/comment.json" 27 + download_lexicon "issue/state.json" 28 + download_lexicon "issue/open.json" 29 + download_lexicon "issue/closed.json" 30 + 31 + # Pull request lexicons 32 + download_lexicon "pulls/pull.json" 33 + download_lexicon "pulls/comment.json" 34 + download_lexicon "pulls/state.json" 35 + download_lexicon "pulls/open.json" 36 + download_lexicon "pulls/closed.json" 37 + download_lexicon "pulls/merged.json" 38 + 39 + # Repository lexicons 40 + download_lexicon "repo/repo.json" 41 + download_lexicon "repo/create.json" 42 + download_lexicon "repo/delete.json" 43 + download_lexicon "repo/archive.json" 44 + download_lexicon "repo/collaborator.json" 45 + download_lexicon "repo/blob.json" 46 + download_lexicon "repo/tree.json" 47 + download_lexicon "repo/log.json" 48 + download_lexicon "repo/diff.json" 49 + download_lexicon "repo/branch.json" 50 + download_lexicon "repo/branches.json" 51 + download_lexicon "repo/defaultBranch.json" 52 + download_lexicon "repo/getDefaultBranch.json" 53 + download_lexicon "repo/deleteBranch.json" 54 + download_lexicon "repo/tag.json" 55 + download_lexicon "repo/tags.json" 56 + download_lexicon "repo/compare.json" 57 + download_lexicon "repo/merge.json" 58 + download_lexicon "repo/mergeCheck.json" 59 + download_lexicon "repo/forkStatus.json" 60 + download_lexicon "repo/forkSync.json" 61 + download_lexicon "repo/artifact.json" 62 + download_lexicon "repo/hiddenRef.json" 63 + download_lexicon "repo/languages.json" 64 + download_lexicon "repo/addSecret.json" 65 + download_lexicon "repo/listSecrets.json" 66 + download_lexicon "repo/removeSecret.json" 67 + 68 + # Label lexicons 69 + download_lexicon "label/definition.json" 70 + download_lexicon "label/op.json" 71 + 72 + # Pipeline lexicons 73 + download_lexicon "pipeline/pipeline.json" 74 + download_lexicon "pipeline/status.json" 75 + download_lexicon "pipeline/cancelPipeline.json" 76 + 77 + # Top-level lexicons 78 + download_lexicon "owner.json" 79 + download_lexicon "publicKey.json" 80 + 81 + # Actor lexicons 82 + download_lexicon "actor/profile.json" 83 + 84 + # Feed lexicons 85 + download_lexicon "feed/reaction.json" 86 + download_lexicon "feed/star.json" 87 + 88 + # Graph lexicons 89 + download_lexicon "graph/follow.json" 90 + 91 + # Git lexicons 92 + download_lexicon "git/refUpdate.json" 93 + 94 + # Knot lexicons 95 + download_lexicon "knot/knot.json" 96 + download_lexicon "knot/listKeys.json" 97 + download_lexicon "knot/member.json" 98 + download_lexicon "knot/version.json" 99 + 100 + # Spindle lexicons 101 + download_lexicon "spindle/spindle.json" 102 + download_lexicon "spindle/member.json" 103 + 104 + # String lexicons 105 + download_lexicon "string/string.json" 106 + 107 + echo "" 108 + echo "✓ Lexicons downloaded successfully" 109 + echo " Run 'npm run codegen' to regenerate TypeScript types"