copilot-cli is a nono pack for running GitHub Copilot CLI (copilot) inside a nono security sandbox.
- Confine Copilot CLI to the working directory, its own config (
~/.copilot/), and cache (~/Library/Caches/copilot/,~/.cache/copilot/) - Allow access to the Copilot CLI binary at
/usr/local/Caskroom/copilot-cli - Include read-only access to
~/.config/gh - Block all other filesystem paths at the kernel level
The pack ships three profiles: a shared base (nolabs-ai/copilot-base) and two authentication-specific profiles that extend it:
| Profile | Auth method | Best for |
|---|---|---|
copilot-cli |
gh auth session |
Users already authenticated with the gh CLI |
copilot-cli-proxy |
Keychain credential injection | Isolated sessions, CI, or token-based access |
Step 1 — Authenticate with gh
gh auth loginFollow the prompts to authenticate with GitHub. The profile reads ~/.config/gh as read-only to pick up the active session.
Step 2 — Run
nono run --profile nolabs-ai/copilot-cli -- copilotAuthentication is handled by nono's credential injection. A GitHub token is read from the OS keychain at session start and injected as a Token header for requests to https://github.com. The token is never passed to the copilot process directly.
Step 1 — Create a fine-grained personal access token
- Go to GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Click Generate new token
- Fill in the token name, expiration, and resource owner
- Under Permissions, enable Copilot Requests
- Click Generate token and copy the value (
github_pat_...)
Step 2 — Add the token to the macOS Keychain
security add-generic-password -s "nono" -a "copilot_github_token" -wOmitting the value from the command line causes security to prompt for it interactively, keeping the token out of shell history and the process list. The token is stored under service nono, account copilot_github_token.
Step 3 — Run
nono run --profile nolabs-ai/copilot-cli-proxy -- copilotnono pull nolabs-ai/copilot-cliAll three profiles are installed automatically. Use --profile nolabs-ai/copilot-cli or --profile nolabs-ai/copilot-cli-proxy to select one at runtime. nolabs-ai/copilot-base can be used directly but has no auth configuration, so it would requires manual login.
| Artifact | Type | Purpose |
|---|---|---|
profiles/copilot-base.json |
profile | Shared base profile (nolabs-ai/copilot-base) — extended by both auth profiles |
profiles/copilot-gh.json |
profile | Sandbox profile using gh auth (copilot-cli) |
profiles/copilot-proxy.json |
profile | Sandbox profile using credential injection (copilot-cli-proxy) |
skills/copilot-sandbox/SKILL.md |
instruction | Teaches the agent its sandbox constraints |
bin/nono-hook.sh |
script | PostToolUseFailure hook — injects sandbox capability context on tool failure |
bin/nono-hook-bash.sh |
script | PostToolUse hook — detects denial patterns in bash output and injects context |
bin/nono-hook-session.sh |
script | SessionStart hook — injects a brief sandbox boundary statement at session start |
hooks/hooks.json |
config | Wires the three hooks into the Copilot CLI plugin runtime |
- Name:
copilot-cli - Pack type:
agent - Platforms:
macos - License:
Apache-2.0 - Min nono version:
0.44.0
copilot-cli/
├── bin/
│ ├── nono-hook.sh
│ ├── nono-hook-bash.sh
│ └── nono-hook-session.sh
├── hooks/
│ └── hooks.json
├── package.json
├── profiles/
│ ├── copilot-base.json
│ ├── copilot-gh.json
│ └── copilot-proxy.json
├── README.md
├── skills/
│ └── copilot-sandbox/
│ └── SKILL.md
└── wiring/
├── enabled-plugin.json
└── marketplace.json