Skip to main content
Use NoMask in the Command Code terminal app with its bring-your-own-key setup.

Before you start

  • Create a key on the API Keys page and add funds to your API balance.
  • Choose a text model with Function calling and streaming on the Models page. Copy its exact model ID.
  • Use the connection values below. Replace key placeholders locally; keep secrets out of project files and source control.
Replace your-model-id throughout the examples with the exact ID of a text model that supports function calling and streaming. Check the Models page for current availability and limits.
Examples use your selected model. If you change it, also update context, output and image settings to match that model. These guides cover text models; Image Studio models use separate image endpoints.

Install and configure

1. Install Command Code

Install Node.js 22 or newer, then run:
The full command-code command works on Windows, macOS and Linux. Its Windows shortcut is cmdc; cmd on Windows opens the system shell.

2. Set your API key

Run this in the terminal you will use to launch the app. Replace the placeholder with your key.

3. Add the connection

Create ~/.commandcode/providers.json in your home directory. On Windows, use %USERPROFILE%\.commandcode\providers.json. Merge this entry if the file already exists.
openai-completions selects Chat Completions. Keep the base URL as shown; do not append /chat/completions.
BYOK support is currently in beta. The key stays in the environment; apiKey must contain the variable reference, not a pasted key.

Launch and test

Open your project and launch with --local-only to use the configured connection without a Command Code account.
  • Enter /model and select your-model-id under NoMask.
  • Ask: Reply with exactly NOMASK_OK. Do not edit files.
  • Then ask it to create nomask-test.txt containing NOMASK_OK. Review the proposed file action to check that tool calls work.
Local-only mode keeps local editing tools available. Command Code account features, including its built-in search and fetch, are unavailable in that mode.
If the model is missing, reopen /model after saving the JSON. Check for a configuration warning and confirm NOMASK_API_KEY is set in the same terminal.

Troubleshooting

  • 401: check that your key is active and available to the process running the tool. Restart the tool after changing environment variables.
  • 402: add funds to your API balance or reduce the requested output.
  • 404: check the exact model ID and base URL. Direct connections use Chat Completions, not Responses or Anthropic Messages.
  • 429: wait for Retry-After. API keys share account limits; creating another key does not reset usage. Check the key’s monthly spending cap too.
  • Context or tool errors: start a shorter task, lower the output limit and confirm the model supports function calling. A plain text reply alone does not confirm file-editing tools work.
Check API Overview for usage and recent errors. Include the request ID when contacting support; never send your key. See Errors and Rate Limits.

Official references

Setup checked against the documentation below. Tool versions may change their settings or configuration format.