My App

Getting Started

Installation, setup, and first use of the Seeder Tool

Getting Started

This guide will help you set up and use the Seeder Tool for the first time.

Prerequisites

1. Environment Configuration

The Seeder Tool requires your InstantDB App ID to be configured:

# In your .env file (project root)
NEXT_PUBLIC_INSTANT_APP_ID=your-app-id-here

Finding Your App ID:

  1. Log in to InstantDB Dashboard
  2. Select your app
  3. Copy the App ID from the settings page

2. Database Schema

Ensure your InstantDB schema includes:

  • notes table with fields: title, content, position, pinned, createdAt, updatedAt
  • folders table with fields: name, parent (for nesting)
  • tasks table with fields: content, note (for linking)

The seeder uses the schema from apps/instantdb/src/api/db/schema.ts.

Installation

The Seeder Tool is already included in the monorepo. No additional installation is required.

Dependencies:

  • @instantdb/react - InstantDB client
  • inquirer - Interactive CLI prompts
  • chalk - Colorized terminal output
  • ora - Loading spinners

These are automatically installed when you run bun install from the project root.

First Run

Step 1: Navigate to Project Root

cd /path/to/skriuw

Step 2: Verify Environment

# Check if .env file exists and contains APP_ID
cat .env | grep NEXT_PUBLIC_INSTANT_APP_ID

Step 3: Run the Seeder

bun run tools/seeder/src/index.ts

You should see:

? What would you like to do?
❯ 🌱 Seed a new note
  📦 Move/reposition an existing note

Creating Your First Note

Basic Workflow

  1. Select Action: Choose "🌱 Seed a new note"
  2. Enter Title: Type your note title
  3. Enter Date: Use dd-mm-yyyy format (e.g., 06-11-2024)
  4. Choose Content Source:
    • From file: Provide path to .md or .mdx file
    • Paste content: Opens editor for direct input
  5. Set Pinned Status: Choose whether to pin the note
  6. Select Folder (if not pinned): Choose folder or root
  7. Set Position: Custom position or automatic end-of-list
  8. Link Tasks (optional): Select tasks to link to the note

Example: Creating a Simple Note

$ bun run tools/seeder/src/index.ts

? What would you like to do? Seed a new note
? Note title: My First Note
? Created at date (dd-mm-yyyy): 06-11-2024
? Content source: Paste markdown content
# (Opens editor)
? Pin this note? No
? Place in a folder? No
? Use custom position? No
 Note "My First Note" created successfully!

Moving an Existing Note

Workflow

  1. Select Action: Choose "📦 Move/reposition an existing note"
  2. Select Note: Choose from list of existing notes
  3. Select Target Folder: Choose destination folder
  4. Select Position: Choose where to place the note
  5. Confirm: Note is moved and positions are updated

Example: Moving a Note

? What would you like to do? Move/reposition an existing note
? Select note to move: My First Note
? Select target folder: Root (no folder)
? Select position: Top (position 0)
 Note moved successfully!

Using with SK CLI

The Seeder Tool is integrated into SK for easy access:

bun run sk
# Navigate to: Tools → Run Database Seeder

This provides the same functionality with the convenience of the SK menu system.

Next Steps