Skip to content

OverseedAI/viwo

Repository files navigation

viwo-cli

⚑️Fastest way one-shot prompts with Claude Code ⚑

Mentioned in Awesome Claude Code


Ever wanted to test out an idea or fix a bug, but you didn't want to pollute your working branch? Or do you ever get super annoyed by all the questions and permissions Claude asks you?

Well, VIWO (Virtual Workspaces) might just be your solution:

  • Docker-sandboxed environments: In order to use Claude Code with --dangerously-skip-permissions, we are using Docker to sandbox the runtime environment.
  • Git worktrees: Maintain a clean separation between your working branch and Claude's branchβ€”so you can work while Claude works!
  • Ease-of-use: Quickly jump in to a worktree session by opening it in your favourite IDE.
  • Multiple agents: With VIWO, it's extremely easy to spin up multiple agents to go do your task for you.
  • [COMING SOON] GitHub/GitLab integration: Once you're done, let AI handle submitting "your" work for you!
  • [COMING SOON] Improved multiline support: Paste in large amounts of text and play around with your prompt before submitting.
  • [COMING SOON] Recap of changes made: View a recap of the work completed by AI directly inside VIWO CLI.

Demo

Table of Contents

Installation

MacOS & Linux

curl -fsSL https://raw.githubusercontent.com/OverseedAI/viwo/main/install.sh | bash

Windows

irm https://raw.githubusercontent.com/OverseedAI/viwo/main/install.ps1 | iex

Note:

  • You may need to restart your terminal after installation for the PATH changes to take effect.

Quick Start

After installation, initialize your first session:

# Register your Anthropic API key
viwo auth 

# Register a repository
cd /path/to/your/repo
viwo register # viwo register /path/to/your/repo also works

# Start a session
viwo start

# List sessions
viwo list

How it works

The end result is a Claude Code instance in a Docker container. To get there, VIWO takes a git repository, creates a git worktree in a separate directory, then creates a Docker container with a volume mount to that new git worktree. The Docker container then runs a fresh installation of Claude Code in "print" mode with --dangerously-skip-permissions enabled to help you one-shot your prompts.

  • viwo auth stores your API key in a sqlite database in your app data directory. This API key is then provided to the Docker containers that run Claude Code.
  • viwo register stores the repository path and name into the sqlite database for subsequent retrieval.
  • viwo start creates a new git worktree and a Docker container. This container then runs claude -p "YOUR PROMPT".

Security

Running Claude with --dangerously-skip-permissions (DSP) comes with its own risks. The safest way to run Claude with DSP would be isolated virtual machines. VIWO relies on the security of Docker containers to limit the attack surface of AI hackers, but that does not mean Docker containers are inherently impenetrable. You can learn more about how Docker manages the security of their containers here.

πŸš€ Development Guidelines

Prerequisites

  • Bun v1.0 or higher
  • Git
  • Docker (Daemon must be running)

Installation

  1. Clone and install dependencies

    git clone <repository-url>
    cd viwo
    bun install
  2. Link the CLI globally

    cd packages/cli
    bun link
  3. Verify installation

    viwo --help

That's it! No build step required during development. πŸŽ‰

πŸ“¦ Project Structure

viwo/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ core/          # Core SDK (@viwo/core)
β”‚   └── cli/           # CLI tool (@viwo/cli)
└── apps/              # Future applications

πŸ› οΈ Development

Running the CLI

Since this is a Bun monorepo with direct source imports, you can run the CLI immediately without building:

# Option 1: Run directly from source
bun packages/cli/src/cli.ts --help

# Option 2: Use the globally linked command (recommended)
viwo --help

Making Changes

  1. Edit source files in packages/core/src/ or packages/cli/src/
  2. Changes are immediately available - no build step needed!
  3. Run the CLI to test your changes:
    viwo start

The core package uses direct TypeScript source imports - Bun's native TypeScript support makes this possible without compilation during development.

Type Checking

# Check all packages
bun run typecheck

# Check specific package
cd packages/core && bun run typecheck

Testing

# Run tests in core package
cd packages/core && bun test

Code Quality

# Format code
bun run format

# Check formatting
bun run format:check

# Lint code
bun run lint

πŸ“ CLI Usage

Initialize a new session

viwo start

List all sessions

viwo list

πŸ—οΈ Building for Production

While development doesn't require a build step, you can build for production/publishing:

# Build all packages
bun run build

# Build specific package
cd packages/core && bun run build

This creates the dist/ directories with compiled JavaScript and type definitions.

🧹 Cleaning

Remove all build artifacts, caches, and dependencies:

bun run clean

πŸ“š Architecture

Core Package (@viwo/core)

The core package provides:

  • Git worktree management
  • Docker container orchestration
  • AI agent initialization (Claude Code, Cline, Cursor)
  • Session state management with Bun's native SQLite
  • Port allocation

Key Feature: Uses direct source imports - exports TypeScript files directly without a build step during development.

CLI Package (@viwo/cli)

A command-line interface built on top of @viwo/core:

  • Interactive session management
  • Pretty-printed output with colors and tables
  • Progress indicators
  • Comprehensive error handling

Uninstall

Linux & macOS

rm /usr/local/bin/viwo  # or wherever you installed it

Windows

# Remove the binary
Remove-Item "$env:LOCALAPPDATA\Programs\viwo\viwo.exe"

# Remove from PATH (optional)
# Open "Edit environment variables for your account" and remove the viwo directory from PATH

About

Safe way to run Claude Code with --dangerously-skip-permissions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •