Support for multiple accounts #26

ksuther opened this Issue Oct 16, 2012 · 3 comments


None yet

3 participants

ksuther commented Oct 16, 2012

I need to access different accounts depending on the project I'm working on, so it'd be really nice to be able to save the credentials for multiple accounts and quickly switch between them using an alias.

Here's how I was envisioning this would work:

  • login can optionally be login [accountname] [alias]

If only an account name is specified, it's saved in the Keychain with no alias (the same as the current login command, just skipping the username prompt). If an alias is specified then the account name/alias pair is saved somewhere. Maybe in ~/.cupertino? I don't know the ruby conventions for saving config data like that.

  • logout can be logout:all or logout [accountname or alias]

Logging out would delete the saved alias if one exists.

  • New command account to change the active account (e.g. ios account myalias)

Calling with no argument would print the active account.

I'm hoping to eventually hack this in myself, but I'm leaving this here for now if anyone else has any usage suggestions or gets inspired themselves :)

tehnoir commented Nov 5, 2012

Just wanted to chime in to second this. Day to day I need to be managing devices on multiple accounts. Need a quick way to switch between them.

ksuther commented Nov 8, 2012

Well I just pushed very basic -- and incomplete -- account support to my own fork. My ruby skills are non-existent as well, so anyone who knows what they're doing will probably cringe if they look at it.

I also noticed there's another fork that contains multiple account support here: His implementation is a bit more complete, but I like the alias option that I added to mine.

Mine works with a ~/.cupertino config file that looks something like:

current: test1

You can print the list of accounts with ios account and you can select which account is active with ios account test1. Right now you need to manually specify the aliases, but I'll probably add a way to set aliases in the login command.

mattt commented Oct 4, 2013

Account management is something that feels out of scope for this utility, and isn't a feature that I'm choosing to include at this time. Sorry for the inconvenience.

As a suggested alternate approach, you could set cupertino logout / login as an action that's triggered as you cd into a directory, similar to how rvm does when encountering a .rvmrc file.

@mattt mattt closed this Oct 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment