@aiuby-ia/cli 0.0.0-stage → 0.3.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/README.md CHANGED
@@ -1,3 +1,90 @@
1
- # Temporary Holding Version
1
+ # aiuby
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Linha de comando e templates de partida do **AIUBY Compute**.
4
+
5
+ > **Estado: prévia (0.3.0).** A CLI autentica, copia templates, cadastra aplicações e
6
+ > revisões a partir do `aiuby.toml`, lê o catálogo de hardware e mostra o plano de
7
+ > implantação. **Implantar funciona só em organizações com a prévia do runtime habilitada
8
+ > pela AIUBY**: CPU no Google Cloud, até 1 vCPU e 1 GB, 1 réplica, endereço público e prazo
9
+ > (a aplicação para sozinha). Nas demais, o pedido é recusado com os motivos. Logs, escala,
10
+ > volumes, segredos e GPU ainda não existem.
11
+
12
+ ## Instalação
13
+
14
+ Precisa de Node.js 20 ou mais novo. O pacote é distribuído pelo site da AIUBY:
15
+
16
+ ```bash
17
+ npm install -g https://aiuby.com/cli/aiuby-cli-latest.tgz
18
+ aiuby --version
19
+ ```
20
+
21
+ Para fixar uma versão, troque `latest` pelo número (por exemplo `aiuby-cli-0.3.0.tgz`).
22
+ Para atualizar, rode o mesmo comando de novo. Para remover: `npm uninstall -g @aiuby-ia/cli`.
23
+
24
+ ## Primeiros passos
25
+
26
+ 1. Adicione o AIUBY Compute à sua organização: na área logada, em **Produtos** (só o dono adiciona; não tem custo).
27
+ 2. Na área logada, em **Acesso → Chaves de API**, crie uma chave com os escopos
28
+ **Ler o Compute** e, para cadastrar pela CLI, **Gerenciar aplicações do Compute**.
29
+ Ela vale para um workspace, que é o "projeto" da CLI.
30
+ 3. Autentique e confira:
31
+
32
+ ```bash
33
+ aiuby login # cola a chave; ela não aparece na tela
34
+ aiuby whoami
35
+ aiuby apps list
36
+ aiuby capacity list
37
+ ```
38
+
39
+ 4. Comece de um template, ajuste o `aiuby.toml` e valide:
40
+
41
+ ```bash
42
+ aiuby init fastapi-http minha-api
43
+ cd minha-api
44
+ aiuby config validate
45
+ ```
46
+
47
+ 5. Cadastre a aplicação e veja o plano:
48
+
49
+ ```bash
50
+ aiuby apps create # cadastra; não implanta
51
+ aiuby apps update # depois de mudar o aiuby.toml: nova revisão
52
+ aiuby deploy --dry-run minha-api
53
+ aiuby deploy minha-api # só com a prévia do runtime; pede o escopo "Implantar no Compute"
54
+ aiuby stop minha-api
55
+ ```
56
+
57
+ O cadastro também pode ser feito na tela **Compute → Apps**.
58
+
59
+ Em automação, defina `AIUBY_TOKEN` no ambiente em vez de usar `login`.
60
+
61
+ ## Documentação
62
+
63
+ - [Referência da CLI](docs/cli.md)
64
+ - [Referência da API](docs/api.md)
65
+
66
+ ## Templates
67
+
68
+ | Pasta | O que é |
69
+ | --- | --- |
70
+ | [`templates/fastapi-http`](templates/fastapi-http) | API HTTP em Python com FastAPI, em CPU |
71
+ | [`templates/vllm-openai`](templates/vllm-openai) | Inferência com vLLM e API compatível com OpenAI, em GPU |
72
+ | [`templates/langgraph-agent`](templates/langgraph-agent) | Agente com LangGraph atrás de uma API HTTP, em CPU |
73
+
74
+ São pontos de partida de código. Ainda não foram executados num runtime da AIUBY.
75
+
76
+ ## Segurança
77
+
78
+ - A CLI fala só com a API da AIUBY. Nunca pede credenciais da AWS ou do Google Cloud.
79
+ - A chave nunca é aceita como argumento. Fica em `~/.config/aiuby/credentials.json`, com permissão `0600`.
80
+ - A API precisa ser HTTPS (HTTP só em `localhost`).
81
+
82
+ ## Desenvolvimento
83
+
84
+ ```bash
85
+ npm ci
86
+ npm run check # tipos, testes e build
87
+ ```
88
+
89
+ `src/contracts.ts` espelha o contrato de configuração da API. A validação local é uma
90
+ conveniência: quem decide é a API.
@@ -0,0 +1,58 @@
1
+ # Licenças de terceiros
2
+
3
+ O executável `dist/aiuby.mjs` embute estas bibliotecas.
4
+
5
+ ## zod
6
+
7
+ ```
8
+ MIT License
9
+
10
+ Copyright (c) 2025 Colin McDonnell
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+ ```
30
+
31
+ ## smol-toml
32
+
33
+ ```
34
+ Copyright (c) Squirrel Chat et al., All rights reserved.
35
+
36
+ Redistribution and use in source and binary forms, with or without
37
+ modification, are permitted provided that the following conditions are met:
38
+
39
+ 1. Redistributions of source code must retain the above copyright notice, this
40
+ list of conditions and the following disclaimer.
41
+ 2. Redistributions in binary form must reproduce the above copyright notice,
42
+ this list of conditions and the following disclaimer in the
43
+ documentation and/or other materials provided with the distribution.
44
+ 3. Neither the name of the copyright holder nor the names of its contributors
45
+ may be used to endorse or promote products derived from this software without
46
+ specific prior written permission.
47
+
48
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
49
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
51
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
52
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
55
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
56
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
57
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58
+ ```