Skip to content

entity

Generic entity CRUD operations. Use this for working with knowledge entities like patterns, episodes, templates, and other types.

Commands

  • sibyl entity list - List entities by type
  • sibyl entity show - Show entity details
  • sibyl entity create - Create an entity
  • sibyl entity delete - Delete an entity
  • sibyl entity related - Show related entities

Entity Types

TypeDescription
patternCode patterns, best practices
episodeKnowledge episodes, learnings
ruleRules and constraints
templateCode templates
conventionTeam conventions, standards
toolTools and utilities
languageProgramming languages
topicGeneral topics
knowledge_sourceExternal knowledge sources
config_fileConfiguration files
slash_commandSlash commands
taskTasks (use sibyl task instead)
projectProjects (use sibyl project instead)
epicEpics (use sibyl epic instead)
teamTeam definitions
error_patternError patterns and solutions
milestoneProject milestones
sourceWeb sources
documentCrawled documents
communityCommunity groupings

entity list

List entities by type with optional filters.

Synopsis

bash
sibyl entity list [options]

Options

OptionShortDefaultDescription
--type-TpatternEntity type to list
--language-l(all)Filter by language
--category-c(all)Filter by category
--limit-n50Max results
--json-jfalseJSON output
--csvfalseCSV output

Examples

bash
# List patterns (default)
sibyl entity list

# List episodes
sibyl entity list --type episode

# List patterns for TypeScript
sibyl entity list --type pattern --language typescript

# List patterns in a category
sibyl entity list --type pattern --category "error-handling"

# JSON output
sibyl entity list --type pattern --json

Output (table):

Patterns
ID          Name                            Description
───────────────────────────────────────────────────────────────────
ent_abc1... JWT Authentication Pattern      Secure JWT token handling with...
ent_def2... Error Boundary Pattern          React error boundary for graceful...
ent_ghi3... Repository Pattern              Data access layer abstraction...

Showing 3 pattern(s)

entity show

Show detailed entity information.

Synopsis

bash
sibyl entity show <entity_id> [options]

Arguments

ArgumentRequiredDescription
entity_idYesEntity ID

Options

OptionShortDescription
--json-jJSON output

Example

bash
sibyl entity show ent_abc123

Output:

Pattern Details
  Name: JWT Authentication Pattern
  Type: pattern
  ID:   ent_abc123def456789

  Description:
  Secure JWT token handling with refresh token rotation

  Content:
  Use short-lived access tokens (15 min) with longer refresh tokens (7 days).
  Store refresh tokens in httpOnly cookies. Implement token rotation on refresh.
  Blacklist tokens on logout using Redis with TTL matching token expiry.

  Metadata:
    category: authentication
    languages: ["typescript", "javascript"]
    tags: ["jwt", "security", "auth"]

entity create

Create a new entity.

Synopsis

bash
sibyl entity create --type <type> --name <name> [options]

Required Options

OptionShortDescription
--type-TEntity type (required)
--name-nEntity name (required)

Options

OptionShortDescription
--content-cEntity content
--categoryCategory
--languages-lComma-separated languages
--tagsComma-separated tags
--json-jJSON output

Examples

bash
# Create a pattern
sibyl entity create \
  --type pattern \
  --name "Repository Pattern" \
  --content "Abstract data access behind interfaces. Each aggregate root gets its own repository." \
  --category "architecture" \
  --languages "typescript,java" \
  --tags "ddd,clean-architecture"

# Create an episode
sibyl entity create \
  --type episode \
  --name "Redis Connection Pooling Fix" \
  --content "Connection timeout was caused by exhausted pool. Increased max connections to 20." \
  --category "debugging"

# Create an error pattern
sibyl entity create \
  --type error_pattern \
  --name "ECONNREFUSED on localhost" \
  --content "Service not running or wrong port. Check docker-compose and port mappings." \
  --tags "docker,networking,debugging"

Output:

Entity created: ent_xyz789abc123

entity delete

Delete an entity.

Synopsis

bash
sibyl entity delete <entity_id> [options]

Arguments

ArgumentRequiredDescription
entity_idYesEntity ID to delete

Options

OptionShortDescription
--yes-ySkip confirmation
--json-jJSON output

Example

bash
sibyl entity delete ent_abc123 --yes

Output:

Entity deleted: ent_abc1...

Show entities related to a given entity (1-hop connections).

Synopsis

bash
sibyl entity related <entity_id> [options]

Arguments

ArgumentRequiredDescription
entity_idYesEntity ID

Options

OptionShortDefaultDescription
--limit-n20Max results
--json-jfalseJSON output

Example

bash
sibyl entity related ent_abc123

Output:

Related Entities
ID          Name                      Type         Relationship
────────────────────────────────────────────────────────────────────
ent_def4... OAuth2 Integration        pattern      RELATES_TO
ent_ghi5... Session Management        pattern      RELATES_TO
task_jkl... Implement auth flow       task         USED_IN
proj_mno... Backend API               project      BELONGS_TO

Found 4 related entity(ies)

Common Workflows

Knowledge Management

bash
# Search for existing patterns
sibyl search "error handling" --type pattern

# If not found, create one
sibyl entity create \
  --type pattern \
  --name "Global Error Handler Pattern" \
  --content "Centralize error handling with middleware. Log errors, sanitize for clients."

# Find related knowledge
sibyl entity related ent_abc123

Documenting Solutions

bash
# After solving a bug, document it
sibyl entity create \
  --type error_pattern \
  --name "TypeORM Connection Lost" \
  --content "Connection lost after idle timeout. Fix: Enable keepalive in connection options." \
  --tags "typeorm,postgresql,connection"

Browsing Knowledge

bash
# List all error patterns
sibyl entity list --type error_pattern

# List patterns by language
sibyl entity list --type pattern --language rust

# Get details on a specific pattern
sibyl entity show ent_abc123

Released under the MIT License.