> For the complete documentation index, see [llms.txt](https://koii-network.gitbook.io/getting-started/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://koii-network.gitbook.io/getting-started/koii-software-toolkit-sdk/using-the-cli.md).

# Using the Koii CLI

To interact with the K2 locally, you need to install the Koii CLI, create a Koii wallet, and airdrop some Koii tokens into your wallet.

{% hint style="danger" %}
File-system wallets are the **least secure** method of storing tokens. Storing large amounts of tokens in a file-system wallet is **not recommended**.
{% endhint %}

### Install Koii CLI

Run the command below to install the Koii command-line tools:

```
sh -c "$(curl -sSfL https://koi-node-releases.s3.us-east-2.amazonaws.com/koii-install-init.sh)"
```

After installation is complete, you should see a prompt in the terminal: `Please update your PATH environment variable to include the koii programs` . Copy and run the command beneath this prompt to update your `PATH` environment.

To confirm your `PATH` environment has been updated run `echo $PATH`

Run the command below to confirm that the CLI was successfully installed:

```
koii --version
```

{% hint style="info" %}
For Mac users, you might find if you open another terminal the koii cli would not work. Follow these steps to update PATH.\
\- After installing koii cli, copy the PATH first\
\- run command `vi ~/.zshrc`\
\`\`- Insert "export <*paste your path here>*"\
\- Save and close exit it, and you are good to go!
{% endhint %}

To run the test validator, use command:

```
koii-test-validator
```

The K2 would run locally.

### Create a Koii Wallet

The next step is to create a Koii file system wallet locally. To get the command for creating a wallet, run:

```
koii address
```

If you do not have a Koii wallet in `./.config/koii/id.json` ,you should see an error prompt:

{% code overflow="wrap" %}

```
Error: No default signer found, run "koii-keygen new -o /Users/<YOUR_HOME>/.config/koii/id.json" to create a new one
```

{% endcode %}

Run the "koii-keygen" command you're prompted to run.

```
koii-keygen new -o /Users/<YOUR_HOME>/.config/koii/id.json
```

{% hint style="info" %}
For different operating system. The path might have a little bit different. Remeber to update your path before running the command.
{% endhint %}

This command will generate an identity keypair. You can add a BIP39 passphrase for extra security or click the ENTER button for an empty passphrase.

Want to learn more about the BIP39 passphrase? Visit [here](https://www.blockplate.com/blogs/blockplate/what-is-a-bip39-passphrase).

The identity public key can now be viewed by running:

```
koii-keygen pubkey /Users/<YOUR_HOME>/.config/koii/id.json
```

Copy and save your wallet path so you can interact with any Koii stack locally.

{% hint style="info" %}
Your wallet path would be used in create a task and run desktop node.
{% endhint %}

Congratulations! Now you have a Koii wallet, check [here](/getting-started/koii-software-toolkit-sdk/wallet-and-faucet.md) to airdrop some KOII in your wallet.
