Repository navigation
feat(cli): the Google Drive sign-in moves under cocoindex auth - #2792
Merged
Merged
Conversation
`cocoindex google-drive sign-in|sign-out` becomes `cocoindex auth sign-in google-drive` and `cocoindex auth sign-out google-drive`, in the Python CLI and the Rust CLI. `auth sign-in` and `auth sign-out` hold one command per provider, each with its own arguments, so a later connector adds its own provider command and `cocoindex auth sign-in --help` lists them. Arguments, options, behavior and the default token file are unchanged. No release has the old command, so it gets no alias. The messages that tell the user to sign in, the CLI docs, the Google Drive connector page, the CocoIndex Agents example and the release script's docstring name the new command. The connector page also gains: - the members of the Python `UserAccount`, as the Rust tab lists them; - "Signing in from your own program", in both languages: check `is_signed_in()`, sign in before the run, then run the app; - a note on keeping the token file safe, and how to revoke it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
cocoindex google-drive sign-in|sign-outbecomescocoindex auth sign-in google-driveandcocoindex auth sign-out google-drive, in the Python CLI and the Rust CLI.auth sign-inandauth sign-outhold one command per provider, each with its own arguments;cocoindex auth sign-in --helplists them. Arguments, options, behavior and the default token file are unchanged. No release has the old command (v1.1.1 does not contain feat(google_drive): sign in with a personal Google account through OAuth #2687), so it gets no alias._oauth.py,gdrive.rs), the CLI docs (cli.mdxregenerated,cli_rust.mdx), the Google Drive connector page, the CocoIndex Agents example and the release script's docstring name the new command.UserAccount(token_path,sign_in,sign_out,email,is_signed_in), as the Rust tab lists them;is_signed_in(), callsign_in()before the run, then run the app. It says thatsign_inwaits up to five minutes for a person, that a host with no browser gets the link and takes the pasted redirect address, and that the CLI and the library share the token file;No change to the sign-in flow, the token file format or location, the scope, the built-in client handling or the release workflow.
Test plan
uv run mypy,uv run pytest python/cargo test -p cocoindex_cli(the e2e test runsauth sign-in --help,auth sign-out --helpand bothgoogle-drivecommands)prek run --from-ref origin/main --to-ref HEAD, and the Rust SDK hooks:prek run cargo-test-sdk cargo-clippy-sdk update-rust-extern-locks cargo-test-rust-externs --all-filesmypy --strict.🤖 Generated with Claude Code