langtrain 0.1.18 → 0.1.20
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/.agent/workflows/gsd.md +27 -0
- package/.agent/workflows/ralph.md +28 -0
- package/README.md +8 -4
- package/assets/cli-demo.png +0 -0
- package/dist/chunk-D3O435OM.mjs +30 -0
- package/dist/chunk-D3O435OM.mjs.map +1 -0
- package/dist/chunk-Z7FYIYKL.js +30 -0
- package/dist/chunk-Z7FYIYKL.js.map +1 -0
- package/dist/cli.js +8 -4
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +8 -4
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -2
- package/src/cli/auth.ts +1 -0
- package/src/cli/handlers/agent.ts +22 -3
- package/src/cli/handlers/data.ts +207 -0
- package/src/cli/handlers/deploy.ts +62 -0
- package/src/cli/handlers/dev.ts +42 -0
- package/src/cli/handlers/doctor.ts +54 -0
- package/src/cli/handlers/env.ts +89 -0
- package/src/cli/handlers/guardrails.ts +100 -0
- package/src/cli/handlers/init.ts +104 -0
- package/src/cli/handlers/logs.ts +68 -0
- package/src/cli/handlers/tune.ts +103 -1
- package/src/cli/index.ts +138 -17
- package/src/cli/menu.ts +19 -2
- package/src/cli/ui.ts +32 -12
- package/src/index.ts +4 -1
- package/src/lib/agent.ts +7 -0
- package/src/lib/guardrails.ts +72 -0
- package/src/lib/secrets.ts +39 -0
- package/dist/chunk-PAHGEWDE.js +0 -30
- package/dist/chunk-PAHGEWDE.js.map +0 -1
- package/dist/chunk-Q46V6ODQ.mjs +0 -30
- package/dist/chunk-Q46V6ODQ.mjs.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run GSD, the high-velocity "Get Shit Done" implementation agent
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# GSD - Get Shit Done
|
|
6
|
+
|
|
7
|
+
GSD mode is for rapid, iterative implementation of a specific feature or fix.
|
|
8
|
+
|
|
9
|
+
1. **Understand the Goal**
|
|
10
|
+
- Read the user request and any linked files.
|
|
11
|
+
- If ambiguous, make a reasonable assumption and proceed (bias for action).
|
|
12
|
+
|
|
13
|
+
2. **Plan (Quickly)**
|
|
14
|
+
- Create a mini-plan in your scratchpad.
|
|
15
|
+
- Break down into: Backend, Frontend, Integration.
|
|
16
|
+
|
|
17
|
+
3. **Execute (Iterative)**
|
|
18
|
+
- **// turbo-all**
|
|
19
|
+
- Write code.
|
|
20
|
+
- Run tests/builds immediately after writing.
|
|
21
|
+
- Fix errors immediately. Do not ask for help unless blocked by missing credentials/info.
|
|
22
|
+
|
|
23
|
+
4. **Verify**
|
|
24
|
+
- Run the relevant verification script.
|
|
25
|
+
- If it passes, you are done.
|
|
26
|
+
|
|
27
|
+
**Motto**: "Perfect is the enemy of done. Ship it."
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run Ralph, the strict code quality and cleanup agent
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Ralph - The Code Janitor
|
|
6
|
+
|
|
7
|
+
Ralph's job is to ensure code quality, consistency, and cleanliness.
|
|
8
|
+
|
|
9
|
+
1. **Analyze Project Structure**
|
|
10
|
+
- Run `find . -maxdepth 2 -not -path '*/.*'` to see the lay of the land.
|
|
11
|
+
|
|
12
|
+
2. **Lint & Format**
|
|
13
|
+
- IF `package.json` exists:
|
|
14
|
+
- Run `npm run lint` or `pnpm lint`.
|
|
15
|
+
- If it fails, fix the errors automatically.
|
|
16
|
+
- IF `pyproject.toml` or `requirements.txt` exists:
|
|
17
|
+
- Run `ruff check . --fix` (if available) or `flake8 .`.
|
|
18
|
+
|
|
19
|
+
3. **Dead Code Detection**
|
|
20
|
+
- Search for TODOs and FIXMEs: `grep -r "TODO" .`, `grep -r "FIXME" .`
|
|
21
|
+
- Report them to the user but do NOT delete unless instructed.
|
|
22
|
+
|
|
23
|
+
4. **Security Scan**
|
|
24
|
+
- Check for hardcoded secrets (basic regex check).
|
|
25
|
+
- `grep -r "API_KEY" .` (exclude env files).
|
|
26
|
+
|
|
27
|
+
5. **Report**
|
|
28
|
+
- Generate a summary of what was cleaned and what needs attention.
|
package/README.md
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
<p align="center"><code>npm i -g langtrain</code></p>
|
|
21
21
|
<p><strong>Langtrain CLI</strong> is a unified AI engineering platform that runs locally on your computer and connects to the Langtrain Cloud.</p>
|
|
22
22
|
|
|
23
|
+
<p align="center">
|
|
24
|
+
<img src="./assets/cli-demo.png" alt="Langtrain CLI Screenshot" width="800" style="border-radius: 8px; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);" />
|
|
25
|
+
</p>
|
|
26
|
+
|
|
23
27
|
<p>
|
|
24
28
|
If you are looking for the <em>web-based platform</em>, <strong>Langtrain Web</strong>, go to <a href="https://langtrain.xyz">langtrain.xyz</a>.
|
|
25
29
|
</p>
|
|
@@ -38,7 +42,7 @@ npm install -g langtrain
|
|
|
38
42
|
Then run `langtrain` to start the interactive AI engineering studio:
|
|
39
43
|
|
|
40
44
|
```shell
|
|
41
|
-
|
|
45
|
+
lt
|
|
42
46
|
```
|
|
43
47
|
|
|
44
48
|
<details>
|
|
@@ -52,11 +56,11 @@ sudo npm install -g langtrain
|
|
|
52
56
|
|
|
53
57
|
### Using Langtrain with your Cloud Plan
|
|
54
58
|
|
|
55
|
-
Run `
|
|
59
|
+
Run `lt login` and enter your API Key from the dashboard to authenticate. We recommend signing into your Langtrain account to use **Cloud Finetuning**, **Agent Persistence**, and **Model Hosting** as part of your Pro or Enterprise plan. [Learn more about Langtrain Plans](https://langtrain.xyz/pricing).
|
|
56
60
|
|
|
57
61
|
Check your subscription status and limits:
|
|
58
62
|
```shell
|
|
59
|
-
|
|
63
|
+
lt status
|
|
60
64
|
```
|
|
61
65
|
*Free plans allow local fine-tuning. Upgrade to Pro for cloud-based GPU training.*
|
|
62
66
|
|
|
@@ -102,7 +106,7 @@ async function analyzeAndTune() {
|
|
|
102
106
|
|
|
103
107
|
## Configuration
|
|
104
108
|
|
|
105
|
-
The SDK and CLI can be configured using environment variables `(dotenv supported)` or via `
|
|
109
|
+
The SDK and CLI can be configured using environment variables `(dotenv supported)` or via `lt login`.
|
|
106
110
|
|
|
107
111
|
| Variable | Description |
|
|
108
112
|
| :--- | :--- |
|
|
Binary file
|