ShellPilot
0.3.0-preview0003
GitHub Copilot in your PowerShell terminal: device-flow auth, model listing, chat and agentic tool-calling with usage and cost.
Minimum PowerShell version
7.0
Installation Options
Owners
Copyright
(c) raandree. All rights reserved.
Package Details
Author(s)
- raandree
Tags
GitHubCopilot Copilot AI LLM Chat Agent
Functions
Clear-ShpChat Clear-ShpContext Clear-ShpUsage ConvertTo-ShpTokenCount Get-ShpChat Get-ShpContext Get-ShpCosineSimilarity Get-ShpCostEstimate Get-ShpDefault Get-ShpModel Get-ShpModelName Get-ShpTool Get-ShpUsage Initialize-Shp Invoke-Shp Register-ShpTool Request-ShpEmbedding Select-ShpModel Set-ShpContext Start-ShpChat Unregister-ShpTool
PSEditions
Dependencies
This module has no dependencies.
Release Notes
## [0.3.0-preview0003] - 2026-07-09
### Added
- `read_file` now supports bounded, paged reads. The tool schema and
`Invoke-ReadFileTool` accept optional `offset`/`limit` (a 1-based line window)
and return a JSON envelope carrying `path`, `totalLines`, `offset`, `limit`,
`returnedLines`, `hasMore` and the window `text`, so the model can page
through a large file (read the first window, then request the next while
`hasMore` is true) instead of loading it whole. Existing `path`-only calls
keep working and return a bounded first window.
- `Invoke-Shp` now reports `Usage.ContextTokens`: the peak single-request
prompt size in a turn - how full the model's context window actually got - as
opposed to `Usage.PromptTokens`, which is the billed sum of input tokens
across every tool-calling round-trip. For a turn with no tool calls the two
are equal; for a multi-round-trip turn `ContextTokens` is the largest single
request's prompt while `PromptTokens` is their sum. The per-call usage record
carries the field too, and `Get-ShpUsage -Summary` aggregates it as a maximum
(occupancy does not add across calls) both overall and per model. Purely
additive - existing token and cost fields (`PromptTokens`, `CompletionTokens`,
`TotalTokens`, `CachedTokens`, cost) are unchanged.
### Changed
- Every tool result handed back to the model is now bounded by default so one
large read cannot overflow the context window: `read_file`, `fetch_url` and
`run_command` output are each capped (default 100,000 characters) with a clear
`...[truncated, original N chars]` marker. A bare `read_file` returns a bounded
first window rather than the entire file.
- The default on-disk OAuth token file was renamed from `.copilot-demo-token`
to `.shellpilot-token` (still a hidden dot-file in the user's home directory).
The old name dated from ShellPilot's proof-of-concept origin; the new name is
branded to the module. `-TokenPath` still overrides the location. Because the
default path changed, existing users must re-run `Initialize-Shp` once to
write the token under the new name (or pass `-TokenPath` to point at the old
file); the previous `.copilot-demo-token` file is not migrated automatically
and can be deleted.
### Fixed
- Reading a large file (or many files) in one turn no longer overflows the model
context window and fails with `413 Request Entity Too Large` /
`model_max_prompt_tokens_exceeded`. Alongside the per-result caps above,
`Invoke-Shp` now guards the context window before each chat request, eliding
the oldest tool results (via the new private `Compress-ShpChatContext` helper)
when the estimated prompt exceeds a budget.
FileList
- ShellPilot.nuspec
- ShellPilot.Format.ps1xml
- ShellPilot.psd1
- PriceTable.psd1
- en-US\ShellPilot-help.xml
- ShellPilot.psm1
- en-US\about_ShellPilot.help.txt
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 0.3.0-previe... (current version) | 6 | 7/9/2026 |
| 0.3.0-previe... | 4 | 7/9/2026 |
| 0.3.0-previe... | 6 | 7/9/2026 |
| 0.2.1-previe... | 8 | 7/8/2026 |
| 0.2.0 | 21 | 7/8/2026 |
| 0.2.0-previe... | 5 | 7/8/2026 |
| 0.2.0-previe... | 4 | 7/8/2026 |
| 0.2.0-previe... | 31 | 6/12/2026 |