Getting Started
1. Install the latest release
Homebrew (macOS and Linux)
brew install gptscript-ai/tap/gptscript
Install Script (macOS and Linux):
curl https://get.gptscript.ai/install.sh | sh
WinGet (Windows)
winget install gptscript-ai.gptscript
Manually
Download and install the archive for your platform and architecture from the releases page.
2. Get an API key from OpenAI.
macOS and Linux
export OPENAI_API_KEY="your-api-key"
Windows
$env:OPENAI = 'your-api-key'
3. Run Hello World
gptscript https://get.gptscript.ai/echo.gpt --input 'Hello, World!'
OUTPUT:
Hello, World!
The model used by default is gpt-4-turbo-preview
and you must have access to that model in your OpenAI account.
4. Extra Credit: Examples and Run Debugging UI
Clone examples and run debugging UI
git clone https://github.com/gptscript-ai/gptscript
cd gptscript/examples
# Run the debugging UI
gptscript --server