You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactors how keys are stored to support multiple teams. a config file is used to store a user-supplied name for a key. that name is used to look up the key from the secret store,
auth login|logout require naming keys with --name/-n,
➜ loops login --name staging
Enter your API key:
API key saved as "staging". Authenticated as team: nate-send4.l3s.email
➜ loops login --name prod
Enter your API key:
API key saved as "prod". Authenticated as team: Loops
keys can be listed,
➜ task -- auth list
NAME API KEY
staging ****************************abcd
prod ****************************efgh
a global flag --team/-t can be used to specify the team,
➜ loops lists list -t staging
ID NAME DESCRIPTION PUBLIC
cm9j0iv8g0asd0iym9dcwa6qm SPAM false
cmmz0d86p0sdf0iy1bsrf14r4 Cold Email Outreach ALWAYS BE CLOSING false
you can set an "active" team. the active team is used when --team or LOOPS_API_KEY is not supplied. loops auth set team-name sets the team,
➜ loops auth use staging
Active team set to "staging".
if an active team is set, it shown in the list output,
➜ loops auth list
NAME API KEY
staging (active) ****************************abcd
prod ****************************efgh
unset the active team with loops auth use --clear,
@nalanj not really, but if LOOPS_API_KEY is set, it is used no matter what (im picturing ci). otherwise an active key or --team needs to be set. that said, i think what you're suggesting is a good idea. ill take a look.
actually, when you log in loops auth login --name blah it becomes the active key. so, yeah, i guess in that case it would use the only key by default. that wouldn't stop you from unsetting the active key. if LOOPS_API_KEY is not set, no --team is supplied, and no active key is set you'd get an error.
@notnmeyer I think in the default case of one login it should just always do what you'd expect, rather than erroring for you to choose from the one team you have defined
➜ task -- auth list
NAME API KEY
staging ****************************blah
➜ task -- transactional list
ID NAME LAST UPDATED VARIABLES
cm9bkshgz0000uj0qbjbzrgqw Attachments Test 2026-03-02T21:44:46.302Z
cmkzxyhsr00050i1rw7w1f6b7 Blank transactional 2026-02-05T04:36:29.163Z
cmm3usezb00010iyhtfok5ulf transactional test 2026-03-20T00:00:49.178Z var1, var2, items[].array-val, reply-to, cc
cmmf9qifa00000iz9bhmb3ob0 Blank transactional 2026-03-19T23:25:09.238Z
cmmy3s18z000g0i1oc3qtnwby empty array error 2026-03-19T23:30:58.824Z
cmmy7gjdq00000i2ylgb5xwnu Blank transactional 2026-03-20T01:13:34.389Z
➜ task -- auth list
NAME API KEY
staging ****************************blah
prod ****************************blah
➜ task -- transactional list
Error: no active team set — run `loops auth login --name <name>` to authenticate
exit status 1
task: Failed to run task "default": exit status 1
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
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.
refactors how keys are stored to support multiple teams. a config file is used to store a user-supplied name for a key. that name is used to look up the key from the secret store,
auth login|logoutrequire naming keys with--name/-n,keys can be listed,
a global flag
--team/-tcan be used to specify the team,you can set an "active" team. the active team is used when
--teamorLOOPS_API_KEYis not supplied.loops auth set team-namesets the team,if an active team is set, it shown in the list output,
unset the active team with
loops auth use --clear,