Rawi (راوي) Documentation | Getting Started Install
Installing or Updating Rawi CLI
Section titled “Installing or Updating Rawi CLI”The Rawi Command Line Interface (Rawi CLI) is an open source tool that enables you to interact with AI providers and manage your Rawi configuration directly from your terminal. With minimal setup, you can start running commands to ask questions, manage profiles, and view history—all from your command-line shell.
Supported Platforms
Section titled “Supported Platforms”- Linux shells – Use bash, zsh, or other common shells.
- macOS – Use Terminal or iTerm.
- Windows – Use Command Prompt or PowerShell.
Prerequisites
Section titled “Prerequisites”- Node.js 18+ is required. We recommend using nvm to manage Node.js versions.
- A supported package manager:
npm
orpnpm
.
Install or Update Rawi CLI
Section titled “Install or Update Rawi CLI”Installation
Section titled “Installation”pnpm add -g rawi
npm install -g rawi
yarn global add rawi
Updating
Section titled “Updating”To update Rawi CLI to the latest version, use the same command you used for installation. The package manager will handle the update automatically.
pnpm update -g rawi
npm update -g rawi
yarn global upgrade rawi
Verify Installation
Section titled “Verify Installation”Check your installed version:
rawi --version
rawi/0.0.0-beta.12 linux-x64 node-18.20.2
rawi --version
rawi/0.0.0-beta.12 darwin-x64 node-18.20.2
rawi --version
rawi/0.0.0-beta.12 win32-x64 node-18.20.2
If the rawi
command is not found, ensure your package manager’s global bin directory is in your PATH
. Use the appropriate instructions for your OS and package manager:
# Find the global pnpm bin directorypnpm bin -g# Add it to your PATH (if not already present)export PATH="$PATH:$(pnpm bin -g)"# Optionally, add the above line to your ~/.bashrc, ~/.zshrc, or shell profile
# Find the global npm bin directorynpm config get prefix# Add it to your PATH (if not already present)export PATH="$PATH:$(npm config get prefix)/bin"# Optionally, add the above line to your ~/.bashrc, ~/.zshrc, or shell profile
# Find the global yarn bin directoryyarn global bin# Add it to your PATH (if not already present)export PATH="$PATH:$(yarn global bin)"# Optionally, add the above line to your ~/.bashrc, ~/.zshrc, or shell profile
# Find the global pnpm bin directorypnpm bin -g# Add it to your PATH (in System Properties > Environment Variables)# Example (in PowerShell):$env:Path += ";$(pnpm bin -g)"
# Find the global npm bin directorynpm config get prefix# Add it to your PATH (in System Properties > Environment Variables)# Example (in PowerShell):$env:Path += ";$(npm config get prefix)\bin"
# Find the global yarn bin directoryyarn global bin# Add it to your PATH (in System Properties > Environment Variables)# Example (in PowerShell):$env:Path += ";$(yarn global bin)"
Uninstall Rawi CLI
Section titled “Uninstall Rawi CLI”pnpm remove -g rawi
npm uninstall -g rawi
yarn global remove rawi
Troubleshooting
Section titled “Troubleshooting”If you encounter issues, see the Troubleshooting Guide for solutions to common installation and configuration problems.
Next steps:
After installing Rawi CLI, run the following to configure your first provider:
rawi configure