open-index/open-npm huggingface dataset:
npm package: @opscode/snappy
Description: Generate beautiful code snapshot images from local files with customizable themes and backgrounds
Author: opscode
Latest version: 1.0.1

# @opscode/snappy

Generate beautiful code snapshot images from local files with customizable themes and backgrounds.

## Features

- 🎨 **Multiple Themes**: Choose from Nord, Dracula, GitHub Dark/Light, Monokai, and more
- 🌈 **Custom Backgrounds**: Use preset gradients or your own images
- 🔧 **Configurable**: Set default themes, backgrounds, and opacity
- 💨 **Lightweight**: Uses your system's Chrome/Chromium instead of bundling a browser
- 📦 **Easy to Use**: Simple CLI interface with sensible defaults

## Installation

```bash
npm install -g @opscode/snappy
```

**Requirements:**
- Node.js >= 12.0.0
- Chrome, Chromium, or Edge browser installed

## Quick Start

```bash
# Basic usage
snappy capture myfile.js

# With custom theme and background
snappy capture myfile.js --theme dracula --background ocean

# With custom opacity
snappy capture myfile.js --opacity 80

# Use your own background image
snappy capture myfile.js --background ./my-wallpaper.png
```

## Commands

### `capture`
Generate a code snapshot from a file.

```bash
snappy capture <file> [options]
```

**Options:**
- `-o, --output <path>` - Output file path
- `-t, --theme <name>` - Theme to use (dracula, nord, github-dark, etc.)
- `-b, --background <preset|path>` - Background (preset name or image path)
- `--opacity <0-100>` - Window opacity (default: 100)

### `list`
List available themes and backgrounds.

```bash
snappy list
```

### `config`
Manage default configuration.

```bash
# Set default theme
snappy config:theme:set dracula

# Set default background
snappy config:background:set ocean

# Set default opacity
snappy config:opacity:set 90
```

## Available Themes

- `nord`
- `dracula`
- `github-dark`
- `github-light`
- `material-theme`
- `monokai`
- `min-light`

## Available Background Presets

- `dawn` - Orange to pink gradient
- `dusk` - Blue to purple gradient
- `cool` - Cyan to blue gradient
- `warm` - Yellow gradient
- `neon` - Green to blue gradient
- `ocean` - Teal to purple gradient
- `forest` - Green gradient
- `cyber` - Pink gradient
- `grape` - Orange to yellow gradient
- `midnight` - Dark gray gradient

## Examples

```bash
# Capture with Nord theme and ocean background
snappy capture app.ts --theme nord --background ocean

# Use custom background image with transparency
snappy capture app.ts --background ./wallpaper.png --opacity 75

# Set defaults and use them
snappy config:theme:set dracula
snappy config:background:set dawn
snappy capture app.ts
```

## License

MIT

## Author

opscode
npm package: @opsfolio/ontology
Description: Opsfolio ontology and typed Drizzle schema
Latest version: 1.1.1

# @opsfolio/ontology

Opsfolio ontology package containing typed Drizzle schema and migrations.

## Install

```bash
npm install @opsfolio/ontology drizzle-orm better-sqlite3
```

## Includes

- Typed schema in `src/models.ts`
- Drizzle relations in `src/relations.ts`
- SQL views in `src/views.ts`
- Entry points in `src/index.ts`
- SQL migrations under `migrations/`

## Usage

Import schema from the package:

```ts
import * as schema from "@opsfolio/ontology";

// Example table handles:
schema.auditSession;
schema.contactType;
schema.message;
schema.communicationEmailView;
```

You can also import subpaths:

```ts
import * as schema from "@opsfolio/ontology/models";
import * as relations from "@opsfolio/ontology/relations";
import * as views from "@opsfolio/ontology/views";
```

Create a Drizzle client and run queries:

```ts
import Database from "better-sqlite3";
import { drizzle } from "drizzle-orm/better-sqlite3";
import * as schema from "@opsfolio/ontology";

const sqlite = new Database("app.db");
const db = drizzle(sqlite, { schema });

const sessions = await db.select().from(schema.auditSession).limit(10);
```

Migrations are shipped in this package under `migrations/` and can be applied by your app's migration runner.

## Generate SQL migrations

This project uses `drizzle-kit` with config in `drizzle.config.ts`:

- `schema`: `src/models.ts`, `src/views.ts`
- `out`: `./migrations`

After any schema change, generate migration SQL files with:

```bash
npm run migrate:generate
```

Optional validation:

```bash
npm run migrate:check
```