{"_id":"@arcasilesgroup/copilotline","_rev":"4-391573f1daaa51681bec641fe1f06f2f","name":"@arcasilesgroup/copilotline","dist-tags":{"latest":"0.3.1"},"versions":{"0.2.0":{"name":"@arcasilesgroup/copilotline","version":"0.2.0","keywords":["copilot","copilot-cli","statusline","cli","terminal","developer-tools","arcasiles"],"author":{"name":"Arcasiles Group"},"license":"MIT","_id":"@arcasilesgroup/copilotline@0.2.0","maintainers":[{"name":"arcasiles","email":"info@arcasiles.com"}],"homepage":"https://github.com/arcasilesgroup/copilotline#readme","bugs":{"url":"https://github.com/arcasilesgroup/copilotline/issues"},"bin":{"copilotline":"dist/cli.js"},"dist":{"shasum":"f6128addc72d6b4a887765047b19d49bcebf7587","tarball":"https://registry.npmjs.org/@arcasilesgroup/copilotline/-/copilotline-0.2.0.tgz","fileCount":6,"integrity":"sha512-MIkRNdALIrmQoLiTGZagKesVX/poEwvlTU3eE/5ZwfyfLCBbPhwKOH93YX7Wm2xS9gVa3HTFOfZ1zb+nvwtg4g==","signatures":[{"sig":"MEUCIAa9zoeLizKw3OPZjPl1R8QzhLSSdRWOvNMfkLbXxOU/AiEAp8dAN/3Saw5pSYNPu+9b1kVweKsUE3M4+WKCGTMXg7M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78798},"type":"module","engines":{"node":">=18"},"gitHead":"0a7a9a144a08469d02447f57b70d186fcb8baf4e","scripts":{"lint":"tsc --noEmit","test":"bun test","audit":"bun audit","build":"bun build src/cli.ts --target=node --outfile=dist/cli.js --minify --banner='#!/usr/bin/env node'","render":"bun src/cli.ts render","typecheck":"tsc --noEmit","build:binary":"bun build src/cli.ts --compile --outfile=dist/copilotline","install:local":"bun src/cli.ts install","prepublishOnly":"bun test && bun run lint && bun run build"},"_npmUser":{"name":"arcasiles","email":"info@arcasiles.com"},"repository":{"url":"git+https://github.com/arcasilesgroup/copilotline.git","type":"git"},"_npmVersion":"11.12.1","description":"Cross-platform statusline companion for GitHub Copilot CLI","directories":{},"_nodeVersion":"26.0.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.13","typescript":"^6.0.3","@types/node":"^25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/copilotline_0.2.0_1780359182963_0.4063585070354656","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@arcasilesgroup/copilotline","version":"0.2.1","keywords":["copilot","copilot-cli","statusline","cli","terminal","developer-tools","arcasiles"],"author":{"name":"Arcasiles Group"},"license":"MIT","_id":"@arcasilesgroup/copilotline@0.2.1","maintainers":[{"name":"arcasiles","email":"info@arcasiles.com"}],"homepage":"https://github.com/arcasilesgroup/copilotline#readme","bugs":{"url":"https://github.com/arcasilesgroup/copilotline/issues"},"bin":{"copilotline":"dist/cli.js"},"dist":{"shasum":"fa3640a3b83f23b4a2f576d4bfe3e6919c6ad53d","tarball":"https://registry.npmjs.org/@arcasilesgroup/copilotline/-/copilotline-0.2.1.tgz","fileCount":6,"integrity":"sha512-BgVviM96Odg0ocxukgCY2m9advkrR/tdLa6tqtJHYUAeD5R2XR6YhD7l69CAJ3BdcrEpyqzKCjbOuZwSujmMhw==","signatures":[{"sig":"MEUCIQCOTMDFpFivNfMbXrxeGpLuPz23M/V1bKRTilON4zregQIgF3m9q3cyMtO5lD4ofmnWQjk2KtBbJ+YRfd9PwrTGd8E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arcasilesgroup%2fcopilotline@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":79044},"type":"module","_from":"file:artifact/dist-pack/arcasilesgroup-copilotline-0.2.1.tgz","engines":{"node":">=18"},"scripts":{"lint":"tsc --noEmit","test":"bun test","audit":"bun audit","build":"bun build src/cli.ts --target=node --outfile=dist/cli.js --minify --banner='#!/usr/bin/env node'","render":"bun src/cli.ts render","typecheck":"tsc --noEmit","build:binary":"bun build src/cli.ts --compile --outfile=dist/copilotline","install:local":"bun src/cli.ts install","prepublishOnly":"bun test && bun run lint && bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0b1c0051-ff57-46b4-abb6-e91546390ddc"}},"_resolved":"/home/runner/work/copilotline/copilotline/artifact/dist-pack/arcasilesgroup-copilotline-0.2.1.tgz","_integrity":"sha512-BgVviM96Odg0ocxukgCY2m9advkrR/tdLa6tqtJHYUAeD5R2XR6YhD7l69CAJ3BdcrEpyqzKCjbOuZwSujmMhw==","repository":{"url":"git+https://github.com/arcasilesgroup/copilotline.git","type":"git"},"_npmVersion":"11.16.0","description":"Cross-platform statusline companion for GitHub Copilot CLI","directories":{},"_nodeVersion":"22.22.3","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.13","typescript":"^6.0.3","@types/node":"^25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/copilotline_0.2.1_1780361004259_0.7748789100613549","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@arcasilesgroup/copilotline","version":"0.3.0","keywords":["copilot","copilot-cli","statusline","cli","terminal","developer-tools","arcasiles"],"author":{"name":"Arcasiles Group"},"license":"MIT","_id":"@arcasilesgroup/copilotline@0.3.0","maintainers":[{"name":"arcasiles","email":"info@arcasiles.com"}],"homepage":"https://github.com/arcasilesgroup/copilotline#readme","bugs":{"url":"https://github.com/arcasilesgroup/copilotline/issues"},"bin":{"copilotline":"dist/cli.js"},"dist":{"shasum":"c7cac55aedbd6301cec2da3b9ee8d03da21319cc","tarball":"https://registry.npmjs.org/@arcasilesgroup/copilotline/-/copilotline-0.3.0.tgz","fileCount":6,"integrity":"sha512-Iw2OvNNpY5ETrBhu2P/har8JYi8N4DLEkcgK8citfOqQLlWycpSGS3c2oLaXi4DTtjZRS7vEICvD1hFke2CgtA==","signatures":[{"sig":"MEUCIDDWEyoP/hO5kQ+NyqqUkJdbP2R30AYET/ZeG5ruxDwOAiEAjgQygVXCwJOhH+K8V69LrRSS+AMLMQuJtvsLBnR+oio=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arcasilesgroup%2fcopilotline@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":89518},"type":"module","_from":"file:artifact/dist-pack/arcasilesgroup-copilotline-0.3.0.tgz","engines":{"node":">=18"},"scripts":{"lint":"tsc --noEmit","test":"bun test","audit":"bun audit","build":"bun build src/cli.ts --target=node --outfile=dist/cli.js --minify --banner='#!/usr/bin/env node'","render":"bun src/cli.ts render","typecheck":"tsc --noEmit","build:binary":"bun build src/cli.ts --compile --outfile=dist/copilotline","install:local":"bun src/cli.ts install","prepublishOnly":"bun test && bun run lint && bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0b1c0051-ff57-46b4-abb6-e91546390ddc"}},"_resolved":"/home/runner/work/copilotline/copilotline/artifact/dist-pack/arcasilesgroup-copilotline-0.3.0.tgz","_integrity":"sha512-Iw2OvNNpY5ETrBhu2P/har8JYi8N4DLEkcgK8citfOqQLlWycpSGS3c2oLaXi4DTtjZRS7vEICvD1hFke2CgtA==","repository":{"url":"git+https://github.com/arcasilesgroup/copilotline.git","type":"git"},"_npmVersion":"11.16.0","description":"Cross-platform statusline companion for GitHub Copilot CLI","directories":{},"_nodeVersion":"22.22.3","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.13","typescript":"^6.0.3","@types/node":"^25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/copilotline_0.3.0_1780421031301_0.1566136486295584","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@arcasilesgroup/copilotline","version":"0.3.1","description":"Cross-platform statusline companion for GitHub Copilot CLI","license":"MIT","author":{"name":"Arcasiles Group"},"type":"module","bin":{"copilotline":"dist/cli.js"},"engines":{"node":">=18"},"scripts":{"build":"bun build src/cli.ts --target=node --outfile=dist/cli.js --minify --banner='#!/usr/bin/env node'","build:binary":"bun build src/cli.ts --compile --outfile=dist/copilotline","test":"bun test","typecheck":"tsc --noEmit","lint":"tsc --noEmit","audit":"bun audit","render":"bun src/cli.ts render","install:local":"bun src/cli.ts install","prepublishOnly":"bun test && bun run lint && bun run build"},"keywords":["copilot","copilot-cli","statusline","cli","terminal","developer-tools","arcasiles"],"homepage":"https://github.com/arcasilesgroup/copilotline#readme","repository":{"type":"git","url":"git+https://github.com/arcasilesgroup/copilotline.git"},"bugs":{"url":"https://github.com/arcasilesgroup/copilotline/issues"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"devDependencies":{"@types/bun":"^1.3.13","@types/node":"^25.6.0","typescript":"^6.0.3"},"_id":"@arcasilesgroup/copilotline@0.3.1","_integrity":"sha512-jpT00DsWXw4qHqv/D9Tht3mbWBjMwQoqFsPXdSShXXO97U38M5lPRj4WLFE9QIsLf9OgiFawPSZfHkEng0y6TA==","_resolved":"/home/runner/work/copilotline/copilotline/artifact/dist-pack/arcasilesgroup-copilotline-0.3.1.tgz","_from":"file:artifact/dist-pack/arcasilesgroup-copilotline-0.3.1.tgz","_nodeVersion":"22.22.3","_npmVersion":"11.16.0","dist":{"integrity":"sha512-jpT00DsWXw4qHqv/D9Tht3mbWBjMwQoqFsPXdSShXXO97U38M5lPRj4WLFE9QIsLf9OgiFawPSZfHkEng0y6TA==","shasum":"4c65e957bcba60053439a26746b2a74cba6988bb","tarball":"https://registry.npmjs.org/@arcasilesgroup/copilotline/-/copilotline-0.3.1.tgz","fileCount":6,"unpackedSize":90692,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arcasilesgroup%2fcopilotline@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAJfJY38nzr80qYcRrG5WW/y/KoW8j+B5khJvuahlpbnAiBkTBGwgcOuCUNt1rHgDXUyxfiPTgj6rqUNXbtn7TO/7w=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0b1c0051-ff57-46b4-abb6-e91546390ddc"}},"directories":{},"maintainers":[{"name":"arcasiles","email":"info@arcasiles.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/copilotline_0.3.1_1780425145653_0.2950007436252484"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-02T00:13:02.822Z","modified":"2026-06-02T18:32:26.138Z","0.2.0":"2026-06-02T00:13:03.110Z","0.2.1":"2026-06-02T00:43:24.418Z","0.3.0":"2026-06-02T17:23:51.438Z","0.3.1":"2026-06-02T18:32:25.802Z"},"bugs":{"url":"https://github.com/arcasilesgroup/copilotline/issues"},"author":{"name":"Arcasiles Group"},"license":"MIT","homepage":"https://github.com/arcasilesgroup/copilotline#readme","keywords":["copilot","copilot-cli","statusline","cli","terminal","developer-tools","arcasiles"],"repository":{"type":"git","url":"git+https://github.com/arcasilesgroup/copilotline.git"},"description":"Cross-platform statusline companion for GitHub Copilot CLI","maintainers":[{"name":"arcasiles","email":"info@arcasiles.com"}],"readme":"# copilotline\n\n[![npm version](https://img.shields.io/npm/v/@arcasilesgroup/copilotline.svg)](https://www.npmjs.com/package/@arcasilesgroup/copilotline)\n[![CI](https://github.com/arcasilesgroup/copilotline/actions/workflows/ci.yml/badge.svg)](https://github.com/arcasilesgroup/copilotline/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/arcasilesgroup/copilotline/actions/workflows/codeql.yml/badge.svg)](https://github.com/arcasilesgroup/copilotline/actions/workflows/codeql.yml)\n[![Security](https://github.com/arcasilesgroup/copilotline/actions/workflows/security.yml/badge.svg)](https://github.com/arcasilesgroup/copilotline/actions/workflows/security.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\nA statusline companion for **GitHub Copilot CLI**: it reads the Copilot status\nJSON on stdin and prints a compact, color status line on stdout, so the host\n`copilot` binary shows your model, context usage, Git state, session time, and\nCopilot quota right in its footer.\n\n<div align=\"center\"><img src=\"https://raw.githubusercontent.com/arcasilesgroup/copilotline/main/docs/screenshot.png\" width=\"900\" alt=\"copilotline statusline inside GitHub Copilot CLI: model + reasoning effort, context %, dir + git branch, session timer, and Copilot AI-credit quota\" /></div>\n\nOne line, always in view: which model and reasoning effort you are on, how full\nthe context window is, where you are in Git, how long the session has run, and\nhow much of your Copilot AI-credit quota is left — so you never lose track mid\ntask. It plugs into Copilot CLI's `statusLine.command` hook and renders entirely\nfrom the JSON Copilot already pipes in (the quota segment is the only part that\ncalls out, and only to read your own Copilot usage).\n\n## What it shows\n\nEach segment of the ribbon above, left to right:\n\n- **Model · reasoning effort** — the active model (e.g. `gpt-5.5`) and its\n  reasoning effort (e.g. `xhigh`), straight from the Copilot status payload.\n- **✍️ context-window %** — how much of the context window is used, colored by\n  threshold (green → yellow → red) so you can see when you are close to full.\n- **Working dir + Git branch + dirty marker** — the current directory name, the\n  Git branch in parentheses (e.g. `copilotline (main)`), a dirty marker when the\n  worktree has uncommitted changes, and a linked-worktree marker when relevant.\n- **⏱ session duration** — how long the current Copilot session has been running.\n- **💸 Copilot AI-credit quota** — your Copilot usage for the active account: the\n  metered unit (AI credits, tokens, or legacy premium requests), a progress bar,\n  the percent used, used/allowance counts, and the quota reset date in UTC.\n- **Agent name** — the active agent (e.g. `task`) when the payload reports one.\n\n## Install\n\nTwo steps: install the package, then wire it into GitHub Copilot CLI.\n\n### npm (global)\n\n```bash\nnpm install -g @arcasilesgroup/copilotline\ncopilotline install\n```\n\nThe first `copilotline install` runs an interactive account picker\n(**\"Choose quota account\"**) so you can pick which GitHub Copilot account's\nquota the `💸` segment should follow. Pick one, or accept the default\nauto-follow of the active Copilot account — `copilotline account` changes it\nlater.\n\n### npx (zero install)\n\nCheck your setup without installing globally:\n\n```bash\nnpx @arcasilesgroup/copilotline doctor\n```\n\n### macOS or Linux release binary\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/arcasilesgroup/copilotline/main/scripts/install.sh | bash\n```\n\nThe installer downloads the matching release asset, verifies its `.sha256`\nsidecar, installs it to `~/.local/bin` by default, and runs `copilotline\ninstall`. Make sure `~/.local/bin` is on your `PATH` (add `export\nPATH=\"$HOME/.local/bin:$PATH\"` to your shell profile if it is not).\n\nUseful installer environment variables:\n\n```bash\nCOPILOTLINE_PREFIX=/usr/local/bin bash scripts/install.sh\nCOPILOTLINE_NO_WIRE=1 bash scripts/install.sh\n```\n\n### Windows\n\nUse npm on Windows:\n\n```powershell\nnpm install -g @arcasilesgroup/copilotline\ncopilotline install\n```\n\nRelease builds also publish `copilotline-windows-x64.exe` for manual installs.\n\n## Prerequisites\n\n- **GitHub Copilot CLI** — `copilotline` is a companion for the `copilot`\n  binary's `statusLine.command` hook, so install GitHub Copilot CLI first; it is\n  the host that pipes the status JSON into `copilotline` and shows the ribbon.\n- **Node.js ≥ 18** — required by the npm package and the `npx` path\n  (`engines.node >= 18`).\n- **`gh auth login`** — only needed for the Copilot **quota** segment. Without\n  an authenticated GitHub account the rest of the statusline still renders;\n  only the `💸` usage segment is hidden.\n- **`~/.local/bin` on `PATH`** — only relevant to the curl-pipe installer, which\n  installs there by default.\n\n## Configure GitHub Copilot CLI\n\nRun:\n\n```bash\ncopilotline install\n```\n\nIt writes the absolute executable path to `~/.copilot/settings.json` (or\n`$COPILOT_HOME/settings.json`):\n\n```jsonc\n{\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"/absolute/path/to/copilotline\",\n    \"padding\": 1\n  },\n  \"footer\": {\n    \"showCustom\": true\n  }\n}\n```\n\n`footer.showCustom` is required by current GitHub Copilot CLI versions for the\ncustom statusline to be visible.\n\n`install` and `uninstall` edit `settings.json` **surgically** — they preserve\nJSONC comments and trailing commas. If the file cannot be edited in place,\n`copilotline` writes a `.bak` backup, prints a warning, and then rewrites the\nfile.\n\nTo remove the integration:\n\n```bash\ncopilotline uninstall\n```\n\n## Demo\n\nAll clips are generated from the **real CLI output** (see\n[docs/DEMOS.md](docs/DEMOS.md)), against offline, anonymized fixtures (the\nmascot logins `octocat` / `monalisa` / `hubot`) — no network, no token, no\nreal account.\n\nThe statusline ribbon, rendered from a sample Copilot status payload:\n\n![copilotline statusline render](https://raw.githubusercontent.com/arcasilesgroup/copilotline/main/docs/demo-statusline.gif)\n\n`copilotline doctor`, the read-only diagnostics that confirm Copilot CLI is\nwired up correctly:\n\n![copilotline doctor diagnostics](https://raw.githubusercontent.com/arcasilesgroup/copilotline/main/docs/demo-cli.gif)\n\nThe first-run account picker: `copilotline install` wires the statusline, then\nasks which Copilot account's quota the `💸` segment should follow:\n\n![copilotline install first-run account picker](https://raw.githubusercontent.com/arcasilesgroup/copilotline/main/docs/demo-install.gif)\n\n## Commands\n\n```text\ncopilotline render                 Read Copilot status JSON from stdin and emit a status line\ncopilotline render --json          Emit normalized JSON instead of text\ncopilotline refresh                Fetch and cache Copilot usage from GitHub\ncopilotline refresh --json         Emit cached usage as JSON after refresh\ncopilotline account                Configure the Copilot account interactively\ncopilotline account --json         Emit account detection details as JSON\ncopilotline account --auto         Follow the active Copilot account\ncopilotline account --set <login>  Pin quota lookup to a GitHub login\ncopilotline install                Wire copilotline into ~/.copilot/settings.json\ncopilotline uninstall              Remove statusLine from ~/.copilot/settings.json\ncopilotline doctor                 Run read-only diagnostics\ncopilotline doctor --json          Emit structured diagnostic JSON\ncopilotline --help                 Show help\ncopilotline --version              Show version\n```\n\nWhen stdin is piped from Copilot CLI, bare `copilotline` behaves like\n`copilotline render`. When you run `copilotline` directly in a terminal, it\nshows help.\n\n> `copilotline accounts` and `copilotline use auto|<login>` remain as legacy\n> aliases of `account`; prefer the canonical `account` command above.\n\n## Usage and quota\n\n`copilotline` can show Copilot usage. As of 2026-06-01 GitHub bills Copilot by\n**token-based AI credits** rather than premium requests, so the segment adapts to\nwhatever the account is metered in:\n\n```text\n💸 octocat credits ●○○○○○○○ 13% 195/1.5k ⟳ Jul 1 00:00 UTC\n```\n\nThe displayed unit is derived from the data GitHub returns: `credits` or `tokens`\nfor token-billed accounts, or the legacy `premium` request count for accounts\nstill on the request model. When GitHub reports usage but no allowance, the\nsegment shows a used-only reading (for example `420 used`) rather than inventing a\ndenominator.\n\nUsage is fetched from GitHub's internal Copilot user endpoint:\n`GET https://api.github.com/copilot_internal/user`.\n\nThe renderer keys on the response *shape*, not on fixed field names: a\ncredit/token snapshot wins over the legacy `quota_snapshots.premium_models` /\n`premium_interactions` request counts, and unknown snapshot keys are still\nparsed. Because this endpoint is internal and GitHub has not documented the\ntoken-era field names, the quota segment is best-effort and degrades to the last\ncached value (then to nothing) rather than showing a wrong number. Run\n`copilotline doctor` to see which billing unit the cached response used.\n\nSet the displayed unit with the `usage.units` config key (`credit` | `token` |\n`usd`, default `credit`) or the `COPILOTLINE_USAGE_UNITS` environment variable;\n`usage.units: usd` shows GitHub-reported cost when available (never an estimate),\nand `usage.showCost: true` appends a secondary `≈ $x.xx` clause.\n\n### Multi-account behavior\n\nOn machines with multiple GitHub accounts, `copilotline` follows the active\nCopilot account instead of blindly using the active `gh` account. It detects the\nselected account from:\n\n1. Copilot status payload account fields, when present\n2. `~/.copilot/config.json`\n3. VS Code global Copilot account metadata\n4. GitHub CLI, only when no Copilot-specific account is detected\n\nQuota is strict per account. If Copilot is using `work-account` but only\n`personal-account` is authenticated in `gh`, `copilotline` hides the quota\nsegment and reports the mismatch in `copilotline doctor` / `copilotline\naccount`. It does not show another account's usage as a fallback.\n\nInspect account detection:\n\n```bash\ncopilotline account\ncopilotline account --json\n```\n\nUse the default system-synced mode:\n\n```bash\ncopilotline account --auto\n```\n\nPin to a specific login only when you intentionally want to override system\ndetection:\n\n```bash\ncopilotline account --set work-account\n```\n\nIf the selected Copilot account is not authenticated in GitHub CLI, add it:\n\n```bash\ngh auth login\n```\n\n`copilotline` uses `gh auth token --user <login>` so it can read a token for the\nselected login without changing your active `gh` account.\n\nTokens are resolved in this order:\n\n1. `COPILOTLINE_GITHUB_TOKEN_<NORMALIZED_LOGIN>`\n2. `COPILOTLINE_GITHUB_TOKEN`, verified to match the selected login\n3. `COPILOT_GITHUB_TOKEN`, verified to match the selected login\n4. `GH_TOKEN` / `GITHUB_TOKEN`, verified to match the selected login\n5. `gh auth token --hostname <host> --user <login>`\n\nThe statusline render path reads the local cache and starts a quiet background\nrefresh when the cache is missing or stale. To populate the cache manually:\n\n```bash\ncopilotline refresh\n```\n\nDisable usage fetching:\n\n```bash\nCOPILOTLINE_USAGE=0 copilotline render\n```\n\nChoose the displayed usage unit (`credit` | `token` | `usd`, default `credit`):\n\n```bash\nCOPILOTLINE_USAGE_UNITS=usd copilotline render\n```\n\nThe same setting lives in the config file under `usage.units`; `usage.showCost:\ntrue` appends a secondary `≈ $x.xx` clause when GitHub reports a dollar cost. The\nenvironment variable overrides the config file.\n\nOverride the cache directory:\n\n```bash\nCOPILOTLINE_CACHE_DIR=/tmp/copilotline-cache copilotline refresh\n```\n\nDefault cache locations:\n\n| OS | Path |\n| --- | --- |\n| macOS | `~/Library/Caches/copilotline/<host>-<login>.usage-cache.json` |\n| Linux | `${XDG_CACHE_HOME:-~/.cache}/copilotline/<host>-<login>.usage-cache.json` |\n| Windows | `%LOCALAPPDATA%\\copilotline\\<host>-<login>.usage-cache.json` |\n\nThe cache stores quota metadata only. It never stores GitHub tokens or raw\nCopilot CLI payloads.\n\n## Privacy and security\n\n- `copilotline` is not an official GitHub product.\n- GitHub tokens are read only to call the Copilot quota endpoint.\n- Tokens are never logged, printed, or cached.\n- Account detection reads Copilot/VS Code account metadata only. It does not\n  read VS Code secret storage values.\n- The usage cache stores quota metadata only — never tokens or raw Copilot CLI\n  payloads.\n- Release binaries are accompanied by `.sha256` files and the installer\n  verifies them before installing.\n- CI runs tests, typecheck, bundle smoke tests, CodeQL, dependency audit, OSV,\n  and gitleaks secret scanning.\n\nSee [SECURITY.md](SECURITY.md) for the support policy and threat model.\n\n## Troubleshooting\n\n### Nothing shows in Copilot CLI\n\nRun:\n\n```bash\ncopilotline doctor\n```\n\nCheck that `statusLine.command` points to the executable you expect and that\n`footer.showCustom` is `true`.\n\n### `copilotline` works in the terminal but not in Copilot CLI\n\nRun `copilotline install` again. It writes the absolute path, so Copilot CLI\ndoes not depend on your shell `PATH`.\n\n### Usage quota is missing\n\nRun:\n\n```bash\ncopilotline refresh\n```\n\nIf that fails, authenticate with GitHub CLI:\n\n```bash\ngh auth login\n```\n\nIf you have multiple accounts, run `copilotline account` first. The token must\nbelong to the selected Copilot login. You can also set\n`COPILOTLINE_GITHUB_TOKEN_<NORMALIZED_LOGIN>` for that account.\n\n### Wrong GitHub account is shown\n\nRun:\n\n```bash\ncopilotline account\ncopilotline account --auto\n```\n\n`--auto` follows the active Copilot account from Copilot CLI/VS Code. If you pin\na manual account with `copilotline account --set <login>`, `doctor` warns when\nit differs from the system Copilot account.\n\n### Emoji spacing looks different across terminals\n\nThe context segment uses the hand emoji `✍️`. Terminal.app, Ghostty, iTerm2, and\nfont choices can render emoji width differently. The statusline keeps spacing\nminimal, but final alignment depends on the terminal font stack.\n\n## Development\n\n```bash\nbun install\nbun test\nbun run lint\nbun run build\nbun run audit\n```\n\nAfter a build, smoke-test the binary with the read-only diagnostics:\n\n```bash\nnode dist/cli.js doctor\n```\n\nThe README hero (`docs/screenshot.png`) and the three demo GIFs\n(`docs/demo-statusline.gif`, `docs/demo-cli.gif`, `docs/demo-install.gif`) are\ngenerated from the real CLI output with\n[charmbracelet VHS](https://github.com/charmbracelet/vhs). See\n[docs/DEMOS.md](docs/DEMOS.md) to regenerate them.\n\n## Release\n\n1. Update `package.json`, `src/version.ts`, and `CHANGELOG.md`.\n2. Open a pull request and wait for CI/security checks.\n3. Create a GitHub release tagged as `vX.Y.Z`.\n4. The release workflow publishes npm with provenance and uploads binaries plus\n   SHA256 sidecars.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}