@aiuby-ia/cli 0.0.0-stage → 0.4.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,93 @@
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.4.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), com `aiuby logs` para ver a saída. Nas demais, o pedido é
10
+ > recusado com os motivos. Escala, volumes, segredos e GPU ainda não existem.
11
+
12
+ ## Instalação
13
+
14
+ Precisa de Node.js 20 ou mais novo.
15
+
16
+ ```bash
17
+ npm install -g @aiuby-ia/cli
18
+ aiuby --version
19
+ ```
20
+
21
+ Sem acesso ao registro do npm, o mesmo pacote está no site da AIUBY:
22
+ `npm install -g https://aiuby.com/cli/aiuby-cli-latest.tgz`.
23
+
24
+ Para atualizar, rode o comando de instalação de novo. Para remover: `npm uninstall -g @aiuby-ia/cli`.
25
+
26
+ ## Primeiros passos
27
+
28
+ 1. Adicione o AIUBY Compute à sua organização: na área logada, em **Produtos** (só o dono adiciona; não tem custo).
29
+ 2. Na área logada, em **Acesso → Chaves de API**, crie uma chave com os escopos
30
+ **Ler o Compute** e, para cadastrar pela CLI, **Gerenciar aplicações do Compute**.
31
+ Ela vale para um workspace, que é o "projeto" da CLI.
32
+ 3. Autentique e confira:
33
+
34
+ ```bash
35
+ aiuby login # cola a chave; ela não aparece na tela
36
+ aiuby whoami
37
+ aiuby apps list
38
+ aiuby capacity list
39
+ ```
40
+
41
+ 4. Comece de um template, ajuste o `aiuby.toml` e valide:
42
+
43
+ ```bash
44
+ aiuby init fastapi-http minha-api
45
+ cd minha-api
46
+ aiuby config validate
47
+ ```
48
+
49
+ 5. Cadastre a aplicação e veja o plano:
50
+
51
+ ```bash
52
+ aiuby apps create # cadastra; não implanta
53
+ aiuby apps update # depois de mudar o aiuby.toml: nova revisão
54
+ aiuby deploy --dry-run minha-api
55
+ aiuby deploy minha-api # só com a prévia do runtime; pede o escopo "Implantar no Compute"
56
+ aiuby logs minha-api
57
+ aiuby stop minha-api
58
+ ```
59
+
60
+ O cadastro também pode ser feito na tela **Compute → Apps**.
61
+
62
+ Em automação, defina `AIUBY_TOKEN` no ambiente em vez de usar `login`.
63
+
64
+ ## Documentação
65
+
66
+ - [Referência da CLI](docs/cli.md)
67
+ - [Referência da API](docs/api.md)
68
+
69
+ ## Templates
70
+
71
+ | Pasta | O que é |
72
+ | --- | --- |
73
+ | [`templates/fastapi-http`](templates/fastapi-http) | API HTTP em Python com FastAPI, em CPU |
74
+ | [`templates/vllm-openai`](templates/vllm-openai) | Inferência com vLLM e API compatível com OpenAI, em GPU |
75
+ | [`templates/langgraph-agent`](templates/langgraph-agent) | Agente com LangGraph atrás de uma API HTTP, em CPU |
76
+
77
+ São pontos de partida de código. Ainda não foram executados num runtime da AIUBY.
78
+
79
+ ## Segurança
80
+
81
+ - A CLI fala só com a API da AIUBY. Nunca pede credenciais da AWS ou do Google Cloud.
82
+ - A chave nunca é aceita como argumento. Fica em `~/.config/aiuby/credentials.json`, com permissão `0600`.
83
+ - A API precisa ser HTTPS (HTTP só em `localhost`).
84
+
85
+ ## Desenvolvimento
86
+
87
+ ```bash
88
+ npm ci
89
+ npm run check # tipos, testes e build
90
+ ```
91
+
92
+ `src/contracts.ts` espelha o contrato de configuração da API. A validação local é uma
93
+ 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
+ ```