Back/Product/Claude
AdvancedProductClaude

Design an Agent-Friendly CLI to Automate SaaS Product Onboarding

Prepare your product for an agent-first world. This workflow explains how to build a Command Line Interface (CLI) that AI agents can use autonomously, even for complex flows that require human interaction like email verification.

Design an Agent-Friendly CLI to Automate SaaS Product Onboarding

Tools Used

Claude

Anthropic AI assistant

02Step-by-Step Guide
1

Start with a User Prompt

The workflow begins when a user gives an AI agent a high-level goal that requires using your product, such as installing it on their website.

Prompt:
Install Intercom on my website.
2

Build a CLI for the Workflow

Develop a Command Line Interface (CLI) for your product that the agent can invoke to perform core actions like signing up or installing.

3

Embed 'Hints' for the Agent

At steps requiring human interaction (e.g., email verification), program the CLI's help text or output to include a 'hint' suggesting the next action for the agent.

Prompt:
well, maybe you could check email...
Pro Tip: This hint bridges the gap between automated steps and those that typically require a human.
4

Provide Tools for Action

Ensure the agent has access to the necessary tools (e.g., an email API client) to act on the hint, read the required information (like a verification code), and pass it back to the CLI to complete the workflow.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready