Particle-cli login does not accept username and password anymore

I use Travis CI to build some of my projects that use particle devices. I use the particle-cli to compile the application.
Up to particle-cli@1.27.1 it was possible to login with particle login <username> <password>. This was simple to use with travis that supports encrypted secure environment variables like particle login $PARTICLE_USER $PARTICLE_PWD.
My latest travis build installed particle-cli@1.28.1 and now fails at the particle login.

Is there a reason why the possibility to provide username and password on the login command line was removed?

Thanks and regards

1 Like

@jvanier refactored the CLI recently and the functionality might have changed.

I’ve always used expect to feed input to particle login, which has worked well for years.

Try this expect script:

The spawn line may have to be updated to whatever which particle gives you.

After saving, and making it executable, you can run it with:


Thanks for reporting this. I worked on a refactor of the command line parsing recently and several commands had undocumented command line arguments that I wasn’t aware of. I opened a bug report on GitHub to bring back this behavior.

:+1: Thanks.