cliclaw

n8n community nodes for running Codex CLI remotely over SSH, plus a generic SSH helper node

Package Information

Released: 5 mo ago
Downloads: 9 weekly / 49 monthly
Latest Version: 0.2.2
Author: cyrus

Documentation

n8n-nodes-cliclaw

n8n-nodes-cliclaw provides two community nodes for n8n:

  • cliclaw: connects to a remote host over SSH and runs codex exec
  • cliclaw SSH: keeps a generic SSH node for command execution and file transfer

The main purpose of this package is to let n8n call Codex CLI on a remote machine where codex is already installed and authenticated.

Installation

Local installation

npm install n8n-nodes-cliclaw

n8n Community Nodes

  1. Open Settings > Community Nodes
  2. Select Install
  3. Enter n8n-nodes-cliclaw
  4. Confirm the installation

What cliclaw does

The cliclaw node wraps the Codex CLI command below over SSH:

codex exec [options] "your prompt"
codex exec resume --last [options] "optional follow-up prompt"
codex exec resume <session-id> [options] "optional follow-up prompt"

It is designed for non-interactive automation. For remote workflows, this is the correct Codex CLI entry point instead of slash commands, because slash commands are intended for interactive sessions.

The node currently exposes these Codex CLI capabilities:

  • new codex exec sessions
  • codex exec resume --last
  • codex exec resume <session-id>
  • --cd
  • --model
  • -c model_reasoning_effort=...
  • -c approval_policy=...
  • --sandbox
  • --json
  • --image
  • --output-last-message
  • extra raw arguments

Remote host prerequisites

The SSH target machine should already have:

  1. codex installed and available in PATH, or an absolute binary path you can provide
  2. valid Codex authentication on that host
  3. permission to access the remote working directory and any remote image paths you pass in

Each SSH credential now includes a Remote OS single-select field:

  • Linux
  • macOS
  • Windows

The node uses this to wrap the remote command correctly before calling Codex CLI:

  • Linux and macOS: bash -lc 'export PATH="$HOME/.local/bin:$PATH" && codex exec ...'
  • Windows: powershell -NoProfile -Command 'codex exec ...'

For resume mode, codex exec resume supports a smaller option set than a new codex exec run. The node applies the remote working directory in the shell wrapper before running codex exec resume.

Example

Use the cliclaw node with:

  • Host: your remote server
  • Username: your SSH user
  • Codex Binary: codex
  • Session Mode: New Session
  • Remote Working Directory: /srv/project
  • Model: gpt-5.4
  • Reasoning Effort: medium
  • Prompt: Review the repo and fix the failing tests
  • JSON Output: enabled

The node returns:

  • code
  • signal
  • stdout
  • stderr
  • exitCode
  • success
  • command
  • sessionMode
  • threadId
  • message
  • usage when --json emits a turn.completed event
  • parsedEvents when JSON output is enabled
  • parseErrors when a JSON output line cannot be parsed

Generic SSH node

cliclaw SSH is still available when you need plain SSH commands, uploads, or downloads outside Codex CLI usage.

Development

pnpm install
pnpm build
pnpm lint

References

Discussion