CLI da RightNow
Atualizado
O comando rightnow faz a sua parte de uma otimização, na máquina que serve o seu modelo. Ele baixa um kit, confere, serve, verifica ao lado do motor original e reverte.
Instalar
No Linux ou no macOS, o instalador confere o binário assinado antes de instalar qualquer coisa:
Ele coloca rightnow em ~/.local/bin e nunca edita o perfil do seu shell. Se ~/.local/bin não estiver no seu PATH, ele mostra a linha a adicionar.
No Windows, execute isto no PowerShell. Ele confere a mesma assinatura antes de instalar qualquer coisa:
| Plataforma | Etapas do kit |
|---|---|
linux-x64 | Sim |
linux-arm64 | Sim |
linux-x64-musl | Sim |
linux-arm64-musl | Sim |
darwin-arm64 | Não |
darwin-x64 | Não |
windows-x64 | Não |
Aquecer, servir, verificar e reverter um kit só funciona no Linux. Todos os outros comandos funcionam em todas as plataformas.
Cada binário tem o seu checksum em SHA256SUMS, assinado em SHA256SUMS.sig, ao lado dele.
Entrar
Execute rightnow login na máquina. Ele mostra um código: o proprietário do workspace aprova o código no console da RightNow. A CLI não envia nenhum dado da sua máquina.
O login fica guardado no chaveiro do seu sistema. Numa máquina sem chaveiro, como um servidor de GPU, ele fica num arquivo que só o seu usuário pode ler. rightnow whoami mostra o workspace em que a máquina está conectada.
Comandos
Os comandos da versão 2.0.0:
| Comando | O que faz |
|---|---|
rightnow version | Print the CLI's version. |
rightnow doctor | Read this machine: GPU, driver, which GPUs are in use (free_gpus), engine, systemd, disk, user. Sends nothing. |
rightnow trace import <file> --out <out> | Make a trace from your own request log (JSONL or CSV). Prompts in the log are never read further or copied. |
rightnow trace metrics --url <url> --out <out> | Make a trace from the engine's own /metrics page over a window, with no change to serving (vLLM). |
rightnow trace record --upstream <upstream> --out <out> | Record a trace by passing the client's requests through to your engine for a while. Numbers only, never any text. |
rightnow trace check <file> | Check a trace file against the contract (rightnow-trace.v1). |
rightnow trace show <file> | Show everything a trace would send: its fields and its first rows. |
rightnow login | Sign in from this machine with a code the workspace owner approves in the RightNow console. Sends no machine details. Already signed in: says so and starts nothing. |
rightnow logout | Sign out: end this machine's session on the server, then delete the saved sign-in. |
rightnow whoami | The workspace this machine is signed in to. |
rightnow runs | Your optimization runs and whether each kit is ready. |
rightnow run <id> | One run: its order, its state, its result and its kit. |
rightnow trace upload <file> --run <run> | Send a checked trace (numbers only) to a run that has not started. Check it first with trace show. |
rightnow kit pull <id> | Download a paid kit, check its signature and every file, and unpack it into a folder that becomes its kit home. Installs nothing. |
rightnow kit check <dir> | Check a pulled kit folder against its signed list (signature, every file's size and sha256) and whether it fits this machine. Runs nothing. Under --json, made_for and this_machine hold what fit and fits hold. fit and fits go away in 0.2. |
rightnow kit warm <dir> | Run the kit's warm step once before traffic (it fills the GPU driver's cache the kit was measured with). |
rightnow kit serve <dir> | Check the kit folder again, then run the engine with the kit (serve.sh) in the foreground until you stop it (Ctrl-C). Words after -- go to the engine. With --json (and over MCP) nothing runs: the exact line comes back for your own process manager. |
rightnow kit verify <dir> | Run the kit's own verify program (the engine without the kit, then with it, on this machine's GPU), show the numbers, parity first. Use a GPU that is not serving. Sends nothing unless --post. Its work folder, with the engines' caches and the result, is rightnow/verify/<kit id> in your cache folder ($XDG_CACHE_HOME, else ~/.cache) and stays after the run. Set XDG_CACHE_HOME to keep it off a small home disk. |
rightnow kit rollback <dir> | Check the kit folder again, then run the engine as it was before the kit (serve-stock.sh) in the foreground until you stop it (Ctrl-C). Words after -- go to the engine. With --json (and over MCP) nothing runs: the exact line comes back for your own process manager. |
rightnow update <dir> | Take the newest kit of the run you serve: download it beside the kit in use, check it, warm it, verify it on this machine, then switch (the kit before stays for --back). Run it on a GPU that is not serving, or pass --no-verify. --check only says whether there is one. |
rightnow mcp | Serve these commands as tools to a coding agent over MCP (stdio). |
Os comandos de trace estão nesta versão, mas uma execução ainda não usa trace: cada solicitação é medida com a carga padrão.
Todo comando aceita --json: ele imprime um único documento JSON, e o código de saída diz como o comando terminou.
Estas etapas executam os próprios programas do kit na sua máquina: rightnow kit warm, rightnow kit serve, rightnow kit verify, rightnow kit rollback, rightnow update. Leia cada etapa antes de executá-la.
Seu agente de programação
Um agente de programação pode fazer cada etapa por você. Copie este prompt nele, com o id da sua execução no lugar de RUN_ID:
Ou dê ao agente os comandos como ferramentas: adicione este servidor MCP às configurações dele.
Cada ferramenta informa ao host do agente se só lê ou se muda a sua máquina, para que o host possa perguntar a você antes de uma mudança.
Máquinas restritas ou offline
Em uma rede restrita, libere HTTPS para os três hosts que a CLI e o instalador acessam:
| Host | Para que serve |
|---|---|
www.rightnowai.co | O instalador, o login e as suas execuções. |
releases.rightnowai.co | Os arquivos da CLI e seus checksums assinados. |
storage.googleapis.com | Os arquivos do seu kit. |
Para levar um kit a uma máquina sem internet:
Baixar online
Em uma máquina que acesse esses hosts, baixe o kit com
rightnow kit pull.Copiar
Copie a pasta inteira do kit e o binário
rightnowpara a máquina offline. As etapas do kit leem seu modelo de uma pasta nessa máquina, então copie também os pesos dele.Verificar offline
Execute
rightnow kit checklá. Ele só lê arquivos locais: confere cada arquivo com a lista assinada do kit, sem rede e sem login.
rightnow kit verify não envia nada a menos que você adicione --post, que precisa da rede.
Códigos de saída
| Código | Significado |
|---|---|
0 | Funcionou. |
1 | Não funcionou. A mensagem diz por quê. |
2 | Um comando, opção ou valor não estava certo. |
3 | A CLI recusou a etapa. |
4 | Esta máquina não está conectada. |
5 | A execução, o kit ou o arquivo não foi encontrado. |
6 | O pagamento ainda não foi compensado. |
7 | Não foi possível conectar à RightNow, ou ela não aceitou a chamada. O error.code indica qual dos dois, e not_open significa parar e avisar a pessoa. |
8 | Esta máquina não está pronta para a etapa. |
Relacionado
Para começar, veja quais modelos você pode otimizar e depois abra Otimizar um modelo no console. Antes de pagar, leia os preços e os termos de compra.