td-ai-tools 1.0.4 → 1.0.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "td-ai-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Install agent skills and packs into your project",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"smoke:install": "./scripts/smoke-install.sh"
|
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=16"
|
|
20
20
|
},
|
|
21
|
-
"keywords": [
|
|
21
|
+
"keywords": [
|
|
22
|
+
"claude",
|
|
23
|
+
"agents",
|
|
24
|
+
"skills",
|
|
25
|
+
"shopify",
|
|
26
|
+
"theory-digital"
|
|
27
|
+
],
|
|
22
28
|
"license": "MIT"
|
|
23
29
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-cli
|
|
3
|
+
description: Manage Laravel Forge servers, sites, and provisioned resources from the terminal with the Laravel Forge CLI. Use when the user wants to inspect Forge state, switch active servers, deploy sites, update environment variables, view logs, run remote commands, use Tinker, or manage services like PHP, Nginx, daemons, and databases.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Laravel Forge CLI
|
|
7
|
+
|
|
8
|
+
## Core Workflow
|
|
9
|
+
|
|
10
|
+
1. Start with `forge` to confirm the CLI is installed and to inspect available commands.
|
|
11
|
+
2. Check the active server before making changes:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
forge server:current
|
|
15
|
+
forge server:list
|
|
16
|
+
forge server:switch staging
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
3. If the task needs SSH access, verify connectivity first:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
forge ssh:test
|
|
23
|
+
forge ssh:configure --key=/path/to/public/key.pub --name=workstation-name
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
4. Run the smallest command that answers the question or performs the requested change.
|
|
27
|
+
5. After environment changes, note that cached Laravel config or queue workers may require a fresh deployment before the new values take effect.
|
|
28
|
+
|
|
29
|
+
## Common Tasks
|
|
30
|
+
|
|
31
|
+
### Sites and Deployments
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
forge site:list
|
|
35
|
+
forge deploy
|
|
36
|
+
forge deploy example.com
|
|
37
|
+
forge deploy:logs
|
|
38
|
+
forge deploy:logs 12345
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Environment Variables
|
|
42
|
+
|
|
43
|
+
Pull, edit locally, then push back:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
forge env:pull
|
|
47
|
+
forge env:pull example.com .env
|
|
48
|
+
forge env:push
|
|
49
|
+
forge env:push example.com .env
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Logs, Commands, and Tinker
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
forge site:logs
|
|
56
|
+
forge site:logs example.com --follow
|
|
57
|
+
forge command example.com --command="php artisan about"
|
|
58
|
+
forge tinker example.com
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### SSH and Resource Access
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
forge ssh
|
|
65
|
+
forge ssh server-name
|
|
66
|
+
forge database:status
|
|
67
|
+
forge database:logs
|
|
68
|
+
forge database:shell my-database-name --user=my-user
|
|
69
|
+
forge php:status 8.5
|
|
70
|
+
forge php:restart 8.5
|
|
71
|
+
forge nginx:logs access
|
|
72
|
+
forge daemon:restart
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Decision Guide
|
|
76
|
+
|
|
77
|
+
- Need server context first: use `server:current`, `server:list`, or `server:switch`.
|
|
78
|
+
- Need site-level work: use `site:list`, `deploy`, `env:*`, `site:logs`, `command`, or `tinker`.
|
|
79
|
+
- Need service health or maintenance: use `{resource}:status`, `{resource}:logs`, `{resource}:restart`, or `{resource}:shell`.
|
|
80
|
+
- Need a secure shell on the box: confirm `ssh:test`, then use `forge ssh`.
|
|
81
|
+
|
|
82
|
+
## Reference
|
|
83
|
+
|
|
84
|
+
Read [references/command-reference.md](references/command-reference.md) when you need the fuller command set, examples, or reminders about how the active server affects command behavior.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Forge CLI Command Reference
|
|
2
|
+
|
|
3
|
+
This reference condenses the official Laravel Forge CLI documentation into the commands most likely to come up during support and operations work.
|
|
4
|
+
|
|
5
|
+
## Installation and Authentication
|
|
6
|
+
|
|
7
|
+
Requirements:
|
|
8
|
+
|
|
9
|
+
- PHP 8.0 or newer
|
|
10
|
+
- Composer available on the machine
|
|
11
|
+
|
|
12
|
+
Install:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
composer global require laravel/forge-cli
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Basic checks:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
forge
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Authenticate:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
forge login
|
|
28
|
+
forge login --token=your-api-token
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
CI authentication:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
export FORGE_API_TOKEN=your-api-token
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Active Server Model
|
|
38
|
+
|
|
39
|
+
Most Forge CLI commands run against the current active server. Check or change it before acting:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
forge server:current
|
|
43
|
+
forge server:list
|
|
44
|
+
forge server:switch
|
|
45
|
+
forge server:switch production
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Use this first when a task is ambiguous or when multiple Forge servers exist.
|
|
49
|
+
|
|
50
|
+
## SSH Setup
|
|
51
|
+
|
|
52
|
+
Validate or configure SSH access for the `forge` user:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
forge ssh:test
|
|
56
|
+
forge ssh:configure
|
|
57
|
+
forge ssh:configure --key=/path/to/public/key.pub --name=laptop-key
|
|
58
|
+
forge ssh
|
|
59
|
+
forge ssh server-name
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Sites
|
|
63
|
+
|
|
64
|
+
List sites on the active server:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
forge site:list
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Deploy a site:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
forge deploy
|
|
74
|
+
forge deploy example.com
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Review deployment output:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
forge deploy:logs
|
|
81
|
+
forge deploy:logs 12345
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Manage environment variables:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
forge env:pull
|
|
88
|
+
forge env:pull example.com
|
|
89
|
+
forge env:pull example.com .env
|
|
90
|
+
|
|
91
|
+
forge env:push
|
|
92
|
+
forge env:push example.com
|
|
93
|
+
forge env:push example.com .env
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If the application uses Laravel config caching or queue workers, push alone is not enough. Redeploy so the new variables are actually loaded.
|
|
97
|
+
|
|
98
|
+
View application logs:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
forge site:logs
|
|
102
|
+
forge site:logs --follow
|
|
103
|
+
forge site:logs example.com
|
|
104
|
+
forge site:logs example.com --follow
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Run commands relative to the site's root:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
forge command
|
|
111
|
+
forge command example.com
|
|
112
|
+
forge command example.com --command="php artisan migrate --force"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Open Tinker on a remote Laravel app:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
forge tinker
|
|
119
|
+
forge tinker example.com
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Resources
|
|
123
|
+
|
|
124
|
+
Forge exposes service-oriented commands with the pattern `{resource}:status`, `{resource}:logs`, `{resource}:restart`, and sometimes `{resource}:shell`.
|
|
125
|
+
|
|
126
|
+
### Status
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
forge daemon:status
|
|
130
|
+
forge database:status
|
|
131
|
+
forge nginx:status
|
|
132
|
+
forge php:status
|
|
133
|
+
forge php:status 8.5
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Logs
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
forge daemon:logs
|
|
140
|
+
forge daemon:logs --follow
|
|
141
|
+
forge database:logs
|
|
142
|
+
forge nginx:logs
|
|
143
|
+
forge nginx:logs access
|
|
144
|
+
forge php:logs
|
|
145
|
+
forge php:logs 8.5
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Restart
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
forge daemon:restart
|
|
152
|
+
forge database:restart
|
|
153
|
+
forge nginx:restart
|
|
154
|
+
forge php:restart
|
|
155
|
+
forge php:restart 8.5
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Local Shell Access to Resources
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
forge database:shell
|
|
162
|
+
forge database:shell my-database-name
|
|
163
|
+
forge database:shell my-database-name --user=my-user
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Practical Usage Notes
|
|
167
|
+
|
|
168
|
+
- Prefer read-only commands first when the request is exploratory.
|
|
169
|
+
- Confirm the active server before running deploys, restarts, or environment pushes.
|
|
170
|
+
- Use explicit site names when there is any chance of ambiguity.
|
|
171
|
+
- Use `--follow` only when the user wants a live log tail.
|
|
172
|
+
- When sharing results back to the user, report the exact command run and whether it changed state.
|
|
173
|
+
|
|
174
|
+
## Source
|
|
175
|
+
|
|
176
|
+
Official documentation: https://forge.laravel.com/docs/cli
|