@nimbuslab/cli 0.1.0

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/CLAUDE.md ADDED
@@ -0,0 +1,106 @@
1
+
2
+ Default to using Bun instead of Node.js.
3
+
4
+ - Use `bun <file>` instead of `node <file>` or `ts-node <file>`
5
+ - Use `bun test` instead of `jest` or `vitest`
6
+ - Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
7
+ - Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
8
+ - Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
9
+ - Use `bunx <package> <command>` instead of `npx <package> <command>`
10
+ - Bun automatically loads .env, so don't use dotenv.
11
+
12
+ ## APIs
13
+
14
+ - `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
15
+ - `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
16
+ - `Bun.redis` for Redis. Don't use `ioredis`.
17
+ - `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
18
+ - `WebSocket` is built-in. Don't use `ws`.
19
+ - Prefer `Bun.file` over `node:fs`'s readFile/writeFile
20
+ - Bun.$`ls` instead of execa.
21
+
22
+ ## Testing
23
+
24
+ Use `bun test` to run tests.
25
+
26
+ ```ts#index.test.ts
27
+ import { test, expect } from "bun:test";
28
+
29
+ test("hello world", () => {
30
+ expect(1).toBe(1);
31
+ });
32
+ ```
33
+
34
+ ## Frontend
35
+
36
+ Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.
37
+
38
+ Server:
39
+
40
+ ```ts#index.ts
41
+ import index from "./index.html"
42
+
43
+ Bun.serve({
44
+ routes: {
45
+ "/": index,
46
+ "/api/users/:id": {
47
+ GET: (req) => {
48
+ return new Response(JSON.stringify({ id: req.params.id }));
49
+ },
50
+ },
51
+ },
52
+ // optional websocket support
53
+ websocket: {
54
+ open: (ws) => {
55
+ ws.send("Hello, world!");
56
+ },
57
+ message: (ws, message) => {
58
+ ws.send(message);
59
+ },
60
+ close: (ws) => {
61
+ // handle close
62
+ }
63
+ },
64
+ development: {
65
+ hmr: true,
66
+ console: true,
67
+ }
68
+ })
69
+ ```
70
+
71
+ HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. `<link>` tags can point to stylesheets and Bun's CSS bundler will bundle.
72
+
73
+ ```html#index.html
74
+ <html>
75
+ <body>
76
+ <h1>Hello, world!</h1>
77
+ <script type="module" src="./frontend.tsx"></script>
78
+ </body>
79
+ </html>
80
+ ```
81
+
82
+ With the following `frontend.tsx`:
83
+
84
+ ```tsx#frontend.tsx
85
+ import React from "react";
86
+ import { createRoot } from "react-dom/client";
87
+
88
+ // import .css files directly and it works
89
+ import './index.css';
90
+
91
+ const root = createRoot(document.body);
92
+
93
+ export default function Frontend() {
94
+ return <h1>Hello, world!</h1>;
95
+ }
96
+
97
+ root.render(<Frontend />);
98
+ ```
99
+
100
+ Then, run index.ts
101
+
102
+ ```sh
103
+ bun --hot ./index.ts
104
+ ```
105
+
106
+ For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.
package/LICENSE ADDED
@@ -0,0 +1,11 @@
1
+ Copyright (c) 2024-present nimbuslab
2
+
3
+ Todos os direitos reservados.
4
+
5
+ Este software e sua documentacao sao propriedade exclusiva da nimbuslab.
6
+ O uso, copia, modificacao ou distribuicao deste software sem autorizacao
7
+ expressa por escrito da nimbuslab e estritamente proibido.
8
+
9
+ Para licenciamento ou parcerias: contato@nimbuslab.com.br
10
+
11
+ https://nimbuslab.com.br
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # @nimbuslab/cli
2
+
3
+ CLI oficial da nimbuslab para criar projetos fast e fast+.
4
+
5
+ ## Instalacao
6
+
7
+ ```bash
8
+ # Via npm/bun global
9
+ bun add -g @nimbuslab/cli
10
+ npm install -g @nimbuslab/cli
11
+
12
+ # Via GitHub Packages
13
+ npm install -g @nimbuslab/cli --registry=https://npm.pkg.github.com
14
+ ```
15
+
16
+ ## Uso
17
+
18
+ ```bash
19
+ # Criar novo projeto (interativo)
20
+ nimbus create
21
+
22
+ # Criar projeto com nome
23
+ nimbus create meu-projeto
24
+
25
+ # Modo automatico (fast, git, install)
26
+ nimbus create meu-projeto -y
27
+
28
+ # Ajuda
29
+ nimbus help
30
+ ```
31
+
32
+ ## Comandos
33
+
34
+ | Comando | Descricao |
35
+ |---------|-----------|
36
+ | `create [nome]` | Criar novo projeto nimbuslab |
37
+ | `create [nome] -y` | Criar com defaults (fast, git, deps) |
38
+ | `help` | Mostrar ajuda |
39
+ | `version` | Mostrar versao |
40
+
41
+ ## Tipos de Projeto
42
+
43
+ | Tipo | Descricao |
44
+ |------|-----------|
45
+ | `fast` | Landing page em 6 dias |
46
+ | `fast+` | SaaS completo com backend |
47
+
48
+ ## Requisitos
49
+
50
+ - Acesso SSH ao repositorio de templates nimbuslab
51
+ - Bun ou Node.js 18+
52
+ - Git
53
+
54
+ ## Desenvolvimento
55
+
56
+ ```bash
57
+ # Rodar em dev
58
+ bun run dev
59
+
60
+ # Build
61
+ bun run build
62
+
63
+ # Typecheck
64
+ bun run typecheck
65
+ ```
66
+
67
+ ## Stack
68
+
69
+ - **Runtime:** Bun
70
+ - **Prompts:** @clack/prompts
71
+ - **Cores:** picocolors
72
+
73
+ ## Licenca
74
+
75
+ Proprietario - nimbuslab. Todos os direitos reservados.
76
+
77
+ ---
78
+
79
+ **nimbuslab** - Tecnologia que transforma
80
+ https://nimbuslab.com.br
package/bun.lock ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "configVersion": 1,
4
+ "workspaces": {
5
+ "": {
6
+ "name": "nimbus-cli",
7
+ "dependencies": {
8
+ "@clack/prompts": "^0.11.0",
9
+ "picocolors": "^1.1.1",
10
+ },
11
+ "devDependencies": {
12
+ "@types/bun": "latest",
13
+ },
14
+ "peerDependencies": {
15
+ "typescript": "^5",
16
+ },
17
+ },
18
+ },
19
+ "packages": {
20
+ "@clack/core": ["@clack/core@0.5.0", "", { "dependencies": { "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-p3y0FIOwaYRUPRcMO7+dlmLh8PSRcrjuTndsiA0WAFbWES0mLZlrjVoBRZ9DzkPFJZG6KGkJmoEAY0ZcVWTkow=="],
21
+
22
+ "@clack/prompts": ["@clack/prompts@0.11.0", "", { "dependencies": { "@clack/core": "0.5.0", "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-pMN5FcrEw9hUkZA4f+zLlzivQSeQf5dRGJjSUbvVYDLvpKCdQx5OaknvKzgbtXOizhP+SJJJjqEbOe55uKKfAw=="],
23
+
24
+ "@types/bun": ["@types/bun@1.3.6", "", { "dependencies": { "bun-types": "1.3.6" } }, "sha512-uWCv6FO/8LcpREhenN1d1b6fcspAB+cefwD7uti8C8VffIv0Um08TKMn98FynpTiU38+y2dUO55T11NgDt8VAA=="],
25
+
26
+ "@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="],
27
+
28
+ "bun-types": ["bun-types@1.3.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-OlFwHcnNV99r//9v5IIOgQ9Uk37gZqrNMCcqEaExdkVq3Avwqok1bJFmvGMCkCE0FqzdY8VMOZpfpR3lwI+CsQ=="],
29
+
30
+ "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
31
+
32
+ "sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
33
+
34
+ "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
35
+
36
+ "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
37
+ }
38
+ }