Skip to content

feat: add onboard to sign in and store a project API key - #154

Open
bitpshr wants to merge 1 commit into
mainfrom
paul/onboard
Open

bitpshr wants to merge 1 commit into
mainfrom
paul/onboard

Conversation

@bitpshr

@bitpshr bitpshr commented Sep 28, 2026 •

Copy link
Copy Markdown

Summary

This pull request adds two new commands to the CLI: elevenlabs onboard and elevenlabs onboard status. Both are meant to be called from the ElevenLabs skills, print JSON for them, and are intentionally hidden from CLI help output and from README documentation.

@bitpshr
bitpshr marked this pull request as ready for review October 2, 2026 15:03
@bitpshr
bitpshr requested review from a team and PaulAsjes and removed request for PaulAsjes October 2, 2026 22:56
@bitpshr
bitpshr force-pushed the paul/onboard branch 2 times, most recently from 3d3d866 to f622f9f Compare October 3, 2026 20:03
Comment thread cli/elevenlabs/workflow/onboard/mod.rs Outdated
Clip::Key(key) => {
let verdict = auth::key_matches_sign_in(&client, &api_base, &key);
if verdict.as_ref().is_ok_and(|same| *same) {
env_file::write(&env_file, &env_file::with_key(&existing, &key))?;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the write fails, then this returns an error and the key is never cleared from the clipboard. Should also return a readable error in this case.

)
.map_err(fail)?;
match response.status() {
s if s == 401 || s == 403 => Ok(None),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case where an API key has scoped permissions and it doesn't include user-read, this will incorrectly flag that the key is invalid. We should check the body in case of a 401 and see if it is a bad key or if it's missing permissions.

Perhaps in the case of a restricted key we should print out a warning.

Comment thread cli/elevenlabs/workflow/onboard/auth.rs Outdated
.and_then(loopback)
.unwrap_or_else(|| config.token_url.trim_end_matches("/v1/oauth/token").into());
let token_url = format!("{oauth_base}/v1/oauth/token");
let mut params = vec![("key_handoff", "clipboard".to_string())];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add either ELEVEN_VIA or an additional parameter for attribution? I'd like to track how many accounts were created via an agent.

Could also add a unique ID in this initial request that we print and include in subsequent requests via the skill so we can track whether the full onboarding > first request flow worked.

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.

2 participants