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-hereFinding Your App ID:
- Log in to InstantDB Dashboard
- Select your app
- Copy the App ID from the settings page
2. Database Schema
Ensure your InstantDB schema includes:
notestable with fields:title,content,position,pinned,createdAt,updatedAtfolderstable with fields:name,parent(for nesting)taskstable 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 clientinquirer- Interactive CLI promptschalk- Colorized terminal outputora- 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/skriuwStep 2: Verify Environment
# Check if .env file exists and contains APP_ID
cat .env | grep NEXT_PUBLIC_INSTANT_APP_IDStep 3: Run the Seeder
bun run tools/seeder/src/index.tsYou should see:
? What would you like to do?
❯ 🌱 Seed a new note
📦 Move/reposition an existing noteCreating Your First Note
Basic Workflow
- Select Action: Choose "🌱 Seed a new note"
- Enter Title: Type your note title
- Enter Date: Use
dd-mm-yyyyformat (e.g.,06-11-2024) - Choose Content Source:
- From file: Provide path to
.mdor.mdxfile - Paste content: Opens editor for direct input
- From file: Provide path to
- Set Pinned Status: Choose whether to pin the note
- Select Folder (if not pinned): Choose folder or root
- Set Position: Custom position or automatic end-of-list
- 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
- Select Action: Choose "📦 Move/reposition an existing note"
- Select Note: Choose from list of existing notes
- Select Target Folder: Choose destination folder
- Select Position: Choose where to place the note
- 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 SeederThis provides the same functionality with the convenience of the SK menu system.
Next Steps
- Learn about all Features
- Explore Usage Examples
- Build custom CLI Commands
- Troubleshoot Common Issues