GitHub Copilot CLI
The default terminal workspace at https://shell.prototype.imeme.name/
includes GitHub Copilot CLI, platform instructions in
~/.copilot/copilot-instructions.md, and the paas-deploy skill at
~/.copilot/skills/paas-deploy/SKILL.md. Other app-scoped shells use their
own images; the frontend-only shell app does not include developer tools.
Default: OpenRouter
~/copilot-setup
copilot
copilot-setup recognizes the configured OpenRouter credential and needs
no GitHub login. The copilot launcher uses copilot-openrouter, calling
https://openrouter.ai/api/v1 directly with the exact model ID
~deepseek/deepseek-v4-flash-latest. This is an OpenRouter-funded workflow,
not GitHub model-plan authentication. The launcher fails closed if
OPENROUTER_API_KEY is missing or OPENROUTER_MODEL is unsupported; it
does not silently fall back to a GitHub account.
The operator supplies OPENROUTER_API_KEY through
bash scripts/terraform.sh, which maps it to sensitive
TF_VAR_openrouter_api_key. The credential is retained in private
Terraform state and delivered over SSH separately from cloud-init. It is
never committed, baked into images or passed through bootstrap user-data.
The shell service unit sets
SHELL_ENV_ALLOWLIST=OPENROUTER_API_KEY,OPENROUTER_MODEL; new terminal
sessions read these values from the terminal app's container environment.
They are visible to trusted workspace users; never print them or send them
to the model.
Try describing a concrete target:
Make an expense tracker and deploy it to a new app named expenses-demo.
The skill confirms the app name/target, checks
ssh -o BatchMode=yes dokku@dokku version, inspects an existing app before
changes, tests the source, pushes git push dokku HEAD:master, asks Dokku
for its actual URL, and verifies the response. It never uses host-only
operator commands from the terminal.
Every public app gets automatic Let's Encrypt from the post-deploy hook.
Certificate failures are explicit; do not claim HTTPS until a curl
request to the reported HTTPS URL succeeds. An operator can fix DNS/port
80 and retry on the host with sudo paas-enable-https <app>.
Certificate renewal runs through cron.
Explicit alternative: GitHub login
Opt in separately for setup and each launch:
COPILOT_USE_GITHUB=1 ~/copilot-setup
COPILOT_USE_GITHUB=1 copilot
The helper recognizes an existing stored login or supported operator-provided
GitHub token; otherwise it starts copilot login --device-code. Complete the
displayed code at https://github.com/login/device in another browser tab.
Use a GitHub account entitled to Copilot CLI; organization policy may also
apply. This escape hatch does not use OpenRouter.
There is no system keychain. Stored GitHub credentials in
~/.copilot/config.json are plaintext and shared with everyone able to access
this workspace. Closing the browser alone does not remove login. Treat a
container restart or redeploy as loss of login and source; repeat setup when
needed. Do not publish a config file or saved token.
Shared authority and source safety
/appis ephemeral. Keep each project in its own directory and push source to a separate durable Git remote; Dokku's deploy remote is not a source backup. Do not overwrite bundled.copilot,bin,.profileorvendortooling./app/.sshis a shared read-only deploy-key mount. It can administer all apps, not just the app selected in the browser. Do not reveal keys, inspect unrelated app config, or change another app without permission.- All Dokku apps receive one shared private Terminal API credential. Browser sessions do not directly inherit that key, but share the API process UID and deploy key. Process environment and app config remain accessible. App-scoped browser grants do not create tenant or secret isolation.
- Only use this workspace with fully trusted users. Seek explicit approval
before updating an existing app, destructive operations, datastore links
or disruptive config changes.
demo-dbanddemo-cachecontain shared data.
Troubleshooting
- Missing key/model: ask the operator to check terminal runtime configuration and the shell service allowlist without displaying values; reconnect after correction. Do not invent credentials or fall back silently.
- OpenRouter failures: check model access, credit, endpoint connectivity and upstream error output, without logging authorization headers.
- GitHub device code expired: rerun the helper with
COPILOT_USE_GITHUB=1. - SSH fails: report the mounted-key or network blocker; never disable host-key verification. Do not claim a deployment succeeded without testing it.
See Deploy your first app and Web shell.