Skip to content

Quick Start

Get Nadi up and running in your application in under 5 minutes.

Prerequisites

  • A Nadi account at nadi.pro
  • An application created in the Nadi dashboard
  • Your API Key and Application Key

Step 1: Get Your Keys

  1. Log in to the Nadi Dashboard
  2. Create your API Key at API Tokens
  3. Create a new application or select an existing one
  4. Copy your Application Key from the application page details (e.g., https://nadi.pro/applications/<your-app-uuid>)

INFO

Your API Key authenticates requests to the Nadi API. Your Application Key identifies which application the errors belong to.

Step 2: Install the SDK

Choose the SDK for your platform:

bash
composer require nadi-pro/nadi-laravel
php artisan nadi:install
# During installation, you will be prompted for your API Key and App Key
bash
composer require nadi-pro/nadi-php
bash
npm install @nadi-pro/browser
bash
# Download the latest release from:
# https://github.com/nadi-pro/nadi-wordpress/releases/latest
# Upload via WordPress > Plugins > Add New > Upload Plugin

Step 3: Configure the SDK

env
NADI_ENABLED=true
NADI_DRIVER=log
php
<?php
use Nadi\Client;

$client = new Client([
    'transporter' => 'file',
    'storagePath' => '/var/log/nadi',
]);
javascript
import { init } from '@nadi-pro/browser'

init({
  apiKey: 'your-api-key',
  appKey: 'your-application-key',
})
text
Navigate to Settings > Nadi in WordPress admin
Enter your API Key and Application Key
Click "Save Changes"

Credentials in nadi.yaml

API credentials (apiKey and appKey) are configured in nadi.yaml for the Shipper agent, not in your SDK or .env file. See Step 4 below for details.

Step 4: Install Shipper

The Shipper agent reads log files and sends them to Nadi. Install it on the same server as your application:

bash
sudo bash < <(curl -sL https://raw.githubusercontent.com/nadi-pro/shipper/master/install)
powershell
powershell -command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/nadi-pro/shipper/master/install.ps1', '%TEMP%\install.ps1') && %TEMP%\install.ps1 && del %TEMP%\install.ps1"

Configure Shipper

Edit the Shipper configuration file:

OSLocation
Linux/opt/nadi-pro/shipper/nadi.yaml
macOS/usr/local/nadi-pro/shipper/nadi.yaml
WindowsC:\ProgramData\Nadi-Pro\Shipper\nadi.yaml
yaml
nadi:
  endpoint: https://nadi.pro/api/
  apiKey: your-api-key
  appKey: your-application-key
  storage: /var/log/nadi  # Path where your app writes logs

Step 5: Test the Integration

Laravel

Use the built-in Artisan commands to verify your setup:

bash
# Test the API connection
php artisan nadi:test

# Verify the App Key
php artisan nadi:verify

Trigger a Test Error

You can also trigger a test error to verify end-to-end error tracking:

php
// In a route or controller
Route::get('/test-nadi', function () {
    throw new \Exception('Test error from Nadi integration');
});
php
<?php
throw new \Exception('Test error from Nadi integration');
javascript
// In your application code
throw new Error('Test error from Nadi integration')
php
// In a plugin or theme
throw new Exception('Test error from Nadi integration');

Check the Nadi dashboard - you should see the error appear within a few seconds!

Next Steps

Now that you have Nadi set up, explore these features:

Troubleshooting

Errors not appearing in dashboard?

  1. Check log file permissions - Ensure your app can write to the log directory
  2. Verify Shipper is running - Run shipper --status to check
  3. Check API keys - Ensure both API Key and App Key are correct
  4. Review Shipper logs - Check for connection errors

Need help?

Released under the MIT License.