vyra-code 0.2.43__tar.gz → 0.2.45__tar.gz

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.
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: vyra-code
3
+ Version: 0.2.45
4
+ Summary: Vyra Code: assistente de IA no terminal (Termux, Linux, macOS e Windows) (chat em streaming, tarefas, memória, projetos e terminal remoto)
5
+ License: Proprietary
6
+ Keywords: termux,ai,assistant,cli,android,llm
7
+ Classifier: Environment :: Console
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: Other/Proprietary License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development
16
+ Classifier: Topic :: Terminals
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: websocket-client>=1.6
20
+ Provides-Extra: term
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "vyra-code"
7
- version = "0.2.43"
7
+ version = "0.2.45"
8
8
  description = "Vyra Code: assistente de IA no terminal (Termux, Linux, macOS e Windows) (chat em streaming, tarefas, memória, projetos e terminal remoto)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -74,9 +74,11 @@ def default_home(env: dict | None = None, win: bool | None = None) -> str:
74
74
  return new
75
75
 
76
76
 
77
- VERSION = "0.2.43"
77
+ VERSION = "0.2.45"
78
78
  DEFAULT_BACKEND = "https://aihub-api.vyntrica.com"
79
79
  CHANGELOG = {
80
+ "0.2.45": ["corrige o vyra-browse com 400 invalid url: a IA às vezes escreve a URL entre < > (autolink do Markdown) e o Worker só aceita a URL nua; o cliente agora tira os colchetes (e extrai a URL se vier dentro de um link) antes de mandar"],
81
+ "0.2.44": ["update sem cache: a leitura do PyPI fura o cache do CDN (cache-buster + no-cache) e, se aparecer versão mais nova no meio da instalação, uma só execução converge para ela — não precisa rodar o comando duas vezes", "tokens ao vivo: a barra embaixo da resposta mostra a contagem de tokens crescendo enquanto a IA responde (estimativa, com ~; o valor exato continua no rodapé depois)", "caixa de mensagem permanente: a barra fica sempre embaixo e a resposta sai acima dela, inclusive enquanto a IA responde; o editor redesenha do zero quando o terminal muda de tamanho (teclado abrindo/fechando no Termux), sem região de rolagem fixa"],
80
82
  "0.2.43": ["a busca na web e o navegador ficam sempre ligados para a IA (o comando /web on|off foi removido); as fontes continuam aparecendo na resposta"],
81
83
  "0.2.42": ["caixa de entrada fixa removida: quebrava de verdade no Termux sempre que o teclado abria/fechava (o terminal muda de tamanho e a região fixa saía do lugar, com trechos da conversa sumindo); volta ao campo de digitação simples de antes da 0.2.40"],
82
84
  "0.2.41": ["cores da interface agora seguem a paleta da logo (prata e grafite-azulado), em vez do laranja do AI Hub Code; sucesso/aviso/falha continuam verde/amarelo/vermelho"],
@@ -985,8 +987,28 @@ SANDBOX_COOLDOWN = 300.0
985
987
  SANDBOX_INFRA = ("504", "503", "502", "sandbox_timeout", "executor_offline")
986
988
 
987
989
 
990
+ def _clean_browse_url(text: str) -> str:
991
+ """Limpa a URL do bloco aihub-browse antes de mandar ao servidor.
992
+
993
+ A IA às vezes escreve a URL no formato de autolink do Markdown (`<https://…>`) ou
994
+ dentro de um link (`[texto](https://…)`); o Worker só aceita a URL nua e devolve
995
+ 400 "invalid url" com os colchetes. Tira os espaços, os `< >` e, se sobrar texto
996
+ em volta, extrai a primeira URL.
997
+ """
998
+ t = (text or "").strip()
999
+ if t.startswith("<") and t.endswith(">") and len(t) > 2:
1000
+ t = t[1:-1].strip()
1001
+ if not re.fullmatch(r"https?://\S+", t, re.I):
1002
+ m = re.search(r"https?://[^\s<>\]\)]+", t, re.I)
1003
+ if m:
1004
+ t = m.group(0).rstrip(".,;")
1005
+ return t
1006
+
1007
+
988
1008
  def run_tool(c: "Client", kind: str, text: str, now: Callable[[], float] = time.time) -> tuple[int, str]:
989
1009
  """Executa a ferramenta no sandbox do usuário (servidor). Nunca roda nada neste aparelho."""
1010
+ if kind == "browse":
1011
+ text = _clean_browse_url(text)
990
1012
  if now() < SANDBOX_DOWN["until"]:
991
1013
  return 125, "ferramenta indisponível: o sandbox falhou há pouco; não tente de novo agora. Responda com o que sabe ou pesquise na web (já está sempre ligada)."
992
1014
  try:
@@ -1874,8 +1896,17 @@ PYPI_DIST = "vyra-code"
1874
1896
 
1875
1897
 
1876
1898
  def pypi_latest(opener: Callable[..., Any] = urllib.request.urlopen) -> str | None:
1899
+ """Versão mais recente no PyPI, sem cache.
1900
+
1901
+ O JSON do PyPI passa por CDN e pode vir desatualizado: sem o cache-buster a
1902
+ primeira execução do `vyra update` via a versão velha (e só atualizava de
1903
+ verdade na segunda execução). O `?_=<epoch>` muda a chave do cache e os
1904
+ cabeçalhos pedem para não usar cópia guardada.
1905
+ """
1906
+ url = "https://pypi.org/pypi/" + PYPI_DIST + "/json?_=" + str(int(time.time()))
1907
+ req = urllib.request.Request(url, headers={"Cache-Control": "no-cache", "Pragma": "no-cache"})
1877
1908
  try:
1878
- with opener("https://pypi.org/pypi/" + PYPI_DIST + "/json", timeout=10) as r:
1909
+ with opener(req, timeout=10) as r:
1879
1910
  v = json.loads(r.read().decode()).get("info", {}).get("version", "")
1880
1911
  except (OSError, ValueError, urllib.error.URLError):
1881
1912
  return None
@@ -1951,27 +1982,47 @@ def cmd_update(c: Client, a: argparse.Namespace, out: Callable[[str], None], tty
1951
1982
  out("")
1952
1983
  out(f" Versão instalada: {VERSION}" + (f" · disponível: {paint(latest, BOLD, color=color)}" if latest else " · não consegui consultar o PyPI"))
1953
1984
  return 0 if latest else 1
1954
- def install() -> tuple[bool, str]:
1985
+ verified: list[str] = [] # versão instalada confirmada por install(), sem nova leitura
1986
+
1987
+ def install(target: str | None) -> tuple[bool, str]:
1955
1988
  """O índice do PyPI pode demorar um pouco para enxergar uma versão recém-publicada: tenta de novo."""
1956
1989
  res: tuple[bool, str] = (False, "")
1957
1990
  for i in range(4):
1958
- res = pip_upgrade(latest)
1991
+ res = pip_upgrade(target)
1959
1992
  info = installed_info() if res[0] else None
1960
- if res[0] and (not latest or (info and vtuple(info["v"]) >= vtuple(latest))):
1993
+ if res[0] and (not target or (info and vtuple(info["v"]) >= vtuple(target))):
1994
+ if info:
1995
+ verified.append(info["v"])
1961
1996
  return True, ""
1962
- if res[0] and latest:
1997
+ if res[0] and target:
1963
1998
  res = (False, "O PyPI ainda não liberou a versão nova. Tente de novo em 1 minuto.")
1964
1999
  if i < 3:
1965
2000
  sleep(8)
1966
2001
  return res
1967
2002
 
1968
- ok, res, _ = run_step(f"Instalando {latest}" if latest else "Instalando a versão mais recente", install, out, tty, color, lambda r: bool(r[0]))
2003
+ ok, res, _ = run_step(f"Instalando {latest}" if latest else "Instalando a versão mais recente", lambda: install(latest), out, tty, color, lambda r: bool(r[0]))
1969
2004
  if not ok:
1970
2005
  out("")
1971
2006
  for ln in (res[1] or "erro desconhecido").splitlines():
1972
2007
  out(" " + paint(ln, DIM, color=color))
1973
2008
  out(" Tente manualmente: pip install -U " + PYPI_DIST)
1974
2009
  return 1
2010
+ # Sem cache, uma só execução converge para a versão mais recente: a primeira
2011
+ # leitura do PyPI pode ter vindo de um espelho/CDN desatualizado, então confere
2012
+ # de novo (sem cache) e, se apareceu versão mais nova nesse meio-tempo, instala
2013
+ # também — em vez de o dono ter de rodar o comando uma segunda vez.
2014
+ for _ in range(2):
2015
+ fresh = pypi_latest()
2016
+ cur = verified[-1] if verified else ""
2017
+ if not fresh or not cur or vtuple(fresh) <= vtuple(cur):
2018
+ break
2019
+ ok, res, _ = run_step(f"Instalando {fresh}", lambda: install(fresh), out, tty, color, lambda r: bool(r[0]))
2020
+ if not ok:
2021
+ out("")
2022
+ for ln in (res[1] or "erro desconhecido").splitlines():
2023
+ out(" " + paint(ln, DIM, color=color))
2024
+ out(" Tente manualmente: pip install -U " + PYPI_DIST)
2025
+ return 1
1975
2026
  info = installed_info()
1976
2027
  new_v = (info or {}).get("v") or latest or "?"
1977
2028
  out("")
@@ -2326,20 +2377,24 @@ class LivePanel:
2326
2377
 
2327
2378
  Fica abaixo do cursor e é redesenhado a cada ~80 ms; o texto da resposta continua saindo acima dele.
2328
2379
  `think` = anel prateado girando (respondendo/pesquisando). `run` = arco-íris girando (executando comandos).
2380
+ `compact` = só uma linha de status (sem o avatar grande): é a barra ao vivo do chat normal,
2381
+ com o verbo, o tempo e a contagem de tokens (ao vivo, via `tok_fn`).
2329
2382
  """
2330
2383
 
2331
2384
  HEIGHT = 7
2332
2385
 
2333
2386
  def __init__(self, enabled: bool, color: bool = True, tc: bool | None = None, col_fn: Callable[[], int] = lambda: 0,
2334
- write: Callable[[str], Any] | None = None):
2387
+ write: Callable[[str], Any] | None = None, compact: bool = False,
2388
+ tok_fn: Callable[[], str] | None = None):
2335
2389
  self.enabled, self.color, self.tc, self.col_fn = enabled, color, tc, col_fn
2336
2390
  self.write = write or (lambda s: (sys.stdout.write(s), sys.stdout.flush()))
2337
2391
  self.lock = threading.RLock()
2338
2392
  self.mode = "think"
2393
+ self.compact, self.tok_fn = compact, tok_fn
2339
2394
  self._stop, self._t, self._t0, self._i = threading.Event(), None, 0.0, 0
2340
2395
 
2341
2396
  @staticmethod
2342
- def status_lines(mode: str, i: int, elapsed: float, color: bool = True) -> list[str]:
2397
+ def status_lines(mode: str, i: int, elapsed: float, color: bool = True, tok: str = "") -> list[str]:
2343
2398
  verbs = RUN_VERBS if mode == "run" else VERBS
2344
2399
  label = verbs[int(elapsed // 3) % len(verbs)] + "…"
2345
2400
  star = STARS[i % len(STARS)]
@@ -2350,9 +2405,15 @@ class LivePanel:
2350
2405
  hot = (i // 2) % (len(label) + 6)
2351
2406
  text = "".join(paint(ch, BOLD, color=color) if abs(j - hot) <= 1 else paint(ch, ACCENT_SOFT, color=color) for j, ch in enumerate(label))
2352
2407
  head = paint(star, ACCENT, color=color)
2353
- return [f"{head} {text}", paint(t("spin_hint", s=int(elapsed)), DIM, color=color)]
2408
+ first = f"{head} {text}"
2409
+ if tok:
2410
+ first += " " + paint("· " + tok, DIM, color=color)
2411
+ return [first, paint(t("spin_hint", s=int(elapsed)), DIM, color=color)]
2354
2412
 
2355
2413
  def draw_string(self, i: int, elapsed: float, col: int) -> str:
2414
+ if self.compact:
2415
+ st = self.status_lines(self.mode, i, elapsed, self.color, self.tok_fn() if self.tok_fn else "")
2416
+ return "\n\r " + st[0] + " " + st[1] + "\x1b[K" + f"\x1b[1A\x1b[{col + 1}G"
2356
2417
  av = render_mini(self.mode, (i * 0.045) % 1.0, self.color, self.tc)
2357
2418
  st = self.status_lines(self.mode, i, elapsed, self.color)
2358
2419
  w = len(MINI_BASE[0])
@@ -3120,8 +3181,15 @@ HISTORY: list[str] = []
3120
3181
 
3121
3182
 
3122
3183
  def read_menu(prompt: str, left: str, right: str, width: int, color: bool = True) -> str:
3123
- """Leitura com menu de comandos. Requer terminal real (termios)."""
3184
+ """Leitura com menu de comandos. Requer terminal real (termios).
3185
+
3186
+ No Termux o terminal muda de tamanho quando o teclado abre/fecha: um SIGWINCH
3187
+ marca o redimensionamento e o editor redesenha do zero com a largura nova, em
3188
+ vez de continuar com a contagem de linhas antiga (que deixava a conversa
3189
+ desalinhada e sumindo). Sem região de rolagem fixa: só movimentos relativos.
3190
+ """
3124
3191
  import codecs
3192
+ import signal
3125
3193
  import termios
3126
3194
  import tty as _tty
3127
3195
  fd = sys.stdin.fileno()
@@ -3130,6 +3198,12 @@ def read_menu(prompt: str, left: str, right: str, width: int, color: bool = True
3130
3198
  ed = LineEditor(HISTORY)
3131
3199
  rule = paint("─" * width, DIM, color=color)
3132
3200
  reserve = LineEditor.MENU_ROWS + 3
3201
+ resized: list[bool] = [False]
3202
+ old_winch = None
3203
+ try:
3204
+ old_winch = signal.signal(signal.SIGWINCH, lambda *_: resized.__setitem__(0, True))
3205
+ except (ValueError, OSError, AttributeError):
3206
+ old_winch = None
3133
3207
  sys.stdout.write("\n" * reserve + "\x1b[%dA" % reserve + rule + "\n")
3134
3208
  sys.stdout.flush()
3135
3209
  prev = 0
@@ -3140,6 +3214,13 @@ def read_menu(prompt: str, left: str, right: str, width: int, color: bool = True
3140
3214
  sys.stdout.flush()
3141
3215
  while True:
3142
3216
  data = dec.decode(os.read(fd, 1024))
3217
+ if resized[0]:
3218
+ resized[0] = False
3219
+ width = term_width()
3220
+ rule = paint("─" * width, DIM, color=color)
3221
+ sys.stdout.write("\r\x1b[J") # limpa daqui para baixo e redesenha do zero
3222
+ sys.stdout.flush()
3223
+ prev = 0
3143
3224
  for key in split_keys(data):
3144
3225
  done = ed.feed(key)
3145
3226
  if done is not None:
@@ -3151,6 +3232,11 @@ def read_menu(prompt: str, left: str, right: str, width: int, color: bool = True
3151
3232
  sys.stdout.flush()
3152
3233
  finally:
3153
3234
  termios.tcsetattr(fd, termios.TCSADRAIN, saved)
3235
+ if old_winch is not None:
3236
+ try:
3237
+ signal.signal(signal.SIGWINCH, old_winch)
3238
+ except (ValueError, OSError):
3239
+ pass
3154
3240
 
3155
3241
 
3156
3242
  def render_help(color: bool = True) -> list[str]:
@@ -3252,7 +3338,8 @@ def read_boxed(prompt: str, left: str, right: str, width: int, tty: bool, color:
3252
3338
 
3253
3339
  def _stream_turn(c: Client, text: str, history: list[dict], model: str | None, project: str | None,
3254
3340
  printer: "StreamPrinter", spinner: Spinner, web: bool = False, skill: str | None = None, context: str | None = None, tools: bool = True, effort: str | None = None,
3255
- files: list[dict] | None = None, images: list[dict] | None = None) -> dict:
3341
+ files: list[dict] | None = None, images: list[dict] | None = None,
3342
+ live_tok: dict | None = None) -> dict:
3256
3343
  """Uma rodada de chat em streaming. Devolve {answer, model, fallback_event, error}."""
3257
3344
  body: dict = {"message": text, "history": history[-MAX_HISTORY:]}
3258
3345
  att_body(body, files, images)
@@ -3277,6 +3364,8 @@ def _stream_turn(c: Client, text: str, history: list[dict], model: str | None, p
3277
3364
  r = _chat_once(c, text, history, model, project, web, skill, context, tools, effort, files, images)
3278
3365
  spinner.stop()
3279
3366
  printer.feed(r.get("answer", ""))
3367
+ if live_tok is not None:
3368
+ live_tok["comp"] = len(r.get("answer", "")) // 4
3280
3369
  return {"answer": r.get("answer", ""), "model": r.get("model"), "fallback_event": r.get("fallback_event"), "error": None, "web": r.get("web"), "sources": r.get("sources"),
3281
3370
  "usage": r.get("usage"), "skill": r.get("skill"), "skill_auto": r.get("skill_auto")}
3282
3371
  if resp.status != 200:
@@ -3293,6 +3382,8 @@ def _stream_turn(c: Client, text: str, history: list[dict], model: str | None, p
3293
3382
  spinner.stop()
3294
3383
  printer.feed(d["t"])
3295
3384
  res["answer"] += d["t"]
3385
+ if live_tok is not None:
3386
+ live_tok["comp"] = len(res["answer"]) // 4
3296
3387
  elif name == "error":
3297
3388
  res["error"] = d.get("error", "erro")
3298
3389
  return res
@@ -3675,6 +3766,7 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3675
3766
 
3676
3767
  reader = read or (lambda prompt: read_boxed(prompt, t("foot_left"), footer_right(), width, tty, color))
3677
3768
  while True:
3769
+ width = term_width() # o terminal muda de tamanho no Termux quando o teclado abre/fecha: relê a cada volta
3678
3770
  if pending is not None:
3679
3771
  line, pending = pending, None
3680
3772
  else:
@@ -3949,12 +4041,21 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3949
4041
  buf: list[str] = []
3950
4042
  state: dict = {}
3951
4043
  panel = LivePanel(live, color, col_fn=lambda: state["p"].col if "p" in state else 0)
3952
- base_printer = StreamPrinter((lambda s: (sys.stdout.write("\x1b[J" + s), sys.stdout.flush())) if live else (lambda s: (sys.stdout.write(s), sys.stdout.flush())) if tty else buf.append, width - 1, color)
3953
- printer = LockedPrinter(base_printer, panel.lock) if live else base_printer
4044
+ # Barra ao vivo (item 2 e 3): uma linha embaixo da resposta, com o verbo, o tempo e os
4045
+ # tokens ao vivo; a resposta sai acima dela e a barra fica sempre embaixo. No terminal
4046
+ # real ela substitui o Spinner (que só existia antes do primeiro token).
4047
+ live_tok = {"prompt": 0, "comp": 0} # tokens ao vivo da rodada (estimativa; o valor exato chega no `done`)
4048
+ show_status = tty and not live
4049
+ status = LivePanel(show_status, color, compact=True, col_fn=lambda: state["p"].col if "p" in state else 0,
4050
+ tok_fn=lambda: (fmt_tok(live_tok["prompt"] + live_tok["comp"]) + " tok~") if live_tok["prompt"] + live_tok["comp"] else "")
4051
+ base_printer = StreamPrinter((lambda s: (sys.stdout.write("\x1b[J" + s), sys.stdout.flush())) if (live or show_status) else (lambda s: (sys.stdout.write(s), sys.stdout.flush())) if tty else buf.append, width - 1, color)
4052
+ printer = LockedPrinter(base_printer, status.lock) if show_status else (LockedPrinter(base_printer, panel.lock) if live else base_printer)
3954
4053
  state["p"] = base_printer
3955
- sp = NoStop() if live else Spinner(tty, color)
4054
+ sp = NoStop() if (live or show_status) else Spinner(tty, color)
3956
4055
  sp.rb = effort == "max"
3957
4056
  t0 = time.time()
4057
+ live_tok["prompt"] = ctx_tokens(history, summary, sticky) + len(line) // 4
4058
+ live_tok["comp"] = 0
3958
4059
  r: dict | None = None
3959
4060
  is_step = line.startswith("[Resultado") or line.startswith("[Skill ")
3960
4061
  turn_images: list[dict] = []
@@ -3964,12 +4065,13 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3964
4065
  queued.clear()
3965
4066
  try:
3966
4067
  with quiet_input(tty):
3967
- panel.start("think") if live else sp.start()
3968
- r = _stream_turn(c, line, history, model, None, printer, sp, web or once_web or fb_web, skill or (auto_name if is_step else None), summary, True, effort, sticky, turn_images)
4068
+ panel.start("think") if live else (status.start("think") if show_status else sp.start())
4069
+ r = _stream_turn(c, line, history, model, None, printer, sp, web or once_web or fb_web, skill or (auto_name if is_step else None), summary, True, effort, sticky, turn_images, live_tok=live_tok)
3969
4070
  fb_web = False
3970
4071
  except KeyboardInterrupt:
3971
4072
  printer.finish()
3972
4073
  panel.stop()
4074
+ status.stop()
3973
4075
  sp.stop()
3974
4076
  out(render_detail("interrompido", color))
3975
4077
  if loop:
@@ -3979,6 +4081,7 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3979
4081
  continue
3980
4082
  except CliError as e:
3981
4083
  panel.stop()
4084
+ status.stop()
3982
4085
  sp.stop()
3983
4086
  out(paint(" ✗ ", RED, color=color) + str(e))
3984
4087
  if loop:
@@ -3988,6 +4091,7 @@ def cmd_tui(c: Client, a: argparse.Namespace, out: Callable[[str], None] = print
3988
4091
  continue
3989
4092
  printer.finish()
3990
4093
  panel.stop()
4094
+ status.stop()
3991
4095
  sp.stop()
3992
4096
  if not tty:
3993
4097
  for ln in "".join(buf).rstrip("\n").split("\n"):
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: vyra-code
3
+ Version: 0.2.45
4
+ Summary: Vyra Code: assistente de IA no terminal (Termux, Linux, macOS e Windows) (chat em streaming, tarefas, memória, projetos e terminal remoto)
5
+ License: Proprietary
6
+ Keywords: termux,ai,assistant,cli,android,llm
7
+ Classifier: Environment :: Console
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: Other/Proprietary License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development
16
+ Classifier: Topic :: Terminals
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: websocket-client>=1.6
20
+ Provides-Extra: term
@@ -1,4 +1,3 @@
1
- README.md
2
1
  pyproject.toml
3
2
  vyra.py
4
3
  vyra_i18n.py
vyra_code-0.2.43/PKG-INFO DELETED
@@ -1,82 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: vyra-code
3
- Version: 0.2.43
4
- Summary: Vyra Code: assistente de IA no terminal (Termux, Linux, macOS e Windows) (chat em streaming, tarefas, memória, projetos e terminal remoto)
5
- License: Proprietary
6
- Keywords: termux,ai,assistant,cli,android,llm
7
- Classifier: Environment :: Console
8
- Classifier: Intended Audience :: Developers
9
- Classifier: License :: Other/Proprietary License
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Operating System :: Microsoft :: Windows
12
- Classifier: Operating System :: MacOS
13
- Classifier: Operating System :: POSIX :: Linux
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Topic :: Software Development
16
- Classifier: Topic :: Terminals
17
- Requires-Python: >=3.9
18
- Description-Content-Type: text/markdown
19
- Requires-Dist: websocket-client>=1.6
20
- Provides-Extra: term
21
-
22
- # Vyra Code
23
-
24
- Assistente de IA no terminal do **Termux** (Android): converse com modelos gratuitos, rode tarefas de agentes, guarde memória e projetos, e abra um terminal remoto — tudo pelo seu servidor Vyra, sem chave de API no celular.
25
-
26
- ```text
27
- ✻ Vyra Code · streaming · avatar animado · /comandos
28
- ```
29
-
30
- ## Instalação
31
-
32
- Na primeira execução (`vyra` ou `vyra setup`) aparece a logo animada, a escolha de idioma, as etapas de instalação/configuração e a pergunta **"Você confia nesta pasta?"** (1 confiar e lembrar, 2 só desta vez, 3 sair). Idiomas: pt, en, es, fr, de, it, ru, zh, ja, ko, hi, tr (`vyra lang`, `/lang`); outros idiomas: crie `~/.config/vyra-code/lang/<código>.json` com as chaves traduzidas (o que faltar cai para inglês). `/model` lista todos os modelos; escolha por número, nome ou `auto`.
33
-
34
-
35
- ```sh
36
- pkg install -y python
37
- pip install -q vyra-code
38
- vyra setup && vyra login
39
- ```
40
-
41
- Para atualizar: `vyra update` (confere a versão, instala em silêncio e mostra só as novidades).
42
- Da 0.2.2 ou anterior, rode uma vez `pip install -q -U vyra-code`.
43
-
44
- Requisitos: Python 3.9+. Única dependência: `websocket-client` (terminal remoto).
45
-
46
- ## Entrar
47
-
48
- | Como | Comando |
49
- |---|---|
50
- | E-mail e senha | `vyra login` |
51
- | Link no e-mail (sem senha) | `vyra login --link` (ou senha em branco) |
52
- | Conta Google | `vyra login --google` |
53
-
54
- A senha nunca é gravada. O cliente conversa **apenas com o servidor do Vyra**: ele não guarda chaves de API nem endereços de provedores.
55
-
56
- ## Uso
57
-
58
- Digite `vyra` para abrir a interface interativa (resposta em streaming, `/help` lista os comandos).
59
-
60
- | Comando | O que faz |
61
- |---|---|
62
- | `vyra` | interface interativa com avatar animado |
63
- | `vyra chat [texto]` | conversa (`--model`, `--project`, `--no-save`) |
64
- | busca na web / navegador | sempre ligados para a IA (sem `/web`); as fontes aparecem na resposta. `vyra chat --web` força a busca no modo não interativo |
65
- | `vyra tasks new/list/show/run/watch/cancel/pause/resume` | tarefas dos agentes (id aceita prefixo) |
66
- | `vyra notify` | avisa pelo Termux:API quando uma tarefa termina |
67
- | `vyra memory list/add/search/rm` | memória persistente |
68
- | `vyra projects list/add/rm` | projetos |
69
- | `vyra term` | terminal remoto (sair: Ctrl+]) |
70
- | `vyra update [--check]` | atualiza ou só confere a versão |
71
- | `vyra status`, `models`, `history`, `whoami`, `logout` | utilitários |
72
-
73
- Dentro do `vyra`: `/avatar think` e `/avatar run` mostram a animação do avatar (anel prateado ao responder, arco-íris ao executar comandos).
74
-
75
- ## Segurança
76
-
77
- - Só fala com o servidor do Vyra, por HTTPS; qualquer outro endereço é recusado.
78
- - Sessão em `~/.config/vyra-code/session.json` (modo 0600, pasta 0700).
79
- - Só modelos gratuitos aprovados no servidor; o cliente não escolhe provedores pagos.
80
- - Login com PKCE (link e Google): o código recebido só vale com um segredo que nunca sai do aparelho.
81
-
82
- Licença: proprietária. Suporte: fale com o responsável pelo seu servidor Vyra.
@@ -1,61 +0,0 @@
1
- # Vyra Code
2
-
3
- Assistente de IA no terminal do **Termux** (Android): converse com modelos gratuitos, rode tarefas de agentes, guarde memória e projetos, e abra um terminal remoto — tudo pelo seu servidor Vyra, sem chave de API no celular.
4
-
5
- ```text
6
- ✻ Vyra Code · streaming · avatar animado · /comandos
7
- ```
8
-
9
- ## Instalação
10
-
11
- Na primeira execução (`vyra` ou `vyra setup`) aparece a logo animada, a escolha de idioma, as etapas de instalação/configuração e a pergunta **"Você confia nesta pasta?"** (1 confiar e lembrar, 2 só desta vez, 3 sair). Idiomas: pt, en, es, fr, de, it, ru, zh, ja, ko, hi, tr (`vyra lang`, `/lang`); outros idiomas: crie `~/.config/vyra-code/lang/<código>.json` com as chaves traduzidas (o que faltar cai para inglês). `/model` lista todos os modelos; escolha por número, nome ou `auto`.
12
-
13
-
14
- ```sh
15
- pkg install -y python
16
- pip install -q vyra-code
17
- vyra setup && vyra login
18
- ```
19
-
20
- Para atualizar: `vyra update` (confere a versão, instala em silêncio e mostra só as novidades).
21
- Da 0.2.2 ou anterior, rode uma vez `pip install -q -U vyra-code`.
22
-
23
- Requisitos: Python 3.9+. Única dependência: `websocket-client` (terminal remoto).
24
-
25
- ## Entrar
26
-
27
- | Como | Comando |
28
- |---|---|
29
- | E-mail e senha | `vyra login` |
30
- | Link no e-mail (sem senha) | `vyra login --link` (ou senha em branco) |
31
- | Conta Google | `vyra login --google` |
32
-
33
- A senha nunca é gravada. O cliente conversa **apenas com o servidor do Vyra**: ele não guarda chaves de API nem endereços de provedores.
34
-
35
- ## Uso
36
-
37
- Digite `vyra` para abrir a interface interativa (resposta em streaming, `/help` lista os comandos).
38
-
39
- | Comando | O que faz |
40
- |---|---|
41
- | `vyra` | interface interativa com avatar animado |
42
- | `vyra chat [texto]` | conversa (`--model`, `--project`, `--no-save`) |
43
- | busca na web / navegador | sempre ligados para a IA (sem `/web`); as fontes aparecem na resposta. `vyra chat --web` força a busca no modo não interativo |
44
- | `vyra tasks new/list/show/run/watch/cancel/pause/resume` | tarefas dos agentes (id aceita prefixo) |
45
- | `vyra notify` | avisa pelo Termux:API quando uma tarefa termina |
46
- | `vyra memory list/add/search/rm` | memória persistente |
47
- | `vyra projects list/add/rm` | projetos |
48
- | `vyra term` | terminal remoto (sair: Ctrl+]) |
49
- | `vyra update [--check]` | atualiza ou só confere a versão |
50
- | `vyra status`, `models`, `history`, `whoami`, `logout` | utilitários |
51
-
52
- Dentro do `vyra`: `/avatar think` e `/avatar run` mostram a animação do avatar (anel prateado ao responder, arco-íris ao executar comandos).
53
-
54
- ## Segurança
55
-
56
- - Só fala com o servidor do Vyra, por HTTPS; qualquer outro endereço é recusado.
57
- - Sessão em `~/.config/vyra-code/session.json` (modo 0600, pasta 0700).
58
- - Só modelos gratuitos aprovados no servidor; o cliente não escolhe provedores pagos.
59
- - Login com PKCE (link e Google): o código recebido só vale com um segredo que nunca sai do aparelho.
60
-
61
- Licença: proprietária. Suporte: fale com o responsável pelo seu servidor Vyra.
@@ -1,82 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: vyra-code
3
- Version: 0.2.43
4
- Summary: Vyra Code: assistente de IA no terminal (Termux, Linux, macOS e Windows) (chat em streaming, tarefas, memória, projetos e terminal remoto)
5
- License: Proprietary
6
- Keywords: termux,ai,assistant,cli,android,llm
7
- Classifier: Environment :: Console
8
- Classifier: Intended Audience :: Developers
9
- Classifier: License :: Other/Proprietary License
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Operating System :: Microsoft :: Windows
12
- Classifier: Operating System :: MacOS
13
- Classifier: Operating System :: POSIX :: Linux
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Topic :: Software Development
16
- Classifier: Topic :: Terminals
17
- Requires-Python: >=3.9
18
- Description-Content-Type: text/markdown
19
- Requires-Dist: websocket-client>=1.6
20
- Provides-Extra: term
21
-
22
- # Vyra Code
23
-
24
- Assistente de IA no terminal do **Termux** (Android): converse com modelos gratuitos, rode tarefas de agentes, guarde memória e projetos, e abra um terminal remoto — tudo pelo seu servidor Vyra, sem chave de API no celular.
25
-
26
- ```text
27
- ✻ Vyra Code · streaming · avatar animado · /comandos
28
- ```
29
-
30
- ## Instalação
31
-
32
- Na primeira execução (`vyra` ou `vyra setup`) aparece a logo animada, a escolha de idioma, as etapas de instalação/configuração e a pergunta **"Você confia nesta pasta?"** (1 confiar e lembrar, 2 só desta vez, 3 sair). Idiomas: pt, en, es, fr, de, it, ru, zh, ja, ko, hi, tr (`vyra lang`, `/lang`); outros idiomas: crie `~/.config/vyra-code/lang/<código>.json` com as chaves traduzidas (o que faltar cai para inglês). `/model` lista todos os modelos; escolha por número, nome ou `auto`.
33
-
34
-
35
- ```sh
36
- pkg install -y python
37
- pip install -q vyra-code
38
- vyra setup && vyra login
39
- ```
40
-
41
- Para atualizar: `vyra update` (confere a versão, instala em silêncio e mostra só as novidades).
42
- Da 0.2.2 ou anterior, rode uma vez `pip install -q -U vyra-code`.
43
-
44
- Requisitos: Python 3.9+. Única dependência: `websocket-client` (terminal remoto).
45
-
46
- ## Entrar
47
-
48
- | Como | Comando |
49
- |---|---|
50
- | E-mail e senha | `vyra login` |
51
- | Link no e-mail (sem senha) | `vyra login --link` (ou senha em branco) |
52
- | Conta Google | `vyra login --google` |
53
-
54
- A senha nunca é gravada. O cliente conversa **apenas com o servidor do Vyra**: ele não guarda chaves de API nem endereços de provedores.
55
-
56
- ## Uso
57
-
58
- Digite `vyra` para abrir a interface interativa (resposta em streaming, `/help` lista os comandos).
59
-
60
- | Comando | O que faz |
61
- |---|---|
62
- | `vyra` | interface interativa com avatar animado |
63
- | `vyra chat [texto]` | conversa (`--model`, `--project`, `--no-save`) |
64
- | busca na web / navegador | sempre ligados para a IA (sem `/web`); as fontes aparecem na resposta. `vyra chat --web` força a busca no modo não interativo |
65
- | `vyra tasks new/list/show/run/watch/cancel/pause/resume` | tarefas dos agentes (id aceita prefixo) |
66
- | `vyra notify` | avisa pelo Termux:API quando uma tarefa termina |
67
- | `vyra memory list/add/search/rm` | memória persistente |
68
- | `vyra projects list/add/rm` | projetos |
69
- | `vyra term` | terminal remoto (sair: Ctrl+]) |
70
- | `vyra update [--check]` | atualiza ou só confere a versão |
71
- | `vyra status`, `models`, `history`, `whoami`, `logout` | utilitários |
72
-
73
- Dentro do `vyra`: `/avatar think` e `/avatar run` mostram a animação do avatar (anel prateado ao responder, arco-íris ao executar comandos).
74
-
75
- ## Segurança
76
-
77
- - Só fala com o servidor do Vyra, por HTTPS; qualquer outro endereço é recusado.
78
- - Sessão em `~/.config/vyra-code/session.json` (modo 0600, pasta 0700).
79
- - Só modelos gratuitos aprovados no servidor; o cliente não escolhe provedores pagos.
80
- - Login com PKCE (link e Google): o código recebido só vale com um segredo que nunca sai do aparelho.
81
-
82
- Licença: proprietária. Suporte: fale com o responsável pelo seu servidor Vyra.
File without changes
File without changes