Skip to content

feat(cli): the Google Drive sign-in moves under cocoindex auth - #2792

Merged
georgeh0 merged 1 commit into
mainfrom
reduce/cli-cocoindex-auth-sign-in
Nov 9, 2026
Merged

georgeh0 merged 1 commit into
mainfrom
reduce/cli-cocoindex-auth-sign-in

Conversation

@georgeh0

@georgeh0 georgeh0 commented Nov 9, 2026

Copy link
Copy Markdown
Member

Summary

  • 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; cocoindex auth sign-in --help lists 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.
  • The messages that tell the user to sign in (_oauth.py, gdrive.rs), the CLI docs (cli.mdx regenerated, cli_rust.mdx), the Google Drive connector page, the CocoIndex Agents example and the release script's docstring name the new command.
  • The Google Drive connector page gains three sections, checked against the code:
    • the members of the Python UserAccount (token_path, sign_in, sign_out, email, is_signed_in), as the Rust tab lists them;
    • "Signing in from your own program", in Python and Rust: check is_signed_in(), call sign_in() before the run, then run the app. It says that sign_in waits 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;
    • a caution on the token file: it holds a long-lived refresh token in plain text, how it is protected on macOS/Linux and on Windows, what not to do with it, and how to revoke it.

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 runs auth sign-in --help, auth sign-out --help and both google-drive commands)
  • 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-files
  • The Rust snippet of the new docs section was compiled as a temporary SDK test; the Python snippet passes mypy --strict.

🤖 Generated with Claude Code

`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>
@georgeh0
georgeh0 marked this pull request as ready for review November 9, 2026 00:40
@georgeh0
georgeh0 added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 585b823 Nov 9, 2026
15 checks passed
@georgeh0
georgeh0 deleted the reduce/cli-cocoindex-auth-sign-in branch November 9, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant