Application user

I need a user who can run knife commands only and not able to web login. I need this user to be used from CI server to run knife commands.

I tried to create a client and chnaged existing client and pem from .chef/client.rb and .chef folder respectively but I am not able to run commands.

What is the right way of creating user (or client) and swap existing user/client so I can run knife commands?

Thanks

M