Simplify TB token experience

- Unfortunately the TB CLI doesn't just output the token and instead
  tries to copy it to the clipboard
- Since we're running inside a container we can't do that, so need to
  just update the docs to get it from the UI
This commit is contained in:
James Loh
2025-06-26 15:55:18 +10:00
parent 29e86facec
commit 946dff3b76
2 changed files with 21 additions and 8 deletions

View File

@@ -1,5 +1,17 @@
#!/usr/bin/env bash
# If arguments are provided, run tb command with those arguments
if [[ $# -gt 0 ]]; then
# Check if logged in first
if [[ ! -f "/home/tinybird/.tinyb" ]]; then
echo "Not logged in to Tinybird. Please run 'docker compose run --rm tinybird-login' first"
exit 1
fi
# Run the tb command with provided arguments
exec tb "$@"
fi
# Default behavior: login
# Check if already logged in
if [[ -f "/home/tinybird/.tinyb" ]]
then