Use AI in onViz for free with Codex CLI
Install Codex, sign in with your ChatGPT account and turn it on in onViz to chat your way to charts, with no API key and no extra cost.
onViz needs an AI to understand your question and write the queries that calculate the numbers. If you have a ChatGPT account, even on the Free plan, you can use it through Codex, OpenAI's official command-line tool. No API key, and nothing to pay beyond the ChatGPT plan you already have.
Before you start
- The onViz desktop app (Windows, macOS or Linux). Codex only works in the installed app, not when reports are viewed in a browser.
- A ChatGPT account. The Free plan works; how many questions you can ask per day follows that plan's limits, and Plus / Pro allow more.
- About 5 minutes.
1. Install Codex
Open Terminal (macOS, Linux) or PowerShell (Windows), paste the matching command and press Enter.
macOS, Linux:
curl -fsSL https://chatgpt.com/codex/install.sh | sh
Windows (PowerShell):
irm https://chatgpt.com/codex/install.ps1 | iex
Tip
Not comfortable with the command line? Download the installer from the Codex releases page. When no AI is connected yet, the AI chat page in onViz also shows a Use ChatGPT for free with Codex box with the right command for your computer and a copy button.

2. Sign in with your ChatGPT account
In the same window, run:
codex login
A browser window opens the ChatGPT sign-in page. Once you're signed in, the command-line window reports success. You only do this once per computer.
3. Turn on Codex in onViz
Open onViz and go to Settings › AI. onViz finds Codex on your computer and shows Found Codex … on this computer · Signed in and ready to use without an API key. Click Enable Codex.

onViz creates an AI profile called Codex, tests the connection and confirms Codex is now the AI for onViz. If it's your first AI, it becomes the default for every conversation.

Note
Don't see Found Codex? Click New profile, choose the Codex format, then click Test connection. If Codex is installed somewhere unusual, fill in Codex path.
4. Ask your first question
Open AI chat, pick your data source (or the sample data) in the scope box and try:
- Revenue for the last 90 days by branch
- Overdue receivables by customer
Codex answers one paragraph at a time rather than word by word, so give it a few seconds to show the paragraph and the chart.

Screenshots use the onViz sample data. The chart and numbers are calculated by onViz from the data; the AI's wording can differ each time.
What Codex can do on your computer
Inside onViz, Codex runs with tight limits:
- it can only use onViz tools: look at table structure, run read-only queries, draw charts;
- it can't run system commands, search the web or change files on your computer;
- it receives your question, column names and a few sample rows with emails and phone numbers masked, like any other AI in onViz. Your files stay on your computer.
Common problems
| What you see | What to do |
|---|---|
| Codex shows Not signed in | Open Terminal / PowerShell, run codex login and sign in with your ChatGPT account again. |
| Codex isn't found after installing | Quit onViz completely and open it again. Still missing: create a Codex profile and fill in Codex path. |
| The AI says you're out of messages | You've hit your ChatGPT plan's limit. Wait for it to reset, upgrade your ChatGPT plan, or add another AI profile that uses an API key. |
| Answers are slow | In Settings › AI, pick the Codex profile and lower Effort (how much the model thinks): faster answers that use less of your limit. |