In modern development, the distance between an idea and a deployed, scalable application is filled with complexity. Containerization, serverless functions, CI/CD pipelines, and infrastructure management can turn a simple business logic task into a major engineering project. This is especially true when building AI-powered systems and agentic workflows.
What if you could bypass that complexity? What if you could define, test, and deploy powerful agentic workflows directly from the comfort of your terminal?
Enter cli.do. Our powerful command-line interface (CLI) is designed to do just that. It brings your business logic directly into your terminal, turning complex processes into simple, intuitive commands. We believe in Business-as-Code, and with the .do CLI, you can build and manage Services-as-Software faster than ever before.
This guide will walk you through deploying your very first AI agentic workflow—from an empty directory to a live API endpoint—in just a few minutes.
Think of an agentic workflow as a series of automated, intelligent steps designed to accomplish a specific business task. This could be anything from onboarding a new customer and sending a welcome email, to analyzing support tickets with an LLM and routing them to the correct department. cli.do gives you the tools to build, manage, and deploy these workflows as robust, scalable services.
Before we start, make sure you have the following:
First, let's get the core developer tool installed on your system. Open your terminal and run the following command using npm:
npm install -g @do/cli
We also provide native binaries for Windows, macOS, and Linux on our website if you prefer.
Once the installation is complete, you need to link the CLI to your cli.do account. This is a simple, one-time operation:
do login
This command will open a browser window, asking you to authorize the CLI. Once you approve it, your terminal is authenticated and ready to go.
Let's create a simple agent that takes a user's name and returns a personalized greeting. The .do CLI can create a boilerplate structure for us.
In your terminal, create a new directory and initialize your workflow:
mkdir my-first-agent && cd my-first-agent
do workflow init .
This will create a few files in your directory, including a workflow.do.yaml for configuration and an index.ts where your core logic will live. This is Business-as-Code in action—your entire service is defined in files you can version control and share with your team.
Now for the fun part. Open the index.ts file in your favorite code editor. Let's write the logic for our greeting agent. The default file will have a simple structure. Replace it with the following TypeScript code:
// index.ts - The logic for our greeting agent
interface Input {
name: string;
}
interface Output {
message: string;
}
export async function run(input: Input): Promise<Output> {
console.log(`Agent received request for: ${input.name}`);
const greeting = `Hello, ${input.name}! Welcome to the world of agentic workflows, powered by cli.do.`;
return { message: greeting };
}
This code defines a function that accepts an object with a name property and returns an object with a message. It's simple, but it's a fully functional microservice.
This is where the magic happens. With traditional infrastructure, you'd now be thinking about Dockerfiles, Kubernetes manifests, or cloud function configurations. With cli.do, you just need one command.
From within your my-first-agent directory, run the deploy command:
do workflow deploy . --name="customer-onboarding-v2"
The CLI will take over, providing you with real-time feedback as it prepares and deploys your agentic workflow.
// Output:
// ✓ Authenticating...
// ✓ Packaging workflow files...
// ✓ Uploading package (1.2MB)...
// ✓ Deploying agent 'customer-onboarding-v2'...
// ✓ Deployment successful!
//
// API Endpoint: https://api.do/workflows/customer-onboarding-v2
// Status: Active
Congratulations! Your agent is now live. In seconds, cli.do handled the packaging, uploading, and provisioning of all necessary infrastructure. You have a scalable, secure API endpoint ready to be used.
Your workflow is deployed, but let's prove it works. You can use any HTTP client like curl or Postman, but the .do CLI also provides a convenient way to invoke your workflows directly.
Run the following command to send a test payload:
do workflow invoke customer-onboarding-v2 --payload '{"name": "Awesome Developer"}'
You'll get an immediate response from your live agent:
{
"message": "Hello, Awesome Developer! Welcome to the world of agentic workflows, powered by cli.do."
}
It's that simple. You've gone from an idea to a fully deployed and functional service without ever leaving your terminal.
This "Hello, Agent" example is just the beginning. The .do CLI is a complete developer tool built for professional teams and production workloads. Here's what you can explore next:
Ready to bring your business logic to the terminal? Dive in and discover how cli.do can transform your development process.
Q: What can I do with the .do CLI?
A: The .do CLI allows you to create, manage, deploy, and monitor your agentic workflows directly from your terminal. It's the fastest way to integrate Business-as-Code into your development lifecycle.
Q: Can I use the CLI in my CI/CD pipelines?
A: Absolutely. The .do CLI is designed for automation and is a perfect fit for any CI/CD pipeline, such as GitHub Actions, GitLab CI, or Jenkins. You can automate the deployment and management of your services with just a few lines of script.
Q: Does the CLI support environment management and secrets?
A: Yes, you can manage everything from authentication and environment variables to logs and versioning. The CLI provides full control over your agentic workflows and their configurations.