@onebtn/cli
v0.2.3
Published
OneFlow Pro AI assistant — MCP server + workspace scaffolder for Claude Code, Cursor, Windsurf, and VS Code
Maintainers
Readme
@onebtn/cli
OneFlow Pro AI Assistant for Claude Code, Cursor, Windsurf, and VS Code — an MCP server that lets your AI coding agent manage products, orders, customers, pages, and automations on the OneFlow Pro platform using plain business language.
Install
npm install -g @onebtn/cliRequires Node.js ≥ 18.
Quick start
ob-init # scaffold a workspace at ~/ob (or pass a path)
cd ~/ob
# open the workspace in your AI tool of choiceob-init creates:
| File | Purpose |
|---|---|
| CLAUDE.md | Instructions for Claude Code |
| .cursorrules | Instructions for Cursor |
| .windsurfrules | Instructions for Windsurf |
| .github/copilot-instructions.md | Instructions for VS Code Copilot |
| .claude/settings.json, .vscode/mcp.json | MCP server registration |
| .ob/config.json | OneFlow Pro server URLs |
The four AI-prompt files start from a bundled snapshot and auto-refresh from the OneFlow Pro server on every session (Claude Code) or via ob-cli refresh (other editors).
Using with Claude Desktop
Claude Desktop (the chat app, including its Claude Code mode) doesn't read project-level .mcp.json — it loads MCP servers from a central config file. Add ob there once:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"ob": {
"command": "npx",
"args": ["-y", "-p", "@onebtn/cli", "ob-cli"]
}
}
}Fully quit Claude Desktop (⌘Q on Mac, not just close the window) and relaunch.
Standalone Claude Code (CLI) reads .mcp.json from the workspace, so no extra step is needed there — ob-init already wires it up.
First session
In your AI tool, ask the agent to run ob_whoami. It will:
- Show your CLI version and session state.
- Prompt for login if you're not authenticated.
- Pull the latest AI assistant instructions from the server and inject them into the conversation.
After logging in (ob_login), select an organization (ob_select_org) — this loads the entity-type catalog so the assistant can work with your data model.
MCP tools
The package exposes five tools to MCP-aware clients:
| Tool | Purpose |
|---|---|
| ob_whoami | Session info + authoritative AI instructions |
| ob_login | Authenticate with email + password |
| ob_select_org | Pick an organization to work in |
| ob_execute_steps | Run OBP automation DSL steps (read/write/query/loops/conditions) |
| ob_switch_env | Switch between demo and prod environments |
CLI commands
ob-cli # start the MCP server (used by your AI client; you rarely run this directly)
ob-cli refresh # re-fetch the AI prompt from the server and rewrite local prompt files
ob-cli help # show help
ob-init [dir] # scaffold a new workspace (default: ~/ob)ob-cli refresh is for users who don't use Claude Code — Cursor, Windsurf, and Copilot read the prompt from static files, so a refresh updates them in one shot.
Configuration
The workspace's .ob/config.json controls which OneFlow Pro server you talk to:
{
"servers": {
"prod": "https://oneflowpro.shaps.co.il",
"demo": "https://devserver.tailae99dc.ts.net"
},
"current_env": "demo"
}Switch in-session with ob_switch_env.
How prompt updates work
The AI assistant's operating instructions live on the OneFlow Pro server. Every ob_whoami call fetches them (with 5-minute cache + ETag) and:
- Returns them inline so Claude Code uses them directly.
- Writes them to
CLAUDE.md/.cursorrules/.windsurfrules/.github/copilot-instructions.mdso non-MCP-aware editors stay current too.
So when the platform team updates how the assistant should behave, every installed CLI picks it up on the next session — no npm update, no re-init.
License
MIT
