@lenne.tech/cli 1.6.7 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/commands/config/validate.js +15 -1
- package/build/commands/directus/directus.js +27 -0
- package/build/commands/directus/docker-setup.js +471 -0
- package/build/commands/directus/remove.js +131 -0
- package/build/commands/directus/typegen.js +164 -0
- package/build/commands/git/update.js +2 -2
- package/build/commands/qdrant/delete.js +2 -1
- package/build/commands/qdrant/stats.js +2 -1
- package/build/templates/directus/.env.ejs +26 -0
- package/build/templates/directus/README.md.ejs +159 -0
- package/build/templates/directus/docker-compose.yml.ejs +81 -0
- package/docs/commands.md +124 -0
- package/package.json +1 -1
package/docs/commands.md
CHANGED
|
@@ -14,6 +14,7 @@ This document provides a comprehensive reference for all `lt` CLI commands. For
|
|
|
14
14
|
- [Config Commands](#config-commands)
|
|
15
15
|
- [Utility Commands](#utility-commands)
|
|
16
16
|
- [Database Commands](#database-commands)
|
|
17
|
+
- [Directus Commands](#directus-commands)
|
|
17
18
|
- [TypeScript Commands](#typescript-commands)
|
|
18
19
|
- [Starter Commands](#starter-commands)
|
|
19
20
|
- [Claude Commands](#claude-commands)
|
|
@@ -794,6 +795,129 @@ lt qdrant delete
|
|
|
794
795
|
|
|
795
796
|
---
|
|
796
797
|
|
|
798
|
+
## Directus Commands
|
|
799
|
+
|
|
800
|
+
### `lt directus docker-setup`
|
|
801
|
+
|
|
802
|
+
Sets up a local Directus Docker instance using docker-compose.
|
|
803
|
+
|
|
804
|
+
**Usage:**
|
|
805
|
+
```bash
|
|
806
|
+
lt directus docker-setup [options]
|
|
807
|
+
```
|
|
808
|
+
|
|
809
|
+
**Options:**
|
|
810
|
+
| Option | Description |
|
|
811
|
+
|--------|-------------|
|
|
812
|
+
| `--name <name>` / `-n` | Instance name (stored in ~/.lt/directus/<name>) |
|
|
813
|
+
| `--version <version>` / `-v` | Directus version (default: latest) |
|
|
814
|
+
| `--database <type>` / `--db <type>` | Database type: `postgres`, `mysql`, `sqlite` |
|
|
815
|
+
| `--port <number>` / `-p` | Port number (default: auto-detect starting from 8055) |
|
|
816
|
+
| `--update` | Update existing instance configuration |
|
|
817
|
+
| `--noConfirm` | Skip confirmation prompts |
|
|
818
|
+
|
|
819
|
+
**Configuration:** `commands.directus.dockerSetup.*`, `defaults.noConfirm`
|
|
820
|
+
|
|
821
|
+
**Port Auto-detection:**
|
|
822
|
+
- If `--port` is not specified, the CLI automatically finds an available port starting from 8055
|
|
823
|
+
- Each instance gets its own port (8055, 8056, 8057, etc.)
|
|
824
|
+
- This allows running multiple Directus instances simultaneously
|
|
825
|
+
|
|
826
|
+
**Generated files:**
|
|
827
|
+
- `~/.lt/directus/<name>/docker-compose.yml` - Container configuration
|
|
828
|
+
- `~/.lt/directus/<name>/.env` - Secrets and environment variables
|
|
829
|
+
- `~/.lt/directus/<name>/README.md` - Usage instructions
|
|
830
|
+
|
|
831
|
+
**Examples:**
|
|
832
|
+
```bash
|
|
833
|
+
# Create PostgreSQL instance (auto-detects port 8055)
|
|
834
|
+
lt directus docker-setup --name my-project --database postgres
|
|
835
|
+
|
|
836
|
+
# Create second instance (auto-detects port 8056)
|
|
837
|
+
lt directus docker-setup --name another-project --database mysql
|
|
838
|
+
|
|
839
|
+
# Create with specific port
|
|
840
|
+
lt directus docker-setup --name custom-app --database sqlite --port 9000
|
|
841
|
+
|
|
842
|
+
# Create with specific version
|
|
843
|
+
lt directus docker-setup --name my-app --database mysql --version 10
|
|
844
|
+
|
|
845
|
+
# Update existing instance
|
|
846
|
+
lt directus docker-setup --name my-project --version 11 --update
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
---
|
|
850
|
+
|
|
851
|
+
### `lt directus remove`
|
|
852
|
+
|
|
853
|
+
Removes a Directus Docker instance and all its data.
|
|
854
|
+
|
|
855
|
+
**Usage:**
|
|
856
|
+
```bash
|
|
857
|
+
lt directus remove [name] [options]
|
|
858
|
+
```
|
|
859
|
+
|
|
860
|
+
**Arguments:**
|
|
861
|
+
| Argument | Description |
|
|
862
|
+
|----------|-------------|
|
|
863
|
+
| `name` | Instance name to remove (optional, will prompt if omitted) |
|
|
864
|
+
|
|
865
|
+
**Options:**
|
|
866
|
+
| Option | Description |
|
|
867
|
+
|--------|-------------|
|
|
868
|
+
| `--noConfirm` | Skip confirmation prompts |
|
|
869
|
+
|
|
870
|
+
**Configuration:** `commands.directus.remove.*`, `defaults.noConfirm`
|
|
871
|
+
|
|
872
|
+
**What gets removed:**
|
|
873
|
+
- Stops and removes Docker containers
|
|
874
|
+
- Removes all Docker volumes (database, uploads, extensions)
|
|
875
|
+
- Deletes instance directory from ~/.lt/directus/
|
|
876
|
+
|
|
877
|
+
**Examples:**
|
|
878
|
+
```bash
|
|
879
|
+
# Interactive (shows list of instances)
|
|
880
|
+
lt directus remove
|
|
881
|
+
|
|
882
|
+
# Remove specific instance
|
|
883
|
+
lt directus remove my-project
|
|
884
|
+
|
|
885
|
+
# Skip confirmation
|
|
886
|
+
lt directus remove my-project --noConfirm
|
|
887
|
+
```
|
|
888
|
+
|
|
889
|
+
---
|
|
890
|
+
|
|
891
|
+
### `lt directus typegen`
|
|
892
|
+
|
|
893
|
+
Generates TypeScript types from Directus collections.
|
|
894
|
+
|
|
895
|
+
**Usage:**
|
|
896
|
+
```bash
|
|
897
|
+
lt directus typegen [options]
|
|
898
|
+
```
|
|
899
|
+
|
|
900
|
+
**Options:**
|
|
901
|
+
| Option | Description |
|
|
902
|
+
|--------|-------------|
|
|
903
|
+
| `--url <url>` / `-u` | Directus API URL |
|
|
904
|
+
| `--token <token>` / `-t` | Directus API token (Administrator permissions required) |
|
|
905
|
+
| `--output <path>` / `-o` | Output file path |
|
|
906
|
+
| `--noConfirm` | Skip confirmation prompts |
|
|
907
|
+
|
|
908
|
+
**Configuration:** `commands.directus.typegen.*`, `defaults.noConfirm`
|
|
909
|
+
|
|
910
|
+
**Examples:**
|
|
911
|
+
```bash
|
|
912
|
+
# Interactive
|
|
913
|
+
lt directus typegen
|
|
914
|
+
|
|
915
|
+
# With all options
|
|
916
|
+
lt directus typegen --url http://localhost:8055 --token <token> --output ./types.ts
|
|
917
|
+
```
|
|
918
|
+
|
|
919
|
+
---
|
|
920
|
+
|
|
797
921
|
## TypeScript Commands
|
|
798
922
|
|
|
799
923
|
### `lt typescript create`
|