Run the Newo CLI with Claude or ChatGPT

Set up Claude or ChatGPT to run the Newo CLI for you, so you can inspect, test, and change your agents by asking in plain language. Claude does this through Claude Code, and ChatGPT through Codex. Both run commands on your own computer, in a folder you choose, and ask before they change anything.

:::
Important

The chat at claude.ai and chatgpt.com in your web browser runs in the cloud and can't reach the CLI on your computer. Use Claude Code or Codex.
:::

Choose your app

ClaudeChatGPT
App that runs the CLIClaude Code: the Code tab of the Claude desktop app, the terminal, or the VS Code and JetBrains extensionsCodex: the ChatGPT desktop app, the Codex CLI in the terminal, or the Codex IDE extension
Account you needClaude Pro, Max, Ultra, Team, or Enterprise, or a Claude Console account. The free plan doesn't include Claude Code.A ChatGPT plan that includes Codex
Instructions it readsCLAUDE.md, which loads AGENTS.mdAGENTS.md
Skills it reads.claude/skills/.agents/skills/
Before a command runsAsks you, except for a built-in set of read-only commandsRuns it in a sandbox that keeps writes inside the folder, and asks to go further
Extra setup for the Newo CLINoneTwo lines in Codex's settings: network access and the Newo login folder (see Set up Codex)

newo init writes the instructions and skills for both apps, so the same folder works with either.

What you need

  • A Newo login that can manage the account: owner, co-owner, technical owner, or technical support. Otherwise you need an API key (see Set up the Newo CLI with an AI coding assistant).
  • The customer IDN of the account, for example NEWO_ABC123, if your login manages several accounts. The assistant lists them for you to choose from.
  • Node.js 22.12 or later. You don't have to install it yourself: the assistant offers to.
  • A test account, if you have one. Make and check changes there before the account that serves real callers.

Set up Claude Code

1. Install Claude Code

Pick one:

  • Desktop app (easiest): install the Claude desktop app for macOS or Windows, sign in, and open the Code tab. It includes Claude Code, so you don't install anything else.
  • Terminal, macOS or Linux:
curl -fsSL https://claude.ai/install.sh | bash
  • Terminal, Windows PowerShell:
irm https://claude.ai/install.ps1 | iex

Check the install with claude --version. On Windows, install Git for Windows as well so Claude Code can run shell commands the usual way.

2. Open a folder

  1. Create an empty folder for the account, for example newo-acme.
  2. Open Claude Code in it:
    • Desktop app: in the Code tab, start a new session and choose the folder.
    • Terminal: cd into the folder and run claude. Sign in when it asks.

3. Paste the setup prompt

Install the Newo CLI (https://www.npmjs.com/package/newo) and set it up in this folder; install
Node.js and npm first if they are missing. Then help me sign in to my Newo account through the
browser, let me choose which account to work with, and tell me briefly what you can do in it. Keep
it simple: one step at a time, and give me buttons to choose from instead of asking me to type.

Claude asks before each command. Approve the install steps, newo init, and newo login. Then:

  1. A browser window opens. Sign in to Newo there, click Accept on the Authorize App screen the first time, and close the tab when it says You are signed in.
  2. Claude runs newo customers and asks which account to use when your login opens several. It then runs newo customer switch [customer_idn] and newo profile.
  3. Check that newo profile names the account you expect.

From the next session on, Claude reads CLAUDE.md and the skills in .claude/skills/ by itself, so it already knows the platform and its rules.

4. Choose what Claude may run without asking

Each time Claude wants to run a command, you can allow it once, or choose Yes, and don't ask again for commands that start the same way. Claude Code saves that choice for the folder in .claude/settings.local.json.

Allow without asking only commands that read. A good set for the Newo CLI:

{
  "permissions": {
    "allow": [
      "Bash(newo auth status *)",
      "Bash(newo customers *)",
      "Bash(newo profile *)",
      "Bash(newo status *)",
      "Bash(newo diff *)",
      "Bash(newo logs *)",
      "Bash(newo session *)",
      "Bash(newo get-skill *)",
      "Bash(newo pull-attributes *)",
      "Bash(newo lint *)"
    ]
  }
}

Keep every command that changes the account on ask: newo push, newo publish, newo watch, newo update-attribute, newo update-skill, newo import, newo sandbox, newo test, and the create- and delete- commands.

:::
Note

Claude Code's sandbox is off by default, so newo login can open its local port and save the session in your home folder. If you turned the sandbox on, run newo login in your own terminal and tell Claude when it's done.
:::

Set up Codex (ChatGPT)

1. Install Codex

Pick one:

  • Desktop app: install the ChatGPT desktop app, sign in, and start a local chat in a folder.
  • Terminal, with npm:
npm install -g @openai/codex
  • Terminal, macOS with Homebrew:
brew install --cask codex

In the terminal, run codex login and sign in with your ChatGPT account in the browser.

2. Let Codex reach Newo

Codex runs commands in a sandbox that keeps writes inside your folder. By default, the sandbox also blocks three things the Newo CLI needs:

  • The network: every command that talks to the platform needs it, and newo init needs it to download the Agent Development Kit.
  • The login folder: ~/.config/newo-cli, where newo login saves your session. The CLI also updates that file each time it renews your sign-in, so this matters after the first login too.
  • A local port: newo login listens on port 8766, 8767, or 8768 for the browser to hand the sign-in back.

Add these lines to ~/.codex/config.toml, then start Codex again:

[sandbox_workspace_write]
network_access = true
writable_roots = ["~/.config/newo-cli"]

This opens the network and that one folder, nothing else on your computer. For one session only, start the CLI with these options instead:

codex -c 'sandbox_workspace_write.network_access=true' -c 'sandbox_workspace_write.writable_roots=["~/.config/newo-cli"]'

If you'd rather not change the settings, approve each newo command when Codex asks to run it outside the sandbox.

3. Open a folder and paste the setup prompt

  1. Create an empty folder for the account, for example newo-acme.
  2. Open Codex in it: in the terminal, cd into the folder and run codex. In the desktop app, choose the folder for a local chat.
  3. Paste the same setup prompt as for Claude Code (see Paste the setup prompt).
  4. Approve the install steps, newo init, and newo login, sign in in the browser, and choose the account when Codex lists them.
  5. Check that newo profile names the account you expect.

From the next session on, Codex reads AGENTS.md and the skills in .agents/skills/ by itself.

:::
Important

Don't give Codex full access to your computer (danger-full-access) to save approvals. The sandbox and the approvals are what stop an unplanned change.
:::

Ask for work

Start each request with what you want and which account, and ask for the result you can check. A few to try:

GoalAsk
See recent calls"Show me the last five conversations, with a one-line summary of each and anything that went wrong."
Explain an answer"In session [session_id], why did the agent offer a callback instead of booking? Use the logs."
Change a setting"Change the greeting attribute to '[new greeting]'. Show me the diff before you push, and don't publish."
Test a change"Run a sandbox chat where a caller asks to book for tomorrow at 3 pm, then show me the logs of each turn."
Publish"List what newo publish would change, then publish only after I say yes."

The assistant reads freely, but asks before every command that changes the account and names the account first. Read what it's about to run before you approve.

Good habits

  • Check the account every time. Before you approve a change, look for the account name in the assistant's message, or ask it to run newo profile.
  • Review before you publish. newo push writes to a pending version that callers don't hear yet. Read the diff, test in the sandbox, then publish.
  • Keep secrets out of the chat. Never paste an API key or a password into the conversation. Neither app needs one when you sign in with newo login.
  • Treat conversations as personal data. Transcripts and logs hold callers' names, numbers, and what they said. Use an app your organization allows for that data.
  • Keep the CLI up to date. When the CLI prints A new version of newo is available, ask the assistant to run npm install --global newo@latest. A version found unsafe stops working until you update.
  • Sign out when you're done on a shared computer. Run newo logout.

Fix problems

SymptomWhat to do
The browser window doesn't open during newo loginOpen the link the assistant shows you. If it still fails, run newo login in your own terminal.
Codex shows network errors on every newo commandAdd the settings in Let Codex reach Newo, or approve the command when Codex asks.
newo commands in Codex worked, then fail with EPERM or a permission errorThe CLI couldn't renew your sign-in because the sandbox blocks ~/.config/newo-cli. Add it to writable_roots (see Let Codex reach Newo), or run newo profile once in your own terminal.
Codex can't save the login, or listen EPERM on port 8766Add the settings in Let Codex reach Newo, or run newo login in your own terminal, then continue in Codex.
The assistant doesn't seem to know the Newo rulesOpen the assistant in the folder where you ran newo init, not a parent or a subfolder.
Claude Code doesn't load the instructionsCheck that CLAUDE.md in the folder contains the line @AGENTS.md. Run newo init again if the files are missing.
The assistant uses a flag that doesn't existAsk it to run newo [command] --help first. Flags change between versions.
Something else goes wrong during setupSee the problems table in Set up the Newo CLI with an AI coding assistant.

Did this page help you?