This article has 471 words.
Running okKoala in the console
Introduction
okKoala CLI (Command-Line-Interface) allows you to perform exactly the same actions allowed by web applications available at https://okkola.com. Its advantage is that it is easy to create process automations according to your own discretion. It is built on Node.js, and since JavaScript is an uncompiled language - scripting - you can see the the source code before you install the CLI on your system. The source code is available at https://github.com/okkoala/cli.
How do I know if I need the okkoala’s CLI?
If you work in a console on a daily basis and want to automate koala work on multi-company accounts, the okKoala CLI can help. If you’re a Unix philosophy enthusiast, you’re sure to find something to your liking. okKoala CLI will help when you’re responsible for in charge of cyber security as a subcontractor in multiple companies, and okKoala is your daily work tool. Using the CLI to work with a company of less than <100 users probably doesn’t make much sense.
System requirements
The okKoala CLI works independently of the operating system. The requirement is to have a user folder and any shell interpreter: sh, powershell, bash, zsh etc. Running in administrator mode is not recommended, you may end up with an error.
Installation
Installation process:
- install Node.js. You can check the installation status by the command: node –version
- install okkoala-cli: npm install -g @okkoala/koala@latest
If you want to update the CLI, just call the command from step 2. It is recommended to install updates on the fly.
Logging in to the platform
- log in the company account as an administrator at https://okkoala.com
- go to Settings > Integration > Get token, then copy the contents of the token field
- open the console
- call the command
koala auth X
, where instead of X paste the token value downloaded from the site - you can check if everything works by enumerating all employees:
koala ListEmployee
.
The result of the login is the creation of a .koala/token file in the user’s home directory. If you want to log out, delete this file.
Log out of local session
Delete the .koala/token file in the user’s home directory.
List of commands, help for commands.
You can get the current list of commands using the koala help
command. If you need to know what parameters
a command requires (for example, to create a user), you can use koala CreateEmployee help
.
What to use CLI for?
- Pulling data from koala to yourself (we don’t like vendor lock)
- Integration with your tools
- Data warehouses
- Accounts management
- CRON
- SIEM
What not to use CLI for?
- Setting parameters of the organization - it’s easy to mess something up.
- Giving permissions to employees - it’s even easier to give everyone global admin.
- Creating templates - unless you have your own .html preview in .png form.
- Creating queries for technical support.