AI Coding Tools on PMSS
Every Pulsed Media seedbox running a current PMSS has three AI coding assistants installed system-wide: claude (Claude Code, Anthropic), codex (Codex CLI, OpenAI) and gemini (Gemini CLI, Google). They live outside your home directory, so they take none of your disk quota, and they run as your own user with no root access. When your AI key is in place, all three start on the AI credits your Pulsed Media services earn, with no vendor account and nothing to configure (see Using your AI credits). Each one also works with your own account or API key with the company that makes it; the tool then connects from the seedbox straight to that vendor, and you pay the vendor for the usage. Your own account always takes precedence over the credits.
What is installed
| Command | Tool | Vendor | What you need |
|---|---|---|---|
claude |
Claude Code | Anthropic | Your AI credits, or an API key or subscription |
codex |
Codex CLI | OpenAI | Your AI credits, or an API key or subscription |
gemini |
Gemini CLI | Your AI credits, a Gemini API key, or Google Cloud organisation access |
Each tool keeps its settings and login in its own hidden folder in your home directory. PMSS updates install these copies. Claude Code is held at a fixed version, because some newer releases hang on startup on Pulsed Media servers. Google ended personal Google-account sign-in for Gemini CLI (Google AI Pro, Ultra and the free individual tier) on 18 June 2026, so Gemini CLI on a seedbox needs an API key, organisation access or your AI credits.
Personal copies (optional)
Your home directory also holds install-ai-tools.sh, which installs personal copies of all three tools into ~/bin and ~/.local:
bash ~/install-ai-tools.sh
It asks before installing, uses about 1 GB of your quota, and checks downloads against published checksums where one exists. Personal copies are the latest upstream releases, not the versions PMSS pins. Because the system directories come first in your PATH, typing claude still starts the system copy; run a personal copy by its path, for example ~/bin/claude. A personal copy never starts on your AI credits by itself. Most people never need this.
Starting a tool
You need a shell on the seedbox. Two ways in:
- SSH from your own computer, see How to connect via SSH.
- The Console tab in the seedbox dashboard, on servers where it is available. It opens a shell in the browser as your own account, with no SSH client needed. Only one console window can be connected at a time. The info tab also has a Persistent (tmux) button: that session keeps running after you close the panel, which suits long agent runs.
With your AI key in place, type claude, codex or gemini and the tool starts on your credits (Using your AI credits). To use your own account with a vendor instead, set your key first. Put export lines in ~/.bashrc.user, not ~/.bashrc, which PMSS replaces on updates (Shell customization on PMSS explains why):
# ~/.bashrc.user export ANTHROPIC_API_KEY="your-key" export GEMINI_API_KEY="your-key" export OPENAI_API_KEY="your-key"
Codex reads the key through its own login step:
printf '%s' "$OPENAI_API_KEY" | codex login --with-api-key
After that, claude, codex or gemini opens an interactive session. Start it from the directory you want it to work in.
Using your AI credits
Your Pulsed Media services earn AI credits, spent through the key shown on the Virsilipas AI key page in the client area. On a seedbox the same key can sit in ~/.virsilipasKey, a file readable only by you with an endpoint= line and a key= line (how to add it). The credit service speaks the API format of each tool (OpenAI chat completions, Anthropic Messages and the Gemini API).
Through the credits, the model provider does not learn who you are: the request goes on with Pulsed Media's account, from our server, among every other customer's requests, and the credit service does not keep your prompts. What the tool puts in a request, your code included, still reaches the provider. For Codex and Gemini CLI, the main models also have a second provider behind them when the first one fails before the answer starts. Claude Code requests go to the first provider only. More in why go through Pulsed Media.
On a server with a current PMSS, codex, claude and gemini start on your credits by themselves when that file holds your key and you have not set the tool up with an account of your own. In a terminal, the first line tells you so:
Codex is using your Pulsed Media AI credits (~/.virsilipasKey). To change: PMSS_VIRSILIPAS=off codex, or codex login.
The key goes to the tool in its environment when it starts; nothing is written into your settings files. All three use the alias default, the cheapest everyday model. Scripts and cron jobs that run these commands use the credits too, without the line. If a tool starts without the line and asks you to sign in, your server does not have this yet, the key file is missing, or one of your own settings below takes precedence; the manual settings work on every server.
| Tool | Starts on AI credits | Your own setup that takes precedence |
|---|---|---|
| Pikkumies | Always; reads ~/.virsilipasKey itself |
— |
codex |
With the key file in place | A login made with codex login; OPENAI_API_KEY or OPENAI_BASE_URL in your environment; a model, model_provider or profile line at the top of ~/.codex/config.toml; a model or profile given on the command line
|
claude |
With the key file in place | A login made with /login; ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN or ANTHROPIC_BASE_URL in your environment; an apiKeyHelper or ANTHROPIC_ setting in Claude Code's own settings.json; --model or --settings on the command line
|
gemini |
With the key file in place | GEMINI_API_KEY or GOOGLE_API_KEY in your environment; a sign-in method chosen in ~/.gemini/settings.json; a Google sign-in; a .env file with a key; -m on the command line
|
| OpenClaw | When you install it with the key file in place | An OpenClaw setup you already have; OpenClaw's own openclaw configure
|
Turning it off
For one run, put PMSS_VIRSILIPAS=off in front of the command:
PMSS_VIRSILIPAS=off claude
To turn it off for all three tools, add this line to ~/.bashrc.user and open a new shell:
export PMSS_VIRSILIPAS=off
Cron jobs and bash -c commands do not read ~/.bashrc.user, so a script that must not use the credits needs that line itself.
To use your own account instead, set it up once and the tool uses it from then on:
- Codex:
printf '%s' "$OPENAI_API_KEY" | codex login --with-api-key, with your OpenAI key inOPENAI_API_KEY. - Claude Code: start
PMSS_VIRSILIPAS=off claude, then type/loginand sign in. Or setANTHROPIC_API_KEYin~/.bashrc.user. - Gemini CLI: set your own
GEMINI_API_KEYin~/.bashrc.user.
To run Claude Code on another alias from the model list, name it when you start it, for example ANTHROPIC_MODEL=large claude, or put export ANTHROPIC_MODEL=large in ~/.bashrc.user. Codex and Gemini CLI take another alias through the manual settings below.
Credits pay for what the tool sends and receives. Claude Code sends its full set of instructions and tool descriptions with every request: in our test a task with a single shell command cost about 5,000 credits on default. A long agent session reads a lot of files and costs more than a short chat, so check /v1/balance now and then (how).
Setting it up yourself
The settings below point a tool at the credit service by hand. Use them on a server that does not start the tools on credits by itself yet, for a personal copy of Claude Code or Gemini CLI from install-ai-tools.sh, or to choose another alias for Codex or Gemini CLI. A tool set up this way counts as your own setup, so the automatic default leaves it alone. To install and set up the tools on a server that is not a Pulsed Media seedbox, with or without root, see Using Pulsed Media AI Credits on Any Linux Server.
Codex on AI credits
Put the key into an environment variable in ~/.bashrc.user, so each terminal session you open has it (scripts run from cron need the same line themselves). The line reads the key from your key file, and leaves the variable empty if the file is missing:
# ~/.bashrc.user export VIRSILIPAS_API_KEY="$(sed -n 's/^key=//p' ~/.virsilipasKey 2>/dev/null)"
Then tell Codex about the provider in ~/.codex/config.toml. Plain key = value lines must come before any [section] line, so if the file already exists, put the first two lines at the top:
model = "default" model_provider = "virsilipas" [model_providers.virsilipas] name = "Pulsed Media AI credits" base_url = "https://virsilipas.mcx.fi/v1" env_key = "VIRSILIPAS_API_KEY" wire_api = "chat"
This works with the system codex. A personal copy installed with install-ai-tools.sh is the Codex release that was latest on the day you installed it, and current releases no longer accept wire_api = "chat": such a copy stops at startup with a config error while this section is in the file, even when you run it on your own account. Leave that section out of the file while you use a personal copy, or use the one-off form below with the system codex.
Open a new shell (or run source ~/.bashrc.user) and start codex as usual. It now answers on your credits. default is the cheapest everyday model. Set model to any other alias from the model list, for example "large" for harder work.
To try it once without editing any file, pass the same settings on the command line:
export VIRSILIPAS_API_KEY="$(sed -n 's/^key=//p' ~/.virsilipasKey)"
codex -c 'model_providers.virsilipas={name="Pulsed Media AI credits",base_url="https://virsilipas.mcx.fi/v1",env_key="VIRSILIPAS_API_KEY",wire_api="chat"}' -c model_provider=virsilipas -c model=default
Claude Code on AI credits
Claude Code takes its address, key and model from environment variables. Add these lines to ~/.bashrc.user, and leave out any ANTHROPIC_API_KEY line from Starting a tool while you do:
# ~/.bashrc.user export ANTHROPIC_BASE_URL="https://virsilipas.mcx.fi" export ANTHROPIC_AUTH_TOKEN="$(sed -n 's/^key=//p' ~/.virsilipasKey 2>/dev/null)" export ANTHROPIC_MODEL="default" export ANTHROPIC_DEFAULT_OPUS_MODEL="default" export ANTHROPIC_DEFAULT_SONNET_MODEL="default" export ANTHROPIC_DEFAULT_HAIKU_MODEL="default"
The address has no /v1 at the end: Claude Code adds the rest of the path itself. Claude Code also picks some model names on its own, for example for quick background steps; the last three lines send those to the same alias, because the credit service answers only to its own aliases.
Open a new shell and start claude as usual. Newer Claude Code releases may note that they do not recognise the model default and keep a conversation within 200,000 tokens of context. That is expected. For harder work, set ANTHROPIC_MODEL to another alias from the model list, such as large. Every alias works with Claude Code except nolimits-flash, nolimits-qwen and nolimits-mimo, and those three models' own names. Requests are text only, so images and PDF files do not work on credits. Claude Code's web search does not work either: it runs as a tool on the vendor's side, which the credit service does not offer.
To try it once without editing any file:
ANTHROPIC_BASE_URL="https://virsilipas.mcx.fi" ANTHROPIC_AUTH_TOKEN="$(sed -n 's/^key=//p' ~/.virsilipasKey)" \ ANTHROPIC_MODEL=default ANTHROPIC_DEFAULT_OPUS_MODEL=default ANTHROPIC_DEFAULT_SONNET_MODEL=default \ ANTHROPIC_DEFAULT_HAIKU_MODEL=default claude
Gemini CLI on AI credits
Gemini CLI needs two environment variables and a few settings. Add these lines to ~/.bashrc.user, and leave out any other GEMINI_API_KEY line while you do:
# ~/.bashrc.user export GOOGLE_GEMINI_BASE_URL="https://virsilipas.mcx.fi" export GEMINI_API_KEY="$(sed -n 's/^key=//p' ~/.virsilipasKey 2>/dev/null)"
Then put this in ~/.gemini/settings.json. If the file already has settings of yours, add these keys to them:
{
"security": {"auth": {"selectedType": "gemini-api-key"}},
"model": {"name": "default"},
"modelConfigs": {"customOverrides": [{"match": {"overrideScope": "core"}, "modelConfig": {"model": "default"}}]},
"agents": {"overrides": {"codebase_investigator": {"modelConfig": {"model": "inherit"}},
"cli_help": {"modelConfig": {"model": "inherit"}}}}
}
The address has no /v1beta at the end: Gemini CLI adds the rest of the path itself. The selectedType line chooses sign-in with an API key; without it, newer Gemini CLI releases stop with "Invalid auth method selected." The other lines send every model name Gemini CLI uses, including its own background steps and two built-in helper agents, to an alias, because the credit service answers only to its own aliases.
Open a new shell and start gemini as usual. For harder work, change both "default" values (in model and in modelConfigs) to another alias from the model list, such as large. Changing only the first has no effect, because the second line also covers the conversation itself. Requests are text only, so pasted images and files do not work on credits. Gemini CLI's web search does not work either: it runs as a tool on the vendor's side, which the credit service does not offer. How much a model reasons is set per alias, so the thinking settings in Gemini CLI have no effect on credits.
Undoing these settings
On a server that starts the tools on credits by itself, removing these settings returns a tool to that automatic default, not to your own account. Set up your own account as in Turning it off.
Codex: delete the model_provider and model lines from ~/.codex/config.toml (the [model_providers.virsilipas] section can stay, it does nothing unless selected) and log in with your own key:
printf '%s' "$OPENAI_API_KEY" | codex login --with-api-key
To switch between the two without editing, keep the file without those two lines and add -c model_provider=virsilipas -c model=default on the command line only when you want to run on credits.
Claude Code: remove the ANTHROPIC_ lines above from ~/.bashrc.user and open a new shell. Claude Code then uses your own login or ANTHROPIC_API_KEY again. To switch only now and then, keep the file without those lines and use the one-off form when you want to run on credits.
Gemini CLI: remove the two export lines above from ~/.bashrc.user and the keys above from ~/.gemini/settings.json, all of them: the alias default exists only on the credit service. Open a new shell and set your own GEMINI_API_KEY as in Starting a tool.
Who these tools suit
A coding agent with a shell can write scripts, sort and rename files, edit app configs, read logs and chase down why something stopped working. It does that with your account's permissions, on your files. The model usage behind it is paid through your own key or subscription with the vendor, or from your AI credits.
That makes the tools a good fit for people who already use a terminal and want to automate their seedbox, and a poor first step for someone setting up a seedbox for the first time. If an agent proposes a command you cannot read, you cannot judge whether to approve it. A new user is better served by the dashboard and the Install Media Stack button in its Configure tab, which sets up Radarr, Sonarr, Prowlarr, Jellyfin, SABnzbd, Autobrr and Cloudplow without a shell (see Install Media Stack). The AI tools can come later, once the box is familiar.
For an agent that keeps running between sessions and that you reach from a browser or a chat app instead of a terminal, see OpenClaw on PMSS. On a current PMSS you turn it on in Configure → Apps; it also installs over SSH with install-openclaw install.
For a helper you install into your own seedbox account that checks things for you, such as what fills your quota, which torrents are stalled and whether Docker works, see Pikkumies on PMSS. It runs on the AI credits your services earn.
Your keys and your data
PMSS ships no vendor credentials. With your own key or subscription, a tool talks to the vendor you chose under that vendor's terms. With AI credits, the tool talks to the Pulsed Media credit service, which passes each request to the model that answers it and never stores or logs the text of prompts or answers (details).
Either way, your prompts, and whatever the agent reads while answering them (file contents, command output), go to the model that answers. Point the agent at the directories it needs and keep it away from the rest.
On the seedbox itself, the managed shell profile sets umask 077. Files you create, including the tools' settings and login files, are readable only by your account unless you change their permissions.
These are your tools, separate from Väinämöinen, the AI system Pulsed Media runs for its own server operations and support.
Using them safely
- Back up first. The agent can delete or overwrite anything your account can, so keep copies of data you cannot replace (3-2-1 Backup Strategy).
- Leave the tools in their ask-before-running mode and read each command before approving it. Avoid full-auto modes while the agent works on downloaded files or web pages: text inside them can carry instructions aimed at the agent (prompt injection).
- On servers with a Linux kernel older than 5.13, Codex cannot sandbox its own commands. Review its approvals there with extra care.
- Never put a key in your web folders, in a torrent or in a file you share. If the vendor's console offers a spending limit, set one.
- Other accounts on the same server can connect to a port you open. A test web server or API an agent starts needs a password, or should be stopped when you are done.
- Run long sessions inside tmux (the Persistent console, or
tmuxover SSH) so a dropped connection does not kill them. Agent processes count against your account's memory limit, the same budget your torrent client runs in.
Troubleshooting
command not found- Usually the server has not yet received the PMSS update that installs the tools. Ask support.
- A personal copy of Claude Code crashes with "Illegal instruction"
- The personal installer detects this on older CPUs and falls back to a build that runs on them. Re-run
bash ~/install-ai-tools.sh. - A tool starts on AI credits, but you want your own account
- See Turning it off. A login applies everywhere; a key set in
~/.bashrc.userapplies to your terminal sessions, not to cron jobs. - The line about AI credits does not appear
- The line shows only in a terminal. If the tool asks you to sign in instead, check that
~/.virsilipasKeyexists, belongs to your account, is a plain file and not a link, and has both lines; then check the table under Using your AI credits for a setting of your own. On a server without this feature, use the manual settings. - A tool on AI credits reports an authentication error
- The key in
~/.virsilipasKeyis wrong or no longer valid. If you got a new key in the client area, put it in the file. - Codex authentication errors
- With your own account: check that
OPENAI_API_KEYis set in the current shell, then repeat thecodex loginstep. With the manual settings: runecho ${#VIRSILIPAS_API_KEY}; 0 means the key is missing, so check that~/.virsilipasKeyhas akey=line and open a new shell. - Codex on AI credits prints a warning about the "chat" wire API, or an error about refreshing available models
- Both lines are expected with this setup and Codex keeps working. The credit service speaks the chat format, which the Codex version installed on seedboxes still supports.
- Claude Code on AI credits reports an unknown or unavailable model
- The credit service answers only to its own aliases. Check that
ANTHROPIC_MODEL, and with the manual settings the threeANTHROPIC_DEFAULT_lines, name an alias that works with Claude Code, then open a new shell. - Claude Code with the manual settings fails to authenticate
- Run
echo ${#ANTHROPIC_AUTH_TOKEN}; 0 means the key is missing from the current shell, so check~/.virsilipasKeyand open a new shell. - Gemini CLI with the manual settings stops with "Invalid auth method selected."
~/.gemini/settings.jsonis missing the"selectedType": "gemini-api-key"line, or the file is not valid JSON. Check both, then startgeminiagain.- Gemini CLI with the manual settings reports a model that is not found
- One of the model lines is missing or names something that is not an alias. Check the settings above; all of them are needed.
- Gemini refuses a Google account sign-in
- Personal Google-account sign-in no longer works for Gemini CLI. Use a Gemini API key, or your AI credits.
The installers are open source: AI CLI tools in the PMSS repository.
Claude Code, Codex and Gemini CLI are included with every Pulsed Media seedbox at no extra charge, alongside SSH access to run them from. See the seedbox plans.
See also
- How to connect via SSH — logging in to your seedbox from a terminal
- Shell customization on PMSS — where to put your own environment variables
- Pikkumies on PMSS — an AI helper you install into your own seedbox account, running on your AI credits
- Pulsed Media AI Credits — how many credits each plan earns, the model list and prices, and running the coding tools on them
- Pulsed Media Seedbox and Storage Box Features — everything included with a Pulsed Media account