td-ai-tools 1.0.3 → 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",
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": ["claude", "agents", "skills", "shopify", "theory-digital"],
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
@@ -0,0 +1,79 @@
1
+ # Codex sandbox config bootstrap
2
+
3
+ This directory contains a template + generator that produces `<repo>/.codex/config.toml`
4
+ on demand, so the file does not need to be committed with hardcoded paths tied to one
5
+ machine or one project clone location.
6
+
7
+ ## Files
8
+
9
+ - `config.toml.template` — the source of truth. Uses two placeholders:
10
+ - `__PROJECT_ROOT__` — replaced with the absolute path to the repo root
11
+ - `__CHROME_PATH__` — replaced with the absolute path to the Chrome/Chromium binary
12
+ - `setup-codex.sh` — reads the template, substitutes the placeholders, writes
13
+ `<repo>/.codex/config.toml`.
14
+
15
+ The generated `.codex/` directory is gitignored, so each clone gets its own copy.
16
+
17
+ ## Usage
18
+
19
+ Run once after cloning the repo (or after moving the clone to a new path):
20
+
21
+ ```bash
22
+ .agents/skills/playwright-cli/setup-codex.sh
23
+ ```
24
+
25
+ The script prints the values it resolved, e.g.:
26
+
27
+ ```
28
+ wrote /home/you/code/lio/.codex/config.toml
29
+ PROJECT_ROOT=/home/you/code/lio
30
+ CHROME_PATH=/usr/bin/google-chrome
31
+ ```
32
+
33
+ Re-run it any time the template changes or you move the repo.
34
+
35
+ ## How paths are resolved
36
+
37
+ **`PROJECT_ROOT`** — derived in this order:
38
+
39
+ 1. `git rev-parse --show-toplevel` from the script's directory (works for any clone
40
+ location, on any machine, regardless of username)
41
+ 2. Falls back to walking three directories up from the script
42
+ (`.agents/skills/playwright-cli` → repo root) if the repo isn't a git checkout
43
+
44
+ **`CHROME_PATH`** — derived in this order:
45
+
46
+ 1. The `CHROME_PATH` environment variable, if set
47
+ 2. First match from `PATH` of: `google-chrome`, `google-chrome-stable`, `chromium`,
48
+ `chromium-browser`
49
+ 3. Falls back to `/usr/bin/google-chrome` with a warning if nothing is found
50
+
51
+ Override the Chrome binary explicitly when needed:
52
+
53
+ ```bash
54
+ CHROME_PATH=/opt/google/chrome/chrome .agents/skills/playwright-cli/setup-codex.sh
55
+ ```
56
+
57
+ ## Why a generator instead of variable expansion
58
+
59
+ Codex CLI parses `config.toml` as static TOML and does not expand `~`, `$HOME`, or
60
+ `${VAR}` in path values — they would be treated as literal strings. Generating the
61
+ file at setup time is the simplest way to keep the template portable while still
62
+ producing the absolute paths Codex expects at runtime.
63
+
64
+ ## What the generated config does
65
+
66
+ The output `.codex/config.toml` configures Codex's sandbox so Playwright can run
67
+ inside it:
68
+
69
+ - `sandbox_workspace_write.writable_roots` — directories Playwright is allowed to
70
+ write to (browser cache, artifacts, test reports, daemon sockets)
71
+ - `shell_environment_policy.set` — pins `PLAYWRIGHT_*`, `XDG_*`, and `TMPDIR`-family
72
+ env vars to repo-local paths so Playwright stores its browser, cache, and runtime
73
+ state under the project rather than the user's home directory
74
+
75
+ ## Editing
76
+
77
+ Edit `config.toml.template` (not the generated file) and re-run `setup-codex.sh`.
78
+ Changes to `.codex/config.toml` directly will be overwritten the next time the
79
+ generator runs.
@@ -0,0 +1,278 @@
1
+ ---
2
+ name: playwright-cli
3
+ description: Automates browser interactions for web testing, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, take screenshots, test web applications, or extract information from web pages.
4
+ allowed-tools: Bash(playwright-cli:*)
5
+ ---
6
+
7
+ # Browser Automation with playwright-cli
8
+
9
+ ## Quick start
10
+
11
+ ```bash
12
+ # open new browser
13
+ playwright-cli open
14
+ # navigate to a page
15
+ playwright-cli goto https://playwright.dev
16
+ # interact with the page using refs from the snapshot
17
+ playwright-cli click e15
18
+ playwright-cli type "page.click"
19
+ playwright-cli press Enter
20
+ # take a screenshot (rarely used, as snapshot is more common)
21
+ playwright-cli screenshot
22
+ # close the browser
23
+ playwright-cli close
24
+ ```
25
+
26
+ ## Commands
27
+
28
+ ### Core
29
+
30
+ ```bash
31
+ playwright-cli open
32
+ # open and navigate right away
33
+ playwright-cli open https://example.com/
34
+ playwright-cli goto https://playwright.dev
35
+ playwright-cli type "search query"
36
+ playwright-cli click e3
37
+ playwright-cli dblclick e7
38
+ playwright-cli fill e5 "user@example.com"
39
+ playwright-cli drag e2 e8
40
+ playwright-cli hover e4
41
+ playwright-cli select e9 "option-value"
42
+ playwright-cli upload ./document.pdf
43
+ playwright-cli check e12
44
+ playwright-cli uncheck e12
45
+ playwright-cli snapshot
46
+ playwright-cli snapshot --filename=after-click.yaml
47
+ playwright-cli eval "document.title"
48
+ playwright-cli eval "el => el.textContent" e5
49
+ playwright-cli dialog-accept
50
+ playwright-cli dialog-accept "confirmation text"
51
+ playwright-cli dialog-dismiss
52
+ playwright-cli resize 1920 1080
53
+ playwright-cli close
54
+ ```
55
+
56
+ ### Navigation
57
+
58
+ ```bash
59
+ playwright-cli go-back
60
+ playwright-cli go-forward
61
+ playwright-cli reload
62
+ ```
63
+
64
+ ### Keyboard
65
+
66
+ ```bash
67
+ playwright-cli press Enter
68
+ playwright-cli press ArrowDown
69
+ playwright-cli keydown Shift
70
+ playwright-cli keyup Shift
71
+ ```
72
+
73
+ ### Mouse
74
+
75
+ ```bash
76
+ playwright-cli mousemove 150 300
77
+ playwright-cli mousedown
78
+ playwright-cli mousedown right
79
+ playwright-cli mouseup
80
+ playwright-cli mouseup right
81
+ playwright-cli mousewheel 0 100
82
+ ```
83
+
84
+ ### Save as
85
+
86
+ ```bash
87
+ playwright-cli screenshot
88
+ playwright-cli screenshot e5
89
+ playwright-cli screenshot --filename=page.png
90
+ playwright-cli pdf --filename=page.pdf
91
+ ```
92
+
93
+ ### Tabs
94
+
95
+ ```bash
96
+ playwright-cli tab-list
97
+ playwright-cli tab-new
98
+ playwright-cli tab-new https://example.com/page
99
+ playwright-cli tab-close
100
+ playwright-cli tab-close 2
101
+ playwright-cli tab-select 0
102
+ ```
103
+
104
+ ### Storage
105
+
106
+ ```bash
107
+ playwright-cli state-save
108
+ playwright-cli state-save auth.json
109
+ playwright-cli state-load auth.json
110
+
111
+ # Cookies
112
+ playwright-cli cookie-list
113
+ playwright-cli cookie-list --domain=example.com
114
+ playwright-cli cookie-get session_id
115
+ playwright-cli cookie-set session_id abc123
116
+ playwright-cli cookie-set session_id abc123 --domain=example.com --httpOnly --secure
117
+ playwright-cli cookie-delete session_id
118
+ playwright-cli cookie-clear
119
+
120
+ # LocalStorage
121
+ playwright-cli localstorage-list
122
+ playwright-cli localstorage-get theme
123
+ playwright-cli localstorage-set theme dark
124
+ playwright-cli localstorage-delete theme
125
+ playwright-cli localstorage-clear
126
+
127
+ # SessionStorage
128
+ playwright-cli sessionstorage-list
129
+ playwright-cli sessionstorage-get step
130
+ playwright-cli sessionstorage-set step 3
131
+ playwright-cli sessionstorage-delete step
132
+ playwright-cli sessionstorage-clear
133
+ ```
134
+
135
+ ### Network
136
+
137
+ ```bash
138
+ playwright-cli route "**/*.jpg" --status=404
139
+ playwright-cli route "https://api.example.com/**" --body='{"mock": true}'
140
+ playwright-cli route-list
141
+ playwright-cli unroute "**/*.jpg"
142
+ playwright-cli unroute
143
+ ```
144
+
145
+ ### DevTools
146
+
147
+ ```bash
148
+ playwright-cli console
149
+ playwright-cli console warning
150
+ playwright-cli network
151
+ playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"
152
+ playwright-cli tracing-start
153
+ playwright-cli tracing-stop
154
+ playwright-cli video-start
155
+ playwright-cli video-stop video.webm
156
+ ```
157
+
158
+ ## Open parameters
159
+ ```bash
160
+ # Use specific browser when creating session
161
+ playwright-cli open --browser=chrome
162
+ playwright-cli open --browser=firefox
163
+ playwright-cli open --browser=webkit
164
+ playwright-cli open --browser=msedge
165
+ # Connect to browser via extension
166
+ playwright-cli open --extension
167
+
168
+ # Use persistent profile (by default profile is in-memory)
169
+ playwright-cli open --persistent
170
+ # Use persistent profile with custom directory
171
+ playwright-cli open --profile=/path/to/profile
172
+
173
+ # Start with config file
174
+ playwright-cli open --config=my-config.json
175
+
176
+ # Close the browser
177
+ playwright-cli close
178
+ # Delete user data for the default session
179
+ playwright-cli delete-data
180
+ ```
181
+
182
+ ## Snapshots
183
+
184
+ After each command, playwright-cli provides a snapshot of the current browser state.
185
+
186
+ ```bash
187
+ > playwright-cli goto https://example.com
188
+ ### Page
189
+ - Page URL: https://example.com/
190
+ - Page Title: Example Domain
191
+ ### Snapshot
192
+ [Snapshot](.playwright-cli/page-2026-02-14T19-22-42-679Z.yml)
193
+ ```
194
+
195
+ You can also take a snapshot on demand using `playwright-cli snapshot` command.
196
+
197
+ If `--filename` is not provided, a new snapshot file is created with a timestamp. Default to automatic file naming, use `--filename=` when artifact is a part of the workflow result.
198
+
199
+ ## Browser Sessions
200
+
201
+ ```bash
202
+ # create new browser session named "mysession" with persistent profile
203
+ playwright-cli -s=mysession open example.com --persistent
204
+ # same with manually specified profile directory (use when requested explicitly)
205
+ playwright-cli -s=mysession open example.com --profile=/path/to/profile
206
+ playwright-cli -s=mysession click e6
207
+ playwright-cli -s=mysession close # stop a named browser
208
+ playwright-cli -s=mysession delete-data # delete user data for persistent session
209
+
210
+ playwright-cli list
211
+ # Close all browsers
212
+ playwright-cli close-all
213
+ # Forcefully kill all browser processes
214
+ playwright-cli kill-all
215
+ ```
216
+
217
+ ## Local installation
218
+
219
+ In some cases user might want to install playwright-cli locally. If running globally available `playwright-cli` binary fails, use `npx playwright-cli` to run the commands. For example:
220
+
221
+ ```bash
222
+ npx playwright-cli open https://example.com
223
+ npx playwright-cli click e1
224
+ ```
225
+
226
+ ## Example: Form submission
227
+
228
+ ```bash
229
+ playwright-cli open https://example.com/form
230
+ playwright-cli snapshot
231
+
232
+ playwright-cli fill e1 "user@example.com"
233
+ playwright-cli fill e2 "password123"
234
+ playwright-cli click e3
235
+ playwright-cli snapshot
236
+ playwright-cli close
237
+ ```
238
+
239
+ ## Example: Multi-tab workflow
240
+
241
+ ```bash
242
+ playwright-cli open https://example.com
243
+ playwright-cli tab-new https://example.com/other
244
+ playwright-cli tab-list
245
+ playwright-cli tab-select 0
246
+ playwright-cli snapshot
247
+ playwright-cli close
248
+ ```
249
+
250
+ ## Example: Debugging with DevTools
251
+
252
+ ```bash
253
+ playwright-cli open https://example.com
254
+ playwright-cli click e4
255
+ playwright-cli fill e7 "test"
256
+ playwright-cli console
257
+ playwright-cli network
258
+ playwright-cli close
259
+ ```
260
+
261
+ ```bash
262
+ playwright-cli open https://example.com
263
+ playwright-cli tracing-start
264
+ playwright-cli click e4
265
+ playwright-cli fill e7 "test"
266
+ playwright-cli tracing-stop
267
+ playwright-cli close
268
+ ```
269
+
270
+ ## Specific tasks
271
+
272
+ * **Request mocking** [references/request-mocking.md](references/request-mocking.md)
273
+ * **Running Playwright code** [references/running-code.md](references/running-code.md)
274
+ * **Browser session management** [references/session-management.md](references/session-management.md)
275
+ * **Storage state (cookies, localStorage)** [references/storage-state.md](references/storage-state.md)
276
+ * **Test generation** [references/test-generation.md](references/test-generation.md)
277
+ * **Tracing** [references/tracing.md](references/tracing.md)
278
+ * **Video recording** [references/video-recording.md](references/video-recording.md)
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: 'Playwright CLI'
3
+ short_description: 'Browser management for web testing, screenshots, and data extraction.'
4
+ default_prompt: 'Use the playwright-cli to evaluate'
@@ -0,0 +1,32 @@
1
+ sandbox_mode = "workspace-write"
2
+
3
+ [sandbox_workspace_write]
4
+ network_access = true
5
+ exclude_tmpdir_env_var = true
6
+ exclude_slash_tmp = true
7
+ writable_roots = [
8
+ "__PROJECT_ROOT__/.cache/codex-playwright",
9
+ "__PROJECT_ROOT__/.artifacts/playwright/ms-playwright",
10
+ "__PROJECT_ROOT__/.tmp/codex-playwright",
11
+ "__PROJECT_ROOT__/.playwright-cli",
12
+ "__PROJECT_ROOT__/test-results",
13
+ "__PROJECT_ROOT__/playwright-report",
14
+ "__PROJECT_ROOT__/blob-report",
15
+ ]
16
+
17
+ [shell_environment_policy]
18
+ inherit = "all"
19
+
20
+ [shell_environment_policy.set]
21
+ PLAYWRIGHT_BROWSERS_PATH = "__PROJECT_ROOT__/.artifacts/playwright/ms-playwright"
22
+ PLAYWRIGHT_MCP_BROWSER = "chrome"
23
+ PLAYWRIGHT_MCP_EXECUTABLE_PATH = "__CHROME_PATH__"
24
+ PLAYWRIGHT_DAEMON_SOCKETS_DIR = "__PROJECT_ROOT__/.pw"
25
+ BROWSER = "google-chrome"
26
+ HOME = "__PROJECT_ROOT__/.tmp/codex-playwright/home"
27
+ XDG_CONFIG_HOME = "__PROJECT_ROOT__/.tmp/codex-playwright/config"
28
+ XDG_STATE_HOME = "__PROJECT_ROOT__/.tmp/codex-playwright/state"
29
+ TMPDIR = "__PROJECT_ROOT__/.tmp/codex-playwright"
30
+ TEMP = "__PROJECT_ROOT__/.tmp/codex-playwright"
31
+ TMP = "__PROJECT_ROOT__/.tmp/codex-playwright"
32
+ XDG_CACHE_HOME = "__PROJECT_ROOT__/.cache/codex-playwright"