NEAR AI CLI¶
The NEAR AI CLI allows you to interact with NEAR AI's services to create agents or train and test models. Let's quickly review how to install it and login with your NEAR account.
Tip
Do you want to build an agent? Install the CLI, login, and then check our Agent Quickstart Guide.
Info
Remember that you can use NEAR AI from the Web Hub, the NEAR AI CLI is targeted at developers who want to build their own agents or train models on NEAR AI.
Installing NEAR AI CLI¶
Python Version
If you do not have python, or your version is not compatible, we recommend that you use miniconda or pyenv to manage your installations, as they both allow you to easily switch between python versions.
Login to NEAR AI¶
To create a new agent, first login with a NEAR Account:
Don't have a NEAR Account?
If you do not have a NEAR account, you can create one for free using wallets listed at wallet.near.org.
If you are unsure of which one to choose, try out Bitte or Meteor Wallet.
You'll be provided with a URL to login with your NEAR account.
Example:
$> nearai login
Please visit the following URL to complete the login process: https://auth.near.ai?message=Welcome+to+NEAR+AI&nonce=<xyzxyzxyzxyzx>&recipient=ai.near&callbackUrl=http%3A%2F%2Flocalhost%3A63130%2Fcapture
After successfully logging in, you will see a confirmation screen. Close it and return to your terminal.
Tip
If you have already logged in on near-cli
, you know your account's private key, or you have the credentials on another device, you can use the following commands to login:
Next Steps¶
That's it! You're now ready to create your first agent. Head over to the Agents Guide to get started.