Conversation
`pull` and `login` now dispatch to the SDK's native run_pull/run_login implementations instead of shelling out to the upstream Forward `tb` package. Both already persist standalone (datafiles written directly to disk; login writes TINYBIRD_TOKEN/TINYBIRD_URL to .env.local and updates tinybird.config.json/tinybird.json when present), with no dependency on tb being installed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
…ybird CLI pull and login already work correctly via the real tb CLI delegation path (main's SDK_OWNED_COMMANDS policy). Reimplementing them against the raw API duplicates logic the installed CLI already owns and can drift from its actual behavior (the installed CLI's login flow, token storage, etc). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tinybird pullandtinybird loginnow dispatch to the SDK's nativerun_pull/run_loginimplementations instead of shelling out to the upstream Forwardtbpackage, matching the pattern used forbuild/deploy/devin Wire native build/deploy/dev commands to CLI entry point #25.pullgains-o/--output-dir(default.) and--forceflags, documented in README.md'stinybird pullexamples.loginwires straight to the existing browser OAuth flow with no new flags (README documents none).Closes PROTM-2257: https://linear.app/tinybird/issue/PROTM-2257/python-sdk-wire-native-pulllogin-commands-to-cli-entry-point
Notes on standalone behavior (per the ticket's verification ask)
run_pullandrun_login(and their dependenciesauth.py,env.py,config.py) have zero imports from the upstreamtinybird.tbpackage — confirmed by inspection. Login already worked standalone; this PR just stops routing it through the shell-out path..tinybfile (that's the Forward CLI's own config file). The native login flow persists to.env.local(TINYBIRD_TOKEN,TINYBIRD_URL) viaenv.py, and additionally updates an existingtinybird.config.json/tinybird.jsonif one is present, viaconfig.py. Addedtests/test_login_persistence.pyto directly exercise this persistence (mocking only the network/browser side ofbrowser_login), since the only prior coverage was ofrun_pull's workflow (tests/test_cli_workflows.py).Testing
make lint,make typecheck,make testall green (160 tests passing, incl. 9 new).make check'ssecrets/gitleaks target fails in this sandbox on an unrelated SSL/network error fetching its pre-commit environment — not caused by this change.Checklist
lint,typecheck,test,secrets)pre-commit run --all-filespasses locallyREADME.md/CONTRIBUTING.md) if neededCHANGELOG.mdwas updated when user-facing behavior changed