Something went wrong. Try again.
Small (but incredibly useful!) scripts and utilities that don't need their own repo.
utils scripts zig atproto
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172#!/usr/bin/env nu# SPDX-License-Identifier: AGPL-3.0-only# Copyright (c) 2026 MatrixFurry <matrix@matrixfurry.com>
const key_path: path = "~/.ssh/id_tangled_quick_setup" | path expandconst pubkey_path: path = $key_path ++ ".pub"
const config: path = "~/.ssh/config" | path expand
# Easily and quickly set up Git and Jujutsu for Tangled. Sets up the following:# - SSH Key# - Commit signing# - Change ID headersexport def main [] { print "Setting up Jujutsu change ID headers" let jj = (which jj | length) != 0
if $jj { jj config set --user git.write-change-id-header true } else { print "Jujustu is not installed, skipping" }
print "Setting up SSH Key" let email = input "Enter your email, handle, or DID (can be found at https://tangled.org/settings): " ssh-keygen -t ed25519 -C $email -f $key_path
touch ~/.ssh chmod 700 ~/.ssh touch $config chmod 600 $config
[ "Host tangled.org knot1.tangled.sh" " User git" $" IdentityFile ($key_path)" " AddressFamily inet" ] | str join "\n" | save -a $config
print "Finished setting up SSH key"
let pubkey = open --raw $pubkey_path print $"IMPORTANT: Copy the key to your profile \(https://tangled.org/settings/keys\): `($pubkey)`"
loop { match (input "Would you like to set up commit signing for Git and Jujutsu? This will override any existing commit signing settings. [y/N]: ") { "y" | "yes" => (break) "n" | "no" | "" | null => (exit) } }
if $jj { jj config set --user signing.behavior "own" jj config set --user signing.backend "ssh" jj config set --user signing.key $key_path jj config set --user signing.backends.ssh.allowed-signers ".allowed_signers" jj config set --user signing.backends.ssh.revocation-list ".revoked_keys"
print "Successfully set up commit signing for Jujutsu" } else { print "Jujustu is not installed, skipping" }
git config set --global user.signingKey $key_path git config set --global gpg.format "ssh" git config set --global commit.gpgSign true
print "Successfully set up commit signing for Git"}