byteask 0.1.1__py3-none-any.whl

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.
byteask/__init__.py ADDED
@@ -0,0 +1,72 @@
1
+ """ByteAsk pip launcher (thin bootstrapper).
2
+
3
+ On first run it installs the native ByteAsk engine + wrapper into a shared runtime
4
+ dir (``~/.byteask/runtime``) via the same installer the ``curl | sh`` path uses, then
5
+ execs the wrapper. All the real logic (login, onboarding, update check, the
6
+ ``/login`` | ``/logout`` loop) lives in that native wrapper — this module only
7
+ bootstraps. The runtime dir is shared with the npm package, so the engine is fetched
8
+ once no matter how you installed.
9
+ """
10
+ from __future__ import annotations
11
+
12
+ import os
13
+ import platform
14
+ import shlex
15
+ import subprocess
16
+ import sys
17
+ from pathlib import Path
18
+
19
+ __version__ = "0.1.1"
20
+
21
+
22
+ def _ps_quote(s: str) -> str:
23
+ # PowerShell single-quote literal: double any embedded single quotes.
24
+ return "'" + s.replace("'", "''") + "'"
25
+
26
+
27
+ def _run(cmd: list[str]) -> int:
28
+ return subprocess.call(cmd)
29
+
30
+
31
+ def main() -> None:
32
+ bundle = os.environ.get("BYTEASK_BUNDLE_URL", "https://code.byteask.ai").rstrip("/")
33
+ home = os.environ.get("BYTEASK_HOME") or str(Path.home() / ".byteask")
34
+ vendor = Path(home) / "runtime"
35
+ is_win = os.name == "nt" or platform.system() == "Windows"
36
+ wrapper = vendor / ("byteask.ps1" if is_win else "byteask")
37
+ engine = vendor / ("byteask-engine.exe" if is_win else "byteask-engine")
38
+
39
+ if not (engine.exists() and wrapper.exists()):
40
+ vendor.mkdir(parents=True, exist_ok=True)
41
+ sys.stderr.write("[byteask] first run: fetching the ByteAsk engine (one time)...\n")
42
+ if is_win:
43
+ ps = (
44
+ "$ErrorActionPreference='Stop'; $env:PREFIX="
45
+ + _ps_quote(str(vendor))
46
+ + "; iex (irm "
47
+ + _ps_quote(bundle + "/install.ps1")
48
+ + ")"
49
+ )
50
+ rc = _run(["powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", ps])
51
+ else:
52
+ sh = (
53
+ "curl -fsSL "
54
+ + shlex.quote(bundle + "/install.sh")
55
+ + " | PREFIX="
56
+ + shlex.quote(str(vendor))
57
+ + " sh"
58
+ )
59
+ rc = _run(["sh", "-c", sh])
60
+ if rc != 0 or not engine.exists():
61
+ sys.stderr.write(
62
+ "[byteask] install failed. Try the direct installer: "
63
+ "curl -fsSL " + bundle + "/install.sh | sh\n"
64
+ )
65
+ sys.exit(1)
66
+
67
+ args = sys.argv[1:]
68
+ if is_win:
69
+ cmd = ["powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", str(wrapper), *args]
70
+ else:
71
+ cmd = ["sh", str(wrapper), *args]
72
+ sys.exit(_run(cmd))
byteask/__main__.py ADDED
@@ -0,0 +1,3 @@
1
+ from byteask import main
2
+
3
+ main()
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.4
2
+ Name: byteask
3
+ Version: 0.1.1
4
+ Summary: ByteAsk - AI coding agent for your terminal (interactive TUI + C/C++ tooling).
5
+ Author: ByteAsk
6
+ Project-URL: Homepage, https://code.byteask.ai
7
+ Project-URL: Download, https://code.byteask.ai/install.sh
8
+ Keywords: byteask,ai,coding-agent,cli,tui,llm,agent
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: Other/Proprietary License
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Software Development
18
+ Classifier: Topic :: Software Development :: Code Generators
19
+ Classifier: Topic :: Utilities
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+
23
+ # ByteAsk
24
+
25
+ **An AI coding agent for your terminal.** Like Claude Code or Codex, `byteask` drops
26
+ a capable agent into your shell — an interactive TUI, real tool use, and first-class
27
+ C/C++ tooling — talking to the self-hosted ByteAsk gateway.
28
+
29
+ [![PyPI](https://img.shields.io/pypi/v/byteask.svg)](https://pypi.org/project/byteask/)
30
+ [![npm](https://img.shields.io/npm/v/@byteask/cli.svg)](https://www.npmjs.com/package/@byteask/cli)
31
+ [![Python](https://img.shields.io/pypi/pyversions/byteask.svg)](https://pypi.org/project/byteask/)
32
+
33
+ ```console
34
+ $ byteask
35
+ ```
36
+
37
+ That's it — one command drops you into an interactive session, the same way `claude`
38
+ or `codex` do. First run signs you in; after that, just type.
39
+
40
+ ---
41
+
42
+ ## Install
43
+
44
+ Pick whichever fits your setup — they all install the same native engine and share one
45
+ runtime, so switching between them is free.
46
+
47
+ **pip**
48
+ ```bash
49
+ pip install byteask
50
+ ```
51
+
52
+ **npm**
53
+ ```bash
54
+ npm install -g @byteask/cli
55
+ # or, no install:
56
+ npx @byteask/cli
57
+ ```
58
+
59
+ **Shell (Linux / macOS)**
60
+ ```bash
61
+ curl -fsSL https://code.byteask.ai/install.sh | sh
62
+ ```
63
+
64
+ **PowerShell (Windows)**
65
+ ```powershell
66
+ irm https://code.byteask.ai/install.ps1 | iex
67
+ ```
68
+
69
+ The `pip` and `npm` packages are thin launchers: on first run they fetch the native
70
+ engine into `~/.byteask/runtime` and hand off to it. Nothing else on your machine
71
+ changes.
72
+
73
+ ---
74
+
75
+ ## Quickstart
76
+
77
+ ```bash
78
+ # 1. Sign in (magic link to your email) — or just run `byteask`, it onboards you.
79
+ byteask login --email you@company.com
80
+
81
+ # 2. Start coding, interactively:
82
+ byteask
83
+
84
+ # 3. Or one-shot a question against the current repo:
85
+ byteask "explain what this service does and where the entrypoint is"
86
+ ```
87
+
88
+ Inside the session, type your task in plain English. The agent reads files, runs
89
+ tools, and proposes edits — you stay in control of what it applies.
90
+
91
+ ---
92
+
93
+ ## Commands
94
+
95
+ | Command | What it does |
96
+ | --- | --- |
97
+ | `byteask` | Open the interactive agent (the default) |
98
+ | `byteask "…"` | Run a one-shot prompt against the current directory |
99
+ | `byteask login` | Sign in (magic link → token) |
100
+ | `byteask logout` | Sign out on this machine |
101
+ | `byteask --update` | Update to the latest engine |
102
+ | `byteask --version` | Print the version |
103
+
104
+ Inside the TUI, slash commands include **`/login`**, **`/logout`**, **`/usage`** (your
105
+ quota), **`/upgrade`** (Pro / Max), **`/referral-code`**, and **`/status`**.
106
+
107
+ ---
108
+
109
+ ## What you get
110
+
111
+ - **Interactive TUI** — a real terminal agent, not a chat box: it navigates the repo,
112
+ runs commands, and shows diffs before applying.
113
+ - **First-class C/C++ tooling** — 16 native tools wired in: Compiler Explorer
114
+ (godbolt), `gdb`/`lldb`, ASan/UBSan/valgrind, `clang-tidy`, `clang-format`, `clangd`
115
+ navigation, `perf`/callgrind, quick-bench, cppinsights, objdump/nm/readelf, Intel
116
+ intrinsics lookup, and more. The agent reaches for them on the tasks that need them.
117
+ - **Web search** built in.
118
+ - **Zero data retention** — your prompts and code are not used to train models.
119
+ - **Usage that's visible** — `/usage` shows exactly where you stand; upgrade in-app
120
+ with `/upgrade`.
121
+
122
+ ---
123
+
124
+ ## Platforms
125
+
126
+ | OS | Architecture | libc |
127
+ | --- | --- | --- |
128
+ | Linux | x86_64, arm64 | glibc |
129
+ | macOS | Apple Silicon (arm64) | — |
130
+ | Windows | x86_64 | — |
131
+
132
+ > Alpine / musl isn't supported (a core dependency ships no musl build). On Alpine,
133
+ > use WSL or a glibc base image.
134
+
135
+ ---
136
+
137
+ ## How it works
138
+
139
+ `byteask` is a thin client. The intelligence and your account live behind the ByteAsk
140
+ gateway; the local binary is the agent runtime plus a small launcher that handles
141
+ sign-in, updates, and your config in `~/.byteask`. Your model key never touches your
142
+ machine.
143
+
144
+ ---
145
+
146
+ ## Links
147
+
148
+ - Home: <https://code.byteask.ai>
149
+ - Install script: <https://code.byteask.ai/install.sh>
150
+
151
+ © ByteAsk. All rights reserved.
@@ -0,0 +1,7 @@
1
+ byteask/__init__.py,sha256=k8fytJKcV-P-kMWKXH4wmwAfVxreEAa9sP_Q_MTVzEs,2578
2
+ byteask/__main__.py,sha256=CF3Kgr_NFPal3Li13p2WlybgkKXSWCvH99sH4svTFKA,33
3
+ byteask-0.1.1.dist-info/METADATA,sha256=h48dbjfyDHjcYvkW6Z4FY4xq4T8IfcbmxjI6pFH9f1s,4661
4
+ byteask-0.1.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
5
+ byteask-0.1.1.dist-info/entry_points.txt,sha256=IS9OvQ5Zgl8GwmFpuAJ3zsiyXChk3TOav7rakRszPaQ,41
6
+ byteask-0.1.1.dist-info/top_level.txt,sha256=RIzOmgfNxmFy_MFIJ7Fhl_K5BvsXu-oo-cDZX6IQ_rU,8
7
+ byteask-0.1.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ byteask = byteask:main
@@ -0,0 +1 @@
1
+ byteask