Skip to content
CyberArk Conjur command line interface (Ruby)
Branch: master
Clone or download
Latest commit f46e67d May 22, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin require pry for development environment (#235) Oct 17, 2018
ci CI: Do a fresh gem resolution for each MRI version test Oct 8, 2018
lib Bump version to 6.2.1 May 22, 2019
spec add ldap-sync subcommand Jun 20, 2018
.dockerignore Get specs and cukes passing, pipeline the build (#168) Jul 7, 2017
.gitignore Compact output by default when listing objects (#169) Jul 11, 2017
.kateproject Added .kateproject May 2, 2013
.overcommit.yml overcommit and rubocop settings Jan 23, 2016
.project added eclipse project file and .rvmrc Dec 27, 2012
.rubocop.yml Disable Style/StringLiterals rubocop Oct 20, 2017
APPLIANCE_VERSION conjur-cli wrapper package now works Mar 1, 2016
Dockerfile Fix Possum branch CI build (#182) Sep 29, 2017
Dockerfile.fpm Lock bundler to 1.11.2 May 3, 2016
Dockerfile.publish deb build and publish Mar 2, 2016
Dockerfile.standalone Update ruby in Docker image to 2.4.6 May 7, 2019
Dockerfile.validate-packaging fix build-deb by re-adding .git to the docker context Apr 13, 2016
Gemfile remove all possum references Sep 29, 2017
Jenkinsfile Update Jenkinsfile to build standalone in branch May 7, 2019 cherry pick license update Oct 5, 2017 Bump conjur api 4957 (#214) Apr 5, 2018
Rakefile Remove unused and outdated ci_reporter_cucumber Oct 8, 2018
VERSION Fixed issue with broken xdg 2.2.4 gem May 22, 2019 Revert "reset to point before master merges" Oct 5, 2017
conjur-cli.gemspec Fixed issue with broken xdg 2.2.4 gem May 22, 2019 experimental publication of Conjur CLI gem and dependencies as deb Mar 1, 2016
docker-compose.yml Revert "reset to point before master merges" Oct 5, 2017
profile.rb Finished repairing damage due to optimization Apr 16, 2014 Fix Possum branch CI build (#182) Sep 29, 2017
standalone.entrypoint Automated dockerhub build support (#163) Jun 15, 2017


Command-line interface for Conjur.

NOTE: Conjur v4 users should use the v5.x.x release path. Conjur CLI v6.0.0 only supports Conjur v5 and newer.

A complete reference guide is available at

Quick start

$ gem install conjur-cli

$ conjur -v
conjur version 6.0.0

Using Docker

Docker Build Status This software is included in the standalone cyberark/conjur-cli:5 Docker image. Docker containers are designed to be ephemeral, which means they don't store state after the container exits.

You can start an ephemeral session with the Conjur CLI software like so:

$ docker run --rm -it cyberark/conjur-cli:5

Any initialization you do or files you create in that session will be discarded (permanently lost) when you exit the shell. Changes that you make to the Conjur server will remain.

You can also use a folder on your filesystem to persist the data that the Conjur CLI uses to connect. For example:

$ mkdir mydata
$ chmod 700 mydata
$ docker run --rm -it -v $(PWD)/mydata:/root cyberark/conjur-cli:5 init -u

SHA1 Fingerprint=E6:F7:AC:E3:3A:54:83:4F:D0:06:9B:49:45:C3:85:58:ED:34:4C:4C

Please verify this certificate on the appliance using command:
              openssl x509 -fingerprint -noout -in ~conjur/etc/ssl/conjur.pem

Trust this certificate (yes/no): yes
Enter your organization account name:
Wrote certificate to /root/
Wrote configuration to /root/.conjurrc
$ ls -lA mydata
total 16
drwxr-xr-x  2 you  staff    68 Mar 29 14:16 .cache
-rw-r--r--  1 you  staff   136 Mar 29 14:16 .conjurrc
-rw-r--r--  1 you  staff  3444 Mar 29 14:16
$ docker run --rm -it -v $(PWD)/mydata:/root cyberark/conjur-cli:5 authn login -u admin 
Please enter admin's password (it will not be echoed): 
Logged in
$ ls -lA mydata
total 24
drwxr-xr-x  2 you  staff    68 Mar 29 14:16 .cache
-rw-r--r--  1 you  staff   136 Mar 29 14:16 .conjurrc
-rw-------  1 you  staff   119 Mar 29 14:19 .netrc
-rw-r--r--  1 you  staff  3444 Mar 29 14:16

Security notice: the file .netrc, created or updated by conjur authn login, contains a user identity credential that can be used to access the Conjur API. You should remove it after use or otherwise secure it like you would another netrc file.


Create a sandbox environment in Docker using the ./dev folder:

$ cd dev
dev $ ./

This will drop you into a bash shell in a container called cli.

The sandbox also includes a Postgres container and Conjur server container. The environment is already setup to connect the CLI to the server:

  • CONJUR_APPLIANCE_URL http://conjur
  • CONJUR_ACCOUNT cucumber

To login to conjur, type the following and you'll be prompted for a password:

root@2b5f618dfdcb:/# conjur authn login admin
Please enter admin's password (it will not be echoed):

The required password is the API key at the end of the output from the script. It looks like this:

=============== LOGIN WITH THESE CREDENTIALS ===============

username: admin
api key : 9j113d35wag023rq7tnv201rsym1jg4pev1t1nb4419767ms1cnq00n


At this point, you can use any CLI command you like.

Running Cucumber

To install dev packages, run bundle from within the container:

root@2b5f618dfdcb:/# cd /usr/src/cli-ruby/
root@2b5f618dfdcb:/usr/src/cli-ruby# bundle

Then you can run the cucumber tests:

root@2b5f618dfdcb:/usr/src/cli-ruby# cucumber


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


Copyright 2016-2017 CyberArk

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.