packet-ask
A local CLI that sends only a scrubbed packet to a SUB agent. The MAIN agent is whichever session you are in now.
It copies the files or diff you choose, scrubs them, then either runs an official CLI against that packet or prints packet.md to paste elsewhere.
This tool shrinks what you send on purpose. It does not guarantee no leakage and does not stop vendor training. Vendor terms still apply. See SECURITY.md (Korean).
MIT licensed. See LICENSE.
- PyPI: pypi.org/project/packet-ask
- Repository: github.com/ictechgy/packet-ask
Requirements
- Python 3.11+
- uv 0.10.9+ (same lower bound as
uv_buildinpyproject.toml) - GLM / Claude SUB runs: a
claudeCLI on the allowlist path (origin signatures are not verified) - Kimi runs: a
kimiCLI on the allowlist path paste/grok/agyprint a packet and do not launch a vendor
Credentials come from a dedicated environment variable, a packet-ask-owned macOS Keychain item, or an explicitly requested one-run prompt. This tool does not read .env, ZCode, Claude Code, arbitrary key files, or key commands. Never put key values on the command line; they land in shell history. Variable names are in .env.example, and the complete source contract is in docs/key-sources.md. The executable allowlist is in SECURITY.md. doctor only checks that help text mentions required flags. It does not prove a no-tools sandbox.
Install
uv tool install packet-ask
packet-ask install-skills
packet-ask doctor
If it is already installed, run uv tool upgrade packet-ask. pipx install packet-ask and pip install packet-ask in a venv also work.
From the GitHub default branch:
uv tool install git+https://github.com/ictechgy/packet-ask
Local checkout:
uv sync
uv run packet-ask doctor
install-skills writes SKILL.md to ~/.claude/skills/packet-ask, ~/.grok/skills/packet-ask, ~/.codex/skills/packet-ask, and ~/.agents/skills/packet-ask. After that, /packet-ask or a phrase like "review with kimi" should make MAIN call this CLI.
Scope
review requires one of the flags below. It does not send the whole working tree by default.
| Flag | What is sent |
|---|---|
--files |
the listed files |
--diff |
the given git range |
--staged |
staged diff |
--unstaged |
uncommitted working-tree diff |
research does not attach local files or diffs by default. The only exception is --include-files. --diff and --staged are rejected.
--max-files applies to explicit files and diff paths. --max-bytes applies to
the final UTF-8 packet.md, including framing and path labels. Reads stop at
the configured bound, and explicit binary or non-UTF-8 files are rejected.
Usage
packet-ask providers
packet-ask credentials status
# Store through the interactive macOS Keychain prompt; no key in argv/history
packet-ask credentials set glm --store macos-keychain --access command
# Packet only; do not launch a vendor
packet-ask review --provider paste --files src/app.py --question "Find race conditions in this code"
packet-ask review --provider paste --files src/app.py --json --question "Find race conditions in this code"
# GLM. auto = dedicated env first, then packet-ask-glm in macOS Keychain
packet-ask review --provider glm --credential-source auto --diff HEAD --question "Review this change"
# Uncommitted working-tree diff. review without a scope flag is rejected
packet-ask review --provider paste --unstaged --question "Review this change"
# Anthropic Claude SUB. Key: PACKET_ASK_CLAUDE_KEY. Parent BASE_URL is unchanged
packet-ask review --provider claude --files src/app.py --question "Review this code"
# Kimi. Key: PACKET_ASK_KIMI_KEY
packet-ask review --provider kimi --files src/app.py --question "Review this code"
# grok/agy still paste; they do not run a no-tools one-shot yet
packet-ask review --provider grok --files src/app.py --question "Review this code"
# Research. Local files are off by default
packet-ask research --provider paste --question "What usually breaks in a Tailwind v4 migration?"
packet-ask doctor
Kimi is official kimi --quiet one-shot. It does not open an interactive session. It refuses to run without a resolved dedicated Kimi credential. Tools are disabled with a tools: [] agent file and a non-matching [tools] enabled list. KIMI_CODE_HOME is only the isolated profile ~/.config/packet-ask/providers/kimi/kimi-code. Do not run kimi in the real repo.
GLM uses the official claude binary. It does not change the parent shell ANTHROPIC_BASE_URL. Only the child environment gets the Z.ai Claude Code endpoint and the resolved dedicated GLM credential. GLM and Claude child environments also set CLAUDE_CODE_DISABLE_AUTO_MEMORY, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC, and DISABLE_ERROR_REPORTING. That reduces local session residue. It does not prove the vendor stores nothing.
Task commands default to --credential-source auto: the dedicated environment
variable wins, then the canonical macOS Keychain item is tried. env,
keychain, and prompt select exactly one source and never silently fall back.
prompt requires an interactive terminal and never persists the value. Status
checks Keychain item existence without retrieving its password. Resolved keys
from every source are included in raw and terminal-normalized output guards.
On success, stderr prints a receipt before launch (packet-ask receipt …) and millisecond phase times after (packet-ask timing …). --json adds a timing object. Neither line contains keys. Receipt paths are JSON escaped, and terminal control sequences are removed from untrusted provider output before it is printed.
Packet temp dirs live in the OS cache, not the git worktree. cwd is not a sandbox. A PACKET_ASK_CACHE_DIR inside the worktree is rejected. .gitignore entries for .packet-ask-tmp/ and packet.md only stop leftover files from being committed.
Every Git subprocess uses the same bounded process-group runner. Worktree
discovery, diff collection, and packet-local git init share a deadline and
byte limits, and Ctrl+C terminates spawned Git/provider groups. Successful
stdout is emitted only after packet cleanup succeeds. Packet payload bytes and
digest, plus unchanged user provider overlays, are reused in-process to avoid
repeated reads, hashes, and TOML parses.
User config ~/.config/packet-ask/providers.toml adds paste aliases only. It does not accept executables, argv, or env.
The implementation/incident question gate is a conservative lexical check, not a proof of intent. Launch adapters still disable tools and confine the child to the packet even if wording is novel.
version = 1
[providers.gemini]
label = "Gemini CLI"
Skills
packet-ask install-skills installs into harness homes. The skill only tells MAIN to call packet-ask. Isolation is enforced by the CLI.
Exit codes
10–14 mean the vendor process was never started.
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | internal error |
| 2 | usage error |
| 10 | policy reject (implementation, incidents, ...) |
| 11 | scope reject |
| 12 | redaction / re-check failed |
| 13 | could not confirm launch conditions |
| 14 | over budget |
| 20 | provider or key missing |
| 21 | provider failed |
| 22 | output guard failed (dedicated key leak or oversized output) |
Development
uv sync --group dev
uv run pytest
The current confinement hardening rationale is in docs/hardening.md. Runtime/process and hot-path decisions are in docs/runtime-hardening.md.
See CONTRIBUTING.md.
License
MIT Copyright (c) 2026 Coden
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file packet_ask-0.1.8.tar.gz.
File metadata
- Download URL: packet_ask-0.1.8.tar.gz
- Upload date:
- Size: 38.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44eed6e34efb47666ff9a82dcfc3cdb664f1492b98eeb4c39bc5a4f4fad9b717
|
|
| MD5 |
652553c4c1b16a0bcf91d8fe210c7859
|
|
| BLAKE2b-256 |
283d2ea9d56f08116b094ee768d9f18031babd63b12f09ba47ea693b70955c1b
|
Provenance
The following attestation bundles were made for packet_ask-0.1.8.tar.gz:
Publisher:
release.yml on ictechgy/packet-ask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
packet_ask-0.1.8.tar.gz -
Subject digest:
44eed6e34efb47666ff9a82dcfc3cdb664f1492b98eeb4c39bc5a4f4fad9b717 - Sigstore transparency entry: 2655109432
- Sigstore integration time:
-
Permalink:
ictechgy/packet-ask@f7ad2c448d140464cc3943b072418b7009dffba0 -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/ictechgy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f7ad2c448d140464cc3943b072418b7009dffba0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file packet_ask-0.1.8-py3-none-any.whl.
File metadata
- Download URL: packet_ask-0.1.8-py3-none-any.whl
- Upload date:
- Size: 49.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4219a26c0f4fcbf571ed0d59c07c8cc3390de78312f94ff88be6a6e1ada1f2e7
|
|
| MD5 |
b30e67dff78a752d370419fd8fd3a823
|
|
| BLAKE2b-256 |
c7f26ae42d4941a10c64de07bd1a117f7f31cb647f219709710b1b86df051fb3
|
Provenance
The following attestation bundles were made for packet_ask-0.1.8-py3-none-any.whl:
Publisher:
release.yml on ictechgy/packet-ask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
packet_ask-0.1.8-py3-none-any.whl -
Subject digest:
4219a26c0f4fcbf571ed0d59c07c8cc3390de78312f94ff88be6a6e1ada1f2e7 - Sigstore transparency entry: 2655109459
- Sigstore integration time:
-
Permalink:
ictechgy/packet-ask@f7ad2c448d140464cc3943b072418b7009dffba0 -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/ictechgy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f7ad2c448d140464cc3943b072418b7009dffba0 -
Trigger Event:
push
-
Statement type: