Skip to Content
ReferenceCLI Referencemyco entity

myco entity

Entity management commands.

myco entity create

Create a new entity in the current app. Must be run from an app directory. After creation, TypeScript types are auto-generated at src/types/myco.generated.ts.

myco entity create

Arguments: None

Flags:

FlagTypeRequiredDefaultDescription
--namestringYesEntity display name
--slugstringYesEntity slug (lowercase, hyphens)
--descriptionstringNoEntity description
--schemastringNo{}Entity schema as JSON
--scopestringNoworkspaceworkspace (shared) or user (per-user)

Example:

myco entity create \ --name "Task" \ --slug task \ --description "A task item" \ --schema '{"properties":{"title":{"type":"string"},"completed":{"type":"boolean"},"priority":{"type":"string"}}}'

myco entity list

List all entities for an app.

myco entity list <app-slug>

Arguments:

ArgumentRequiredDescription
app-slugYesThe app slug

Flags: None


myco entity get

Show entity details including its schema.

myco entity get <app-slug> <entity-slug>

Arguments:

ArgumentRequiredDescription
app-slugYesThe app slug
entity-slugYesThe entity slug

Flags: None


myco entity update

Update an entity in the current app. Only specified fields are changed. Types are auto-regenerated after update.

myco entity update <entity-slug>

Arguments:

ArgumentRequiredDescription
entity-slugYesThe entity slug

Flags:

FlagTypeDescription
--namestringEntity display name
--descriptionstringEntity description
--schemastringEntity schema as JSON
--scopestringworkspace or user

Example:

myco entity update task \ --schema '{"properties":{"title":{"type":"string"},"completed":{"type":"boolean"},"priority":{"type":"string"},"dueDate":{"type":"string"}}}'

myco entity typegen

Regenerate TypeScript types from all entities. Must be run from an app directory.

myco entity typegen

Arguments: None

Flags: None

Output: Writes src/types/myco.generated.ts with interfaces for each entity and an EntityTypes mapping.