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 createArguments: None
Flags:
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--name | string | Yes | — | Entity display name |
--slug | string | Yes | — | Entity slug (lowercase, hyphens) |
--description | string | No | — | Entity description |
--schema | string | No | {} | Entity schema as JSON |
--scope | string | No | workspace | workspace (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:
| Argument | Required | Description |
|---|---|---|
app-slug | Yes | The app slug |
Flags: None
myco entity get
Show entity details including its schema.
myco entity get <app-slug> <entity-slug>Arguments:
| Argument | Required | Description |
|---|---|---|
app-slug | Yes | The app slug |
entity-slug | Yes | The 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:
| Argument | Required | Description |
|---|---|---|
entity-slug | Yes | The entity slug |
Flags:
| Flag | Type | Description |
|---|---|---|
--name | string | Entity display name |
--description | string | Entity description |
--schema | string | Entity schema as JSON |
--scope | string | workspace 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 typegenArguments: None
Flags: None
Output: Writes src/types/myco.generated.ts with interfaces for each entity and an EntityTypes mapping.