This document provides a comprehensive guide to using the Newtype-Profile CLI tools.
Newtype-Profile provides CLI tools accessible via the bunx newtype-profile command. The CLI supports various features including plugin installation, environment diagnostics, and session execution.
# Basic execution (displays help)
bunx newtype-profile
# Or run with npx
npx newtype-profile| Command | Description |
|---|---|
install |
Interactive Setup Wizard |
doctor |
Environment diagnostics and health checks |
run |
OpenCode session runner |
auth |
Google Antigravity authentication management |
version |
Display version information |
An interactive installation tool for initial Oh-My-OpenCode setup. Provides a beautiful TUI (Text User Interface) based on @clack/prompts.
bunx oh-my-opencode install- Provider Selection: Choose your AI provider from Claude, ChatGPT, or Gemini.
- API Key Input: Enter the API key for your selected provider.
- Configuration File Creation: Generates
opencode.jsonornewtype-profile.jsonfiles. - Plugin Registration: Automatically registers the newtype-profile plugin in OpenCode settings.
| Option | Description |
|---|---|
--no-tui |
Run in non-interactive mode without TUI (for CI/CD environments) |
--verbose |
Display detailed logs |
Diagnoses your environment to ensure Newtype-Profile is functioning correctly. Performs 17+ health checks.
bunx oh-my-opencode doctor| Category | Check Items |
|---|---|
| Installation | OpenCode version (>= 1.0.150), plugin registration status |
| Configuration | Configuration file validity, JSONC parsing |
| Authentication | Anthropic, OpenAI, Google API key validity |
| Dependencies | Bun, Node.js, Git installation status |
| Tools | LSP server status, MCP server status |
| Updates | Latest version check |
| Option | Description |
|---|---|
--category <name> |
Check specific category only (e.g., --category authentication) |
--json |
Output results in JSON format |
--verbose |
Include detailed information |
newtype-profile doctor
┌──────────────────────────────────────────────────┐
│ Newtype-Profile Doctor │
└──────────────────────────────────────────────────┘
Installation
✓ OpenCode version: 1.0.155 (>= 1.0.150)
✓ Plugin registered in opencode.json
Configuration
✓ newtype-profile.json is valid
⚠ agents.writer: using default model
Authentication
✓ Anthropic API key configured
✓ OpenAI API key configured
✗ Google API key not found
Dependencies
✓ Bun 1.2.5 installed
✓ Node.js 22.0.0 installed
✓ Git 2.45.0 installed
Summary: 10 passed, 1 warning, 1 failed
Executes OpenCode sessions and monitors task completion.
bunx oh-my-opencode run [prompt]| Option | Description |
|---|---|
--enforce-completion |
Keep session active until all TODOs are completed |
--timeout <seconds> |
Set maximum execution time |
Manages Google Antigravity OAuth authentication. Required for using Gemini models.
# Login
bunx oh-my-opencode auth login
# Logout
bunx oh-my-opencode auth logout
# Check current status
bunx oh-my-opencode auth statusThe CLI searches for configuration files in the following locations (in priority order):
- Project Level:
.opencode/newtype-profile.json - User Level:
~/.config/opencode/newtype-profile.json
Configuration files support JSONC (JSON with Comments) format. You can use comments and trailing commas.
# Update OpenCode
npm install -g opencode@latest
# or
bun install -g opencode@latest# Reinstall plugin
bunx newtype-profile install# Diagnose with detailed information
bunx newtype-profile doctor --verbose
# Check specific category only
bunx newtype-profile doctor --category authenticationUse the --no-tui option for CI/CD environments.
# Run doctor in CI environment
bunx newtype-profile doctor --no-tui --json
# Save results to file
bunx newtype-profile doctor --json > doctor-report.jsonsrc/cli/
├── index.ts # Commander.js-based main entry
├── install.ts # @clack/prompts-based TUI installer
├── config-manager.ts # JSONC parsing, multi-source config management
├── doctor/ # Health check system
│ ├── index.ts # Doctor command entry
│ └── checks/ # 17+ individual check modules
├── run/ # Session runner
└── commands/auth.ts # Authentication management
- Create
src/cli/doctor/checks/my-check.ts:
import type { DoctorCheck } from "../types"
export const myCheck: DoctorCheck = {
name: "my-check",
category: "environment",
check: async () => {
// Check logic
const isOk = await someValidation()
return {
status: isOk ? "pass" : "fail",
message: isOk ? "Everything looks good" : "Something is wrong",
}
},
}- Register in
src/cli/doctor/checks/index.ts:
export { myCheck } from "./my-check"
{ // Agent configuration "sisyphus_agent": { "disabled": false, "planner_enabled": true, }, /* Category customization */ "categories": { "visual-engineering": { "model": "google/gemini-3-pro-preview", }, }, }