@nexight-ai/ojo
v1.0.3
Published
Ojo CLI — login, project management, AI chat, run status queries, workspace sync, and session history
Readme
Ojo CLI
@nexight-ai/ojo is the official command-line tool for Ojo. Log in, manage projects, chat with the AI agent, check run status, fetch the latest project screen, and sync your workspace — all from the terminal.
Install globally via npm:
npm install -g @nexight-ai/ojo
ojo --helpRecommended flow: auth login → chat → query → screen → workspace sync
Authentication
ojo auth login # Web login (opens browser automatically)
ojo auth login --mode web # Explicitly use web mode
ojo auth login --mode device # Device code flow (scan / approve on another device)
ojo auth login --mode access-key --access-key <token> # AccessKey login
ojo auth login --no-open # Print the login URL without opening the browser
ojo auth login --mode device --json # JSON output for automation / agents
ojo auth logout # Log out and clear local credentialsauth login --json returns stable JSON with ok, mode, and mode-specific fields such as loginUrl, verificationUri, userCode, and expiresIn.
Need an AccessKey for --mode access-key? Open the AccessKey manager directly: https://ojo.art/dashboard?openAccessKeyManager=1
Projects
ojo project list # List your projects (default 20 per page)
ojo project list --page-size 50 # Set page size
ojo project list --page-token <token> # Go to next page
ojo project list --favorite # Show only favorited projects
ojo project list --json # JSON outputScreen
Fetch the current prototype preview image for a project.
ojo screen --project-id <projectId>
ojo screen --project-id <projectId> --jsonscreen returns projectId, projectUrl, status, and when available resourceId, resourceMeta, and url.
Chat
Sends a message to the Ojo agent and waits for it to finish before returning the result.
# Create a new project automatically and send a message
ojo chat --message "Build me a landing page"
# Continue an existing project's session
ojo chat --project-id <projectId> --message "Add a dark mode toggle"
# Send via stdin
echo "Build me a landing page" | ojo chat
# JSON output
ojo chat --project-id <projectId> --message "..." --jsonResponse fields: projectId, projectUrl, status (completed | waiting_input)
Query Run Status
Check the latest run status for a project.
ojo query --project-id <projectId>
ojo query --project-id <projectId> --json| Field | Description |
| ------------ | --------------------------------------------- |
| projectId | Project ID |
| projectUrl | Project URL (https://ojo.art/p/<projectId>) |
| status | running | success | fail |
| statusText | Progress description (when running) |
| failure | Structured error details (when fail) |
Workspace Sync
Pull the remote project workspace to your local machine.
# Sync the project bound to the current directory
ojo workspace sync
# Sync by project ID or URL
ojo workspace sync <projectId>
ojo workspace sync https://ojo.art/p/<projectId>
# Write to a specific parent directory
ojo workspace sync <projectId> --path ./my-projects
# JSON output
ojo workspace sync <projectId> --jsonArtifacts are extracted to <project-name>/ojo-prototype inside the target directory.
JSON response fields: projectId, path, workspaceHash
Agent / Automation Notes
chathas two modes: omit--project-idto auto-create a project; pass--project-idto continue an existing session.queryonly needs--project-id; it fetches the latest run automatically and returnsprojectUrl.- Use
workspace syncafterchat/queryto pull updated project files locally.
