create-lousho 0.1.2-alpha.10 → 0.1.2-alpha.13
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/README.md +45 -45
- package/bin/cli.js +0 -0
- package/dist/index.js.map +1 -1
- package/package.json +45 -45
package/README.md
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
# create-lousho
|
|
2
|
-
|
|
3
|
-
Scaffold a new [`lousho`](https://www.npmjs.com/package/lousho) project with one command:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npm create lousho my-agent
|
|
7
|
-
cd my-agent
|
|
8
|
-
# copy .env.example to .env (cp on macOS/Linux, copy on Windows), then put your API key in it
|
|
9
|
-
npm run dev # chat with your agent in the terminal
|
|
10
|
-
npm test # offline tests: no API key needed
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
You get an agent with an example tool, an offline test that uses a mock model, a `.env.example` for your provider, a strict `tsconfig.json` and a README. Dependencies are installed and `git init` is run for you. Requires Node.js 22.19 or newer.
|
|
14
|
-
|
|
15
|
-
## Options
|
|
16
|
-
|
|
17
|
-
Without arguments it asks for the directory, the provider and the template. For scripts, pass `--yes` and any of:
|
|
18
|
-
|
|
19
|
-
| Option | Values |
|
|
20
|
-
| ------ | ------ |
|
|
21
|
-
| `--provider` | `openai`, `anthropic`, `openrouter`, `ollama`, `pi` |
|
|
22
|
-
| `--template` | `minimal`, `tools`, `yaml` |
|
|
23
|
-
| `--package-manager` | `npm`, `pnpm`, `yarn`, `bun` |
|
|
24
|
-
| `--no-install` | skip installing dependencies |
|
|
25
|
-
| `--no-git` | skip `git init` |
|
|
26
|
-
| `--force` | write into a non-empty directory |
|
|
27
|
-
| `--sdk-path <dir\|tgz>` | for SDK development: depend on an SDK checkout or a packed `.tgz` instead of the published version |
|
|
28
|
-
|
|
29
|
-
With npm, put the options after `--`:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npm create lousho my-agent -- --yes --provider anthropic --template tools
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Running a packed `.tgz` of this package on Windows: `npx C:\abs\path\create-lousho-<version>.tgz` silently does nothing (an npm quirk with absolute drive-letter paths). Use a relative path (`npx ./create-lousho-<version>.tgz my-agent`) or a `file:` spec (`npx file:C:/abs/path/create-lousho-<version>.tgz my-agent`).
|
|
36
|
-
|
|
37
|
-
This package is a thin wrapper: it runs `lousho init` from the SDK, so `npx lousho init --help` lists every option.
|
|
38
|
-
|
|
39
|
-
## Links
|
|
40
|
-
|
|
41
|
-
- Documentation: [lousho.com](https://lousho.com) (English and Arabic)
|
|
42
|
-
- Quick start: [lousho.com/quickstart](https://lousho.com/quickstart)
|
|
43
|
-
- Source: [github.com/LinuxDevil/agent-sdk](https://github.com/LinuxDevil/agent-sdk)
|
|
44
|
-
|
|
45
|
-
MIT licensed.
|
|
1
|
+
# create-lousho
|
|
2
|
+
|
|
3
|
+
Scaffold a new [`lousho`](https://www.npmjs.com/package/lousho) project with one command:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm create lousho my-agent
|
|
7
|
+
cd my-agent
|
|
8
|
+
# copy .env.example to .env (cp on macOS/Linux, copy on Windows), then put your API key in it
|
|
9
|
+
npm run dev # chat with your agent in the terminal
|
|
10
|
+
npm test # offline tests: no API key needed
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
You get an agent with an example tool, an offline test that uses a mock model, a `.env.example` for your provider, a strict `tsconfig.json` and a README. Dependencies are installed and `git init` is run for you. Requires Node.js 22.19 or newer.
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
Without arguments it asks for the directory, the provider and the template. For scripts, pass `--yes` and any of:
|
|
18
|
+
|
|
19
|
+
| Option | Values |
|
|
20
|
+
| ------ | ------ |
|
|
21
|
+
| `--provider` | `openai`, `anthropic`, `openrouter`, `ollama`, `pi` |
|
|
22
|
+
| `--template` | `minimal`, `tools`, `yaml` |
|
|
23
|
+
| `--package-manager` | `npm`, `pnpm`, `yarn`, `bun` |
|
|
24
|
+
| `--no-install` | skip installing dependencies |
|
|
25
|
+
| `--no-git` | skip `git init` |
|
|
26
|
+
| `--force` | write into a non-empty directory |
|
|
27
|
+
| `--sdk-path <dir\|tgz>` | for SDK development: depend on an SDK checkout or a packed `.tgz` instead of the published version |
|
|
28
|
+
|
|
29
|
+
With npm, put the options after `--`:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm create lousho my-agent -- --yes --provider anthropic --template tools
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Running a packed `.tgz` of this package on Windows: `npx C:\abs\path\create-lousho-<version>.tgz` silently does nothing (an npm quirk with absolute drive-letter paths). Use a relative path (`npx ./create-lousho-<version>.tgz my-agent`) or a `file:` spec (`npx file:C:/abs/path/create-lousho-<version>.tgz my-agent`).
|
|
36
|
+
|
|
37
|
+
This package is a thin wrapper: it runs `lousho init` from the SDK, so `npx lousho init --help` lists every option.
|
|
38
|
+
|
|
39
|
+
## Links
|
|
40
|
+
|
|
41
|
+
- Documentation: [lousho.com](https://lousho.com) (English and Arabic)
|
|
42
|
+
- Quick start: [lousho.com/quickstart](https://lousho.com/quickstart)
|
|
43
|
+
- Source: [github.com/LinuxDevil/agent-sdk](https://github.com/LinuxDevil/agent-sdk)
|
|
44
|
+
|
|
45
|
+
MIT licensed.
|
package/bin/cli.js
CHANGED
|
File without changes
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["path","spawn"],"mappings":";;;;;;;;;;;;;;;AAYO,SAAS,SAAA,GAAoB;AAGlC,EAAA,MAAM,KAAA,GAAQ,SAAA,CAAQ,OAAA,CAAQ,QAAQ,CAAA;AACtC,EAAA,OAAOA,qBAAA,CAAK,KAAKA,qBAAA,CAAK,OAAA,CAAQ,KAAK,CAAA,EAAG,IAAA,EAAM,OAAO,WAAW,CAAA;AAChE;AAGO,SAAS,KAAK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AAA,CAAO,MAAM,8EAA8E,CAAA;AAAA,EACrG;AACA,EAAA,OAAO,IAAI,OAAA,CAAQ,CAAC,OAAA,KAAY;AAC9B,IAAA,MAAM,KAAA,GAAQC,mBAAA,CAAM,OAAA,CAAQ,QAAA,EAAU,CAAC,SAAA,EAAU,EAAG,MAAA,EAAQ,GAAG,IAAI,CAAA,EAAG,EAAE,KAAA,EAAO,WAAW,CAAA;AAC1F,IAAA,KAAA,CAAM,EAAA,CAAG,OAAA,EAAS,CAAC,KAAA,KAAU;AAC3B,MAAA,OAAA,CAAQ,MAAA,CAAO,KAAA,CAAM,CAAA,0CAAA,EAA6C,KAAA,CAAM,OAAO;AAAA,CAAI,CAAA;AACnF,MAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IACX,CAAC,CAAA;AACD,IAAA,KAAA,CAAM,GAAG,OAAA,EAAS,CAAC,SAAS,OAAA,CAAQ,IAAA,IAAQ,CAAC,CAAC,CAAA;AAAA,EAChD,CAAC,CAAA;AACH","file":"index.js","sourcesContent":["import { spawn } from 'node:child_process';\nimport path from 'node:path';\n\n/**\n * `npm create lousho [dir] [options]` is `lousho init [dir] [options]`.\n *\n * The generator lives in the SDK (`src/cli/init.ts`) so there is exactly one\n * copy of it; this package only depends on the SDK (same version line) and\n * runs its `lousho` binary. `lousho init --help` lists the options.\n */\n\n/** Absolute path of the `lousho` bin of the installed `lousho`. */\nexport function loushoBin(): string {\n // The package's \"exports\" map hides package.json, but the \".\" entry\n // (<root>/dist/index.js) is resolvable and bin/ is its sibling of dist/.\n const entry = require.resolve('lousho');\n return path.join(path.dirname(entry), '..', 'bin', 'lousho.js');\n}\n\n/** Runs `lousho init <argv>`; resolves to its exit code. */\nexport function main(argv: string[]): Promise<number> {\n if (argv.includes('--help') || argv.includes('-h')) {\n // The usage below is `lousho init`'s; say how it maps to this command.\n process.stdout.write('npm create lousho [dir] -- [options] runs `lousho init [dir] [options]`:\\n\\n');\n }\n return new Promise((resolve) => {\n const child = spawn(process.execPath, [loushoBin(), 'init', ...argv], { stdio: 'inherit' });\n child.on('error', (error) => {\n process.stderr.write(`create-lousho: could not run lousho init: ${error.message}\\n`);\n resolve(1);\n });\n child.on('close', (code) => resolve(code ?? 1));\n });\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "create-lousho",
|
|
3
|
-
"version": "0.1.2-alpha.
|
|
4
|
-
"description": "npm create lousho: scaffold a new lousho project (runs `lousho init`)",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"homepage": "https://lousho.com",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/LinuxDevil/agent-sdk.git",
|
|
10
|
-
"directory": "packages/create-lousho"
|
|
11
|
-
},
|
|
12
|
-
"keywords": [
|
|
13
|
-
"lousho",
|
|
14
|
-
"ai",
|
|
15
|
-
"agents",
|
|
16
|
-
"create",
|
|
17
|
-
"scaffold"
|
|
18
|
-
],
|
|
19
|
-
"type": "commonjs",
|
|
20
|
-
"engines": {
|
|
21
|
-
"node": ">=22.19.0"
|
|
22
|
-
},
|
|
23
|
-
"bin": {
|
|
24
|
-
"create-lousho": "bin/cli.js"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"dist",
|
|
28
|
-
"bin"
|
|
29
|
-
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "tsup",
|
|
32
|
-
"test": "vitest run",
|
|
33
|
-
"typecheck": "tsc --noEmit"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"lousho": "^1.0.0-alpha.
|
|
37
|
-
"prompts": "^2.4.2"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@types/node": "^20.0.0",
|
|
41
|
-
"tsup": "^8.0.0",
|
|
42
|
-
"typescript": "^5.0.0",
|
|
43
|
-
"vitest": "^1.6.1"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "create-lousho",
|
|
3
|
+
"version": "0.1.2-alpha.13",
|
|
4
|
+
"description": "npm create lousho: scaffold a new lousho project (runs `lousho init`)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://lousho.com",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/LinuxDevil/agent-sdk.git",
|
|
10
|
+
"directory": "packages/create-lousho"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"lousho",
|
|
14
|
+
"ai",
|
|
15
|
+
"agents",
|
|
16
|
+
"create",
|
|
17
|
+
"scaffold"
|
|
18
|
+
],
|
|
19
|
+
"type": "commonjs",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=22.19.0"
|
|
22
|
+
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"create-lousho": "bin/cli.js"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"bin"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsup",
|
|
32
|
+
"test": "vitest run",
|
|
33
|
+
"typecheck": "tsc --noEmit"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"lousho": "^1.0.0-alpha.34",
|
|
37
|
+
"prompts": "^2.4.2"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^20.0.0",
|
|
41
|
+
"tsup": "^8.0.0",
|
|
42
|
+
"typescript": "^5.0.0",
|
|
43
|
+
"vitest": "^1.6.1"
|
|
44
|
+
}
|
|
45
|
+
}
|