ask-copilot

1.1.1

Runs the GitHub Copilot CLI in one-shot prompt mode, locked down so that it can only answer:

 * No tools: shell, file read, file write, URL fetch, memory and the GitHub MCP server
   are all denied (--deny-tool). Custom instructions (AGENTS.md etc.) are not loaded.
 * No filesystem: Copilot runs in a fresh, empty working directory with a fresh, empty
   COPILOT_H
Runs the GitHub Copilot CLI in one-shot prompt mode, locked down so that it can only answer:

 * No tools: shell, file read, file write, URL fetch, memory and the GitHub MCP server
   are all denied (--deny-tool). Custom instructions (AGENTS.md etc.) are not loaded.
 * No filesystem: Copilot runs in a fresh, empty working directory with a fresh, empty
   COPILOT_HOME, so it cannot see your files, settings, MCP servers, plugins or skills.
   Both directories are deleted when the script exits.
 * No permission overrides: every inherited COPILOT_* variable (e.g. COPILOT_ALLOW_ALL)
   and every other GitHub token variable is removed from Copilot's environment.

Output is always Markdown. It is written to the pipeline as lines of text, so it can be
piped, redirected or captured (ask-copilot q | Set-Content answer.md, $x = ask-copilot q).
When glow (https://github.com/charmbracelet/glow) is installed and the output is going
straight to the terminal, it is rendered with glow; anything piped, redirected or captured
always gets the raw Markdown. Control this with -Glow.

Authentication uses a fine-grained personal access token with only the "Copilot Requests"
account permission. The token is never written to disk:
 * By default you paste it at a masked prompt on each run (kept as a SecureString).
 * Or use -OpReference to read it from 1Password with the `op` CLI (op://vault/item/field).
   With the 1Password desktop app's CLI integration on, op unlocks via Windows Hello and
   keeps no session token on disk.
 * Or use -SecretName to pull it from a PowerShell SecretManagement vault. Use a remote
   vault (e.g. Azure Key Vault, 1Password, Bitwarden). The local SecretStore vault is
   refused because it saves secrets to a file on this machine.
The token goes only into the Copilot child process's environment, never into this
PowerShell session's environment, the command line, or `copilot login` (which would save it).

Create the token at https://github.com/settings/personal-access-tokens/new :
 Resource owner: your personal account
 Repository access: Public repositories (read-only)
 Permissions > Account > Copilot Requests
 Expiration: as short as you can tolerate

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name ask-copilot

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 Emily Lockhart. MIT License.

Package Details

FileList

Version History

Version Downloads Last updated
1.1.1 (current version) 11 10/22/2026