{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "kunchenguid-compact-adviser--get-compact-hints-in-pi",
 "repo": "kunchenguid/compact-adviser",
 "repo_url": "https://github.com/kunchenguid/compact-adviser",
 "repo_slug": "kunchenguid-compact-adviser",
 "title": "Get safe /compact hints or automatic compaction in Pi",
 "page_title": "How to get safe /compact hints or automatic compaction in Pi with Compact Adviser",
 "summary": "Install Compact Adviser in Pi so it suggests or runs /compact at good stopping points.",
 "who": "A developer working in a long Pi coding session whose context keeps growing and who wants to know when compacting is safe.",
 "problem": "Long sessions carry more context every turn, and compacting at the wrong moment can lose useful working state.",
 "outcome": "Pi shows a hint to run /compact when a turn looks finished and the context is large enough, or compacts on its own in auto mode after first-use confirmation.",
 "steps": [
  "Confirm Node 22 or newer is installed and that Pi is version 0.82.0 or newer.",
  "Run `pi install npm:compact-adviser`.",
  "Provide your TypeSafe key with TYPESAFE_API_KEY in the launch environment, or save it through the /compact-adviser settings.",
  "Restart Pi or run `/reload`, then run `/compact-adviser status` and confirm it shows `Key: env`, `Key: saved`, or `Key: .env`.",
  "Run `/compact-adviser hint` for suggestions only, or `/compact-adviser auto` to allow automatic compaction after the first-use confirmation. (inferred, check the README)"
 ],
 "agent_prompt": "Install the compact-adviser package in Pi on <target machine>: run `pi install npm:compact-adviser`, set TYPESAFE_API_KEY, then run `/compact-adviser status`. Expected output: a status line reporting a key source of env, saved, or .env. Verify that the key source is not missing before reporting success.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "Pi is only one of four hosts, and the README says the install counts as consent to send eligible checkpoint context to TypeSafe.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Node 22 or newer (22.18 or newer for Codex and Grok)",
  "One supported host: Pi 0.82.0 or newer, Claude Code 2.1.274 or newer, Codex CLI 0.153.0 or newer, or Grok Build 1.0.34 or newer",
  "A TypeSafe API key, supplied as TYPESAFE_API_KEY in the launch environment, a cwd .env file, or saved through the host settings where supported"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The TypeSafe API key is kept in the launch environment, saved settings, or a .env file, and eligible checkpoint context is sent to TypeSafe once a key is available."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/kunchenguid-compact-adviser/get-compact-hints-in-pi/",
 "md": "https://dedupedai.com/use-cases/kunchenguid-compact-adviser/get-compact-hints-in-pi/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/kunchenguid-compact-adviser--get-compact-hints-in-pi.json",
 "api_version": "v1"
}
