Skip to content

Zo Computer

Zo Computer

Zo Computer is a developer-focused, highly scriptable AI agent. Built for power users, it offers complete API access, custom workflows, and the ability to automate complex pharmacy management tasks through code.

Built for Developers

Zo Computer is not just a chat interface; it’s a programmable environment. If you want to automate your pharmacy interactions, integrate Famasi into your own applications, or simply prefer a command-line interface, Zo Computer provides the tools you need.

Key Features:

  • Scriptable Workflows: Write JavaScript or Python scripts to automate orders, checks, and reports.
  • Full API Access: Direct access to the underlying Famasi MCP server APIs.
  • Custom Integrations: Build your own connections to other services (e.g., your calendar, a smart home device).
  • Local Execution: Run scripts on your machine for maximum control and privacy.

Installation

Step 1: Install the CLI

Zo Computer is distributed as a command-line interface (CLI). You can install it using popular package managers.

Terminal window
# Using npm (Node Package Manager)
npm install -g @famasi/zo-computer
# Using Homebrew (macOS/Linux)
brew install famasi/tap/zo-computer
# Using cargo (Rust's package manager)
cargo install zo-computer

Step 2: Authenticate

Once installed, you need to link your Zo Computer instance to your Famasi account.

Terminal window
# Initiate the login process
zo login
# You will be prompted to enter your phone number.
# An OTP will be sent to your device for verification.
# Enter the OTP to complete the authentication.

This process creates a secure authentication token stored locally on your machine at ~/.zo/config.json.

Step 3: Verify Installation

Run a quick diagnostic to ensure everything is set up correctly.

Terminal window
# Check the status of your connection
zo status
# Expected output:
# ✅ Logged in as: +2348012345678
# ✅ MCP Server: Connected
# ✅ API Version: v2.1.0

Usage

Interactive Mode

Start an interactive session with the AI agent. This is useful for one-off queries and exploratory tasks.

Terminal window
zo

This opens a REPL (Read-Eval-Print Loop) where you can type natural language commands or JavaScript code.

> search("Amoxicillin 500mg", { location: "Lekki" })
[ { pharmacy: "GreenCross", price: 2500, ... }, ... ]
> order({ pharmacyId: "PH-123", medicationId: "MED-456", quantity: 2 })
Order ORD-789 placed successfully.

Scripting

The true power of Zo Computer lies in its scripting capabilities. Create a file named order-script.js:

order-script.js
const { search, order } = require('@famasi/zo-computer');
async function main() {
// Search for a specific medication
const results = await search({
query: "Metformin 500mg",
location: "Lagos",
maxPrice: 3000
});
if (results.length > 0) {
// Automatically order from the cheapest pharmacy
const cheapest = results.sort((a, b) => a.price - b.price)[0];
console.log(`Ordering from ${cheapest.pharmacyName} at ₦${cheapest.price}...`);
const newOrder = await order({
pharmacyId: cheapest.pharmacyId,
medicationId: cheapest.medicationId,
quantity: 1,
deliveryType: "delivery"
});
console.log(`Success! Order ID: ${newOrder.orderId}`);
} else {
console.log("Medication not found or too expensive.");
}
}
main();

Run the script:

Terminal window
zo run order-script.js

API Access

For even deeper integration, you can call the Famasi MCP server directly.

Terminal window
# Make a direct API call
curl -X POST https://api.famasi.ai/v2/search \
-H "Authorization: Bearer $(zo token)" \
-H "Content-Type: application/json" \
-d '{"query": "Paracetamol", "location": "Ikeja"}'

The zo token command outputs your current authentication token, which you can use in your own HTTP clients or applications.

Commands

Zo Computer provides a comprehensive set of commands for various tasks.

CommandDescriptionExample
zoStart interactive modezo
zo run <file>Execute a scriptzo run my-script.js
zo search <query>Quick search from CLIzo search "Panadol"
zo order <id>Place a quick orderzo order MED-123
zo statusCheck connection statuszo status
zo tokenGet auth tokencurl ... -H "Bearer $(zo token)"
zo configManage configurationzo config set default.location "Lekki"
zo logsView execution logszo logs --tail 50
zo doctorRun diagnosticszo doctor

Configuration

Zo Computer can be customized to fit your workflow. Configuration is stored in ~/.zo/config.json.

Example Configuration:

{
"auth": {
"phone": "+2348012345678",
"token": "eyJhbGciOiJ..."
},
"defaults": {
"location": "Lekki, Lagos",
"pharmacyId": "PH-456",
"deliveryType": "delivery"
},
"scripts": {
"morning-check": "~/.zo/scripts/check-meds.js",
"weekly-report": "~/.zo/scripts/report.js"
},
"api": {
"endpoint": "https://api.famasi.ai",
"timeout": 30000,
"retries": 3
}
}

You can modify this file directly or use the zo config command:

Terminal window
zo config set defaults.location "Victoria Island, Lagos"
zo config get defaults.location
# Output: Victoria Island, Lagos

Automation Examples

Daily Medication Check

Create a cron job to check your medication supply every morning.

Terminal window
# Edit your crontab
crontab -e
# Add this line to run at 8:00 AM daily
0 8 * * * /usr/local/bin/zo run /home/user/.zo/scripts/morning-check.js >> /home/user/.zo/logs/cron.log 2>&1

morning-check.js:

const { getOrderHistory } = require('@famasi/zo-computer');
async function main() {
const orders = await getOrderHistory({ limit: 5 });
// Custom logic to determine if a refill is needed
const lastOrder = orders[0];
const daysSinceOrder = (Date.now() - new Date(lastOrder.date)) / (1000 * 60 * 60 * 24);
if (daysSinceOrder > 25) {
console.log("⚠️ It's been over 25 days since your last order. Time for a refill!");
// You could add logic here to automatically place an order or send a notification
} else {
console.log("✅ Your medication supply looks good.");
}
}
main();

Price Monitoring

Set up a script to monitor medication prices and alert you when they drop.

const { search } = require('@famasi/zo-computer');
const fs = require('fs');
const MEDICATION = "Amoxicillin 500mg";
const TARGET_PRICE = 2000;
const PRICE_HISTORY_FILE = ".zo/price-history.json";
async function main() {
const results = await search({ query: MEDICATION });
const cheapest = results.sort((a, b) => a.price - b.price)[0];
let history = [];
if (fs.existsSync(PRICE_HISTORY_FILE)) {
history = JSON.parse(fs.readFileSync(PRICE_HISTORY_FILE, 'utf8'));
}
history.push({ date: new Date().toISOString(), price: cheapest.price });
fs.writeFileSync(PRICE_HISTORY_FILE, JSON.stringify(history, null, 2));
if (cheapest.price <= TARGET_PRICE) {
console.log(`🎉 Price alert! ${MEDICATION} is now ₦${cheapest.price} at ${cheapest.pharmacyName}.`);
} else {
console.log(`Current price for ${MEDICATION}: ₦${cheapest.price} (Target: ₦${TARGET_PRICE})`);
}
}
main();

Integration with Other Tools

Zo Computer can be integrated into larger workflows. For example, you can pipe its output to other command-line tools.

Terminal window
# Find the cheapest pharmacy and open it in your browser
zo search "Paracetamol" --json | jq -r '.[0].pharmacyUrl' | xargs open
# Check order status and send a notification if it's delayed
zo status --order ORD-123 | grep "delayed" && osascript -e 'display notification "Your order is delayed" with title "Famasi"'

Troubleshooting

IssueSolution
Command not found: zoEnsure the npm global bin directory is in your PATH. Try npm config get prefix/bin.
Authentication failedRun zo login again. Your token may have expired.
Script execution errorCheck that you have the correct permissions (chmod +x script.js) and that the path is correct.
API timeoutIncrease the timeout in your config: zo config set api.timeout 60000.
Module not foundEnsure you are in the correct directory or have installed the necessary npm packages in your script’s folder.

Next steps

  • OpenClaw - A privacy-focused agent with a local-first approach.
  • Hermes - A professional-grade agent for healthcare providers.
  • NemoClaw - A mobile-centric agent for managing health on the go.