Usage Guide
Detailed usage examples and workflows for the Seeder Tool
Usage Guide
This guide provides detailed examples and workflows for using the Seeder Tool effectively.
Basic Workflows
Creating a Simple Note
Goal: Create a basic note with minimal configuration
bun run tools/seeder/src/index.ts- Select "🌱 Seed a new note"
- Enter title:
My Note - Enter date:
06-11-2024 - Choose content source: "Paste markdown content"
- Enter content in editor
- Pin?
No - Folder?
No - Custom position?
No - Link tasks?
No
Result: Note created at end of root folder
Creating a Pinned Note
Goal: Create a note pinned to the top
bun run tools/seeder/src/index.ts- Select "🌱 Seed a new note"
- Enter title:
Important Note - Enter date:
06-11-2024 - Choose content source: "From .md or .mdx file"
- Enter file path:
./docs/important.md - Pin?
Yes✓
Result: Note pinned at position 0, cannot be in folder
Creating a Note in a Folder
Goal: Organize note in a specific folder
bun run tools/seeder/src/index.ts- Select "🌱 Seed a new note"
- Enter title:
Project Notes - Enter date:
06-11-2024 - Choose content source: "From .md or .mdx file"
- Enter file path:
./notes/project.md - Pin?
No - Place in folder?
Yes✓ - Select folder:
Projects → Frontend - Custom position?
No
Result: Note created at end of selected folder
Creating a Note at Custom Position
Goal: Insert note at specific position
bun run tools/seeder/src/index.ts- Select "🌱 Seed a new note"
- Enter title:
Inserted Note - Enter date:
06-11-2024 - Choose content source: "Paste markdown content"
- Enter content
- Pin?
No - Place in folder?
No - Custom position?
Yes✓ - Enter position:
5
Result: Note inserted at position 5, other notes shifted
Linking Tasks to a Note
Goal: Connect existing tasks to a note
bun run tools/seeder/src/index.ts- Select "🌱 Seed a new note"
- Enter title:
Task List - Enter date:
06-11-2024 - Choose content source: "Paste markdown content"
- Enter content
- Pin?
No - Folder?
No - Custom position?
No - Link tasks?
Yes✓ - Select tasks:
[x] Task 1,[x] Task 2
Result: Note created with linked tasks
Advanced Workflows
Moving a Note to Different Folder
Goal: Reorganize existing notes
bun run tools/seeder/src/index.ts- Select "📦 Move/reposition an existing note"
- Select note:
My Note - Select target folder:
Archive → 2024 - Select position:
End
Result: Note moved to archive folder at end
Repositioning a Note
Goal: Change note order without moving folder
bun run tools/seeder/src/index.ts- Select "📦 Move/reposition an existing note"
- Select note:
Project Notes - Select target folder:
(same folder) - Select position:
After "Another Note"
Result: Note repositioned within same folder
Moving Note to Top
Goal: Bring note to front
bun run tools/seeder/src/index.ts- Select "📦 Move/reposition an existing note"
- Select note:
Important Note - Select target folder:
Root (no folder) - Select position:
Top (position 0)
Result: Note moved to position 0, other notes shifted
Content Management
Importing from Markdown Files
Best Practice: Keep your markdown files organized
# Project structure
notes/
├── projects/
│ ├── frontend.md
│ └── backend.md
├── docs/
│ └── api.md
└── personal/
└── ideas.mdUsage:
- Choose "From .md or .mdx file"
- Enter path:
./notes/projects/frontend.md - Content is automatically loaded
Using Editor Mode
Best Practice: For longer content
- Choose "Paste markdown content"
- Editor opens (uses
$EDITORor default) - Write/paste content
- Save and close
- Content is imported
Tip: Set your preferred editor:
export EDITOR=cursor # or vim, nano, etc.Folder Organization
Understanding Folder Trees
The seeder displays folders in a tree structure:
Root (no folder)
Projects
Frontend
Backend
Archive
2024
2023Indentation shows nesting level:
- No indent = Root level
- 2 spaces = First level
- 4 spaces = Second level
- etc.
Organizing Notes by Topic
Workflow:
- Create notes with descriptive titles
- Group related notes in folders
- Use consistent naming
- Maintain hierarchy
Example Structure:
Projects/
├── Frontend/
│ ├── React Notes
│ └── Vue Notes
└── Backend/
├── API Design
└── Database SchemaDate Management
Using Dutch Date Format
Format: dd-mm-yyyy
Examples:
06-11-2024= November 6, 202401-01-2024= January 1, 202431-12-2023= December 31, 2023
Validation:
- Must be valid date
- Month 01-12
- Day valid for month
- Year 4 digits
Historical Dates
You can create notes with past dates:
? Created at date (dd-mm-yyyy): 01-01-2020Useful for:
- Migrating old content
- Backdating notes
- Historical documentation
Task Linking
Understanding Task Relationships
Important: Tasks link TO notes, not the reverse.
When you link tasks to a note:
- Tasks reference the note
- Note doesn't reference tasks directly
- Multiple tasks can link to one note
- One task can link to multiple notes
Linking Multiple Tasks
Workflow:
- Create note first
- Select "Link tasks" option
- Choose multiple tasks from list
- All selected tasks link to note
Use Cases:
- Project task lists
- Meeting action items
- Checklist notes
- Todo collections
Position Management
Understanding Positions
Position Rules:
- Lower numbers = Higher in list
- Position 0 = Top
- Pinned notes always position 0
- Positions are folder-specific
Custom Position Strategy
When to Use:
- Inserting at specific location
- Maintaining exact order
- Placing between existing notes
How It Works:
- Select custom position
- Enter position number
- Notes at/after position shift +1
- Your note takes the position
Automatic Position Strategy
When to Use:
- Adding to end of list
- Don't care about exact position
- Quick note creation
How It Works:
- Select automatic position
- Seeder calculates max position
- Adds note at max + 1
- No other notes affected
Error Handling
Common Errors
"NEXT_PUBLIC_INSTANT_APP_ID is not defined"
- Solution: Add to
.envfile
"Failed to read file"
- Solution: Check file path and permissions
"Invalid date format"
- Solution: Use
dd-mm-yyyyformat
"No notes found"
- Solution: Create notes first before moving
Recovery
If an error occurs:
- Transaction is rolled back
- No partial data created
- Can retry operation
- Check error message for details
Best Practices
Organization
- Use Folders: Organize related notes
- Consistent Naming: Clear, descriptive titles
- Date Accuracy: Use correct creation dates
- Position Strategy: Use automatic unless specific order needed
Content Management
- File Organization: Keep markdown files organized
- Version Control: Track markdown files in git
- Content Quality: Write clear, structured content
- Regular Seeding: Seed notes as you create them
Workflow
- Plan Structure: Think about folder organization
- Batch Operations: Create related notes together
- Review Positions: Check note order after creation
- Link Tasks: Connect related tasks when relevant
Integration with SK
Using SK Menu
bun run sk
# Navigate to: Tools → Run Database SeederBenefits:
- Unified interface
- No need to remember paths
- Consistent with other tools
- Quick access
Command Line Usage
For automation or scripts:
# Direct execution
bun run tools/seeder/src/index.ts
# From seeder directory
cd tools/seeder && bun run startNext Steps
- Build custom CLI Commands
- Troubleshoot Common Issues
- Explore All Features