Skip to content

PrimeThink CLI

Installation Guide

Welcome to PrimeThink CLI! This guide will help you install the CLI tool on your system.

Quick Install

curl -fsSL https://primethink.ai/cli/install.sh | bash

Windows PowerShell

irm https://primethink.ai/cli/install.ps1 | iex

Windows Command Prompt

curl -fsSL https://primethink.ai/cli/install.cmd -o install.cmd && install.cmd && del install.cmd

Alternative Installation Methods

Homebrew (macOS & Linux)

# Add our tap (one-time setup)
brew tap primethink/tap

# Install the CLI
brew install primethink-cli

Python pip (All Platforms)

# Install globally
pip install primethink-cli

# Or install for current user only
pip install --user primethink-cli

NPM (Node.js users)

npm install -g primethink-cli

Verification

After installation, verify it works:

primethink --version
primethink --help

Requirements

  • Python 3.8+ (required for pip installation)
  • Node.js 14+ (only for NPM installation)
  • Homebrew (only for Homebrew installation)

Getting Started

Authentication

primethink auth login

Basic Usage

# View all available commands
primethink --help

# Get help for a specific command
primethink <command> --help

# Example commands
primethink chat "Hello, how are you?"
primethink analyze document.pdf
primethink generate --type code --prompt "Create a Python function"

Troubleshooting

Common Issues

1. Command not found after installation - Solution: Restart your terminal or add Python's bin directory to your PATH - Linux/macOS: Add export PATH="$HOME/.local/bin:$PATH" to your ~/.bashrc or ~/.zshrc - Windows: Add Python Scripts directory to your system PATH

2. Python not found - Solution: Install Python 3.8 or later from python.org - Make sure Python is added to your system PATH during installation

3. Permission denied errors - Solution: Use --user flag with pip: pip install --user primethink-cli - Or use virtual environments: python -m venv env && source env/bin/activate

4. SSL/Certificate errors - Solution: Update certificates or use pip with trusted hosts:

  pip install --trusted-host pypi.org --trusted-host pypi.python.org primethink-cli

Manual Installation

If automatic installation fails, you can install manually:

  1. Download the source:

       git clone https://github.com/yourusername/primethink-cli.git
       cd primethink-cli
    

  2. Install in development mode:

       pip install -e .
    

Uninstalling

Pip installation:

pip uninstall primethink-cli

Homebrew installation:

brew uninstall primethink-cli
brew untap yourusername/tap  # Optional: remove tap

NPM installation:

npm uninstall -g primethink-cli

Configuration

Config File Location

  • Linux/macOS: ~/.config/primethink/config.yml
  • Windows: &#37;APPDATA&#37;\primethink\config.yml

Environment Variables

  • PRIMETHINK_API_KEY: Your API key
  • PRIMETHINK_BASE_URL: Custom API endpoint (optional)
  • PRIMETHINK_CONFIG_PATH: Custom config file path (optional)

Sample Configuration

api_key: your-api-key-here
base_url: https://api.primethink.ai
timeout: 30
output_format: json

Support

Contributing

We welcome contributions! See our Contributing Guide for details.

License

This project is licensed under the MIT License. See LICENSE for details.