How do I switch to my team org on the Heroku CLI?
Asked Answered
A

3

11

When I try to see which apps I have access to nothing shows up:

% heroku apps     
You have no apps.

However I'm a member of an org:

% heroku teams
example-org  member

This org has an app.

Is there a way to swich to the example-org org on the Heroku CLI?

Agora answered 29/1, 2021 at 11:17 Comment(0)
I
16

You will have to set an environment variable HEROKU_ORGANIZATION to your team name, for example, if your team name was backend-team it would be like.

export HEROKU_ORGANIZATION=backend-team

This will set backend-team as your default team. Now you can run heroku apps to access all the apps of that team.

Imperious answered 11/10, 2022 at 20:21 Comment(3)
Works great as of today in 2023.Sent
worked for me june 2023Say
still works in July 2024Carlyle
A
5

You can now specify the team name using a -t or --team command line argument:

heroku teams
heroku apps -t your-team-name

Full details: https://devcenter.heroku.com/changelog-items/982

Assault answered 19/7, 2023 at 10:27 Comment(0)
A
3

It appears this functionality isn't implemented by Heroku yet, but I tried with heroku domains -a example-app and it works.

Agora answered 29/1, 2021 at 11:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.