[![Crates.io Version](https://img.shields.io/crates/v/tangled-cli)](https://crates.io/crates/tangled-cli) # Tangled CLI > [!WARNING] > Both tangled and this cli are in an experimental phase. Use at your own discretion. A CLI for [Tangled](https://tangled.org/), a decentralized git collaboration platform built on the [AT Protocol](https://atproto.com/). This cli is meant for both humans & agents. ## Installation ### crates.io ```sh cargo install tangled-cli ``` ### Nix With [Nix flakes](https://nixos.wiki/wiki/Flakes) enabled, run it directly from Tangled without cloning: ```sh nix run 'git+https://tangled.org/dzejkop.space/tangled-cli#default' -- --help ``` To open a shell with `tang` available: ```sh nix shell 'git+https://tangled.org/dzejkop.space/tangled-cli#default' ``` ### Build from Source ```sh git clone https://tangled.org/dzejkop.space/tangled-cli cd tangled-cli cargo install --locked --path . ``` ## Getting started 1. **Login to Tangled**: ```sh tang auth login ``` 2. **List your repositories**: ```sh tang repo list ``` 3. **Create a new repository**: ```sh tang repo create myproject --description "My cool project" ``` 4. **Clone a repository**: ```sh tang repo clone username/reponame ``` ## Workspace Structure - `crates/tangled-cli` - CLI binary with clap-based argument parsing - `crates/tangled-config` - Configuration and session management (keyring-backed) - `crates/tangled-api` - XRPC client wrapper for AT Protocol and Tangled APIs ## Configuration The CLI stores session credentials securely in your system keyring and configuration in: - Linux: `~/.config/tangled/config.toml` - macOS: `~/Library/Application Support/tangled/config.toml` - Windows: `%APPDATA%\tangled\config.toml` ### Environment Variables - `TANGLED_PDS_BASE` - Override the PDS base URL (default: `https://bsky.social`) - `TANGLED_API_BASE` - Override the Tangled API base URL (default: `https://api.tangled.org`) - `TANGLED_DEFAULT_KNOT` - Override the default knot for new repos (default: `knot1.tangled.sh`) - `TANGLED_SPINDLE_BASE` - Override the Spindle base URL (default: `wss://spindle.tangled.sh`) ## Examples ### Working with Issues ```sh # Create an issue tang issue create --repo myrepo --title "Bug: Fix login" --body "Description here" # List issues tang issue list --repo myrepo # Comment on an issue tang issue comment --body "I'll fix this" ``` ### Working with Pulls ```sh # Create a pull from the current git repository and branch tang pull create # Or create a pull explicitly tang pull create --repo myrepo --base main --head feature-branch --title "Add new feature" # Review a pull tang pull review --approve --comment "LGTM!" # Merge a pull tang pull merge ``` ## Contributing Contributions are welcome! Please feel free to submit issues or pulls. ## License MIT OR Apache-2.0