open-index/open-npm huggingface dataset:
npm package: @marrakesh/cli
Description: CLI for testing Marrakesh prompts
Latest version: 0.1.0-alpha.2

# Marrakesh CLI

Test your prompts like you test code.

## Installation

```bash
# Global install
npm install -g @marrakesh/cli

# Or use via npx
npx @marrakesh/cli test
```

## Commands

### `@marrakesh/cli test [pattern]`

Run tests matching the glob pattern.

```bash
# Test all files
npx @marrakesh/cli test

# Test specific directory
npx @marrakesh/cli test "src/prompts/**/*.ts"

# Watch mode
npx @marrakesh/cli test --watch

# Stop on first failure
npx @marrakesh/cli test --bail

```

**Options:**

- `-w, --watch`: Watch mode - rerun tests on file changes
- `--bail`: Stop on first failure

## Usage

### 1. Define Tests in Your Code

```typescript
// src/prompts/weather.ts
import { prompt, tool, createVercelAIExecutor } from '@marrakesh/core'
import { openai } from '@ai-sdk/openai'

export const weatherAgent = prompt('You are a weather assistant')
  .tool(getWeather)
  .test([
    { input: 'Weather in Paris?', expect: { city: 'Paris' } },
    { input: 'Is it raining in Tokyo?', expect: { city: 'Tokyo' } }
  ])
```

### 2. Run Tests

```bash
npx @marrakesh/cli test
```

Output:

```
🧪 Running tests...

📝 weatherAgent
  ✅ Weather in Paris? (243ms)
  ✅ Is it raining in Tokyo? (312ms)
  2/2 passed (100.0%) in 555ms

✨ All tests passed! 2/2 (100.0%)
   Time: 555ms
```

### 3. Watch Mode

```bash
npx @marrakesh/cli test --watch
```

Press `a` to run all tests, `Ctrl+C` to exit.

## Environment Variables

- `MARRAKESH_API_KEY`: Your Marrakesh API key for analytics tracking
- `MARRAKESH_ANALYTICS_DISABLED`: Set to `true` to disable analytics
- `MARRAKESH_DEBUG`: Set to `true` to enable debug logging

## CI/CD Integration

### GitHub Actions

```yaml
name: Test Prompts

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
      - run: npm install
      - run: npx @marrakesh/cli test
        env:
          MARRAKESH_API_KEY: ${{ secrets.MARRAKESH_API_KEY }}
```

## Documentation

For complete documentation, see:

- [Testing Guide](../../docs/TESTING.md)
- [Main README](../../README.md)

## License

MIT
npm package: @marraph/daisy
Description: Daisy is a component library for the marraph organisation
Latest version: 1.0.144

---
layout:
  title:
    visible: true
  description:
    visible: false
  tableOfContents:
    visible: true
  outline:
    visible: true
  pagination:
    visible: true
---

# Color Scheme

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><img src=".gitbook/assets/image (5).png" alt="" data-size="original"></td><td>black<br>#090909</td><td></td></tr><tr><td><img src=".gitbook/assets/image (7).png" alt="" data-size="original"></td><td>black-light</td><td>#111111</td></tr><tr><td><img src=".gitbook/assets/image (10).png" alt="" data-size="original"></td><td>dark</td><td>#171717</td></tr><tr><td><img src=".gitbook/assets/image (11).png" alt="" data-size="original"></td><td>dark-light</td><td>#1C1C1C</td></tr><tr><td><img src=".gitbook/assets/image (12).png" alt="" data-size="original"></td><td>edge</td><td>#484848</td></tr><tr><td><img src=".gitbook/assets/image (13).png" alt="" data-size="original"></td><td>marcador</td><td>#878787</td></tr><tr><td><img src=".gitbook/assets/image (14).png" alt="" data-size="original"></td><td>gray</td><td>#A6A6A6</td></tr><tr><td><img src=".gitbook/assets/image (15).png" alt="" data-size="original"></td><td>white</td><td>#ECECEC</td></tr><tr><td><img src=".gitbook/assets/image (16).png" alt="" data-size="original"></td><td>white-dark</td><td>#C7C7C7</td></tr><tr><td><img src=".gitbook/assets/image (17).png" alt="" data-size="original"></td><td>lavender</td><td>#8855BB</td></tr><tr><td><img src=".gitbook/assets/image (18).png" alt="" data-size="original"></td><td>lavenderlight</td><td>#967BB6</td></tr></tbody></table>