pando

command module
v0.411.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 2 Imported by: 0

README

木 Pando

Fork of OpenCode by Kujtim Hoxha. Maintained by José F. Rives.

pando mascot

A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal.

Overview

Pando is a Go-based CLI application that brings AI assistance to your terminal. It provides a TUI (Terminal User Interface), PWA WebUI and desktop application for interacting with various AI models to help with coding tasks, debugging, and more.

Features

  • Interactive TUI: Built with Bubble Tea for a smooth terminal experience
  • Multiple AI Providers: Support for Github copilot, OpenAI, Anthropic Claude, Google Gemini, AWS Bedrock, Groq, Azure OpenAI, Ollama, Llama.cpp, and OpenRouter. Also any OpenAI compatible provider, including self-hosted models with the local provider.
  • Session Management: Save and manage multiple conversation sessions
  • Tool Integration: AI can execute commands, search files, and modify code
  • Vim-like Editor: Integrated editor with text input capabilities
  • Persistent Storage: SQLite database for storing conversations and sessions
  • LSP Integration: Language Server Protocol support for code intelligence
  • File Change Tracking: Track and visualize file changes during sessions
  • External Editor Support: Open your preferred editor for composing messages
  • Named Arguments for Custom Commands: Create powerful custom commands with multiple named placeholders
  • Configuration: Supports both JSON and TOML configuration files
  • PWA WebUI: Access Pando through a web interface for a more visual experience in React (embedded into the binary). Access remotely or locally via browser. Perfect team with Tailscale or Zerotier distributed vpn for remote access.
    • Code Editor: Using the same component to VisualStudio Code's editor, with syntax highlighting and LSP features.
    • File Explorer: Browse and search project files with an integrated file explorer.
    • Session History: View and manage past conversations in a dedicated session history panel.
    • Real-time Updates: See AI responses and tool outputs in real-time with WebSockets.
  • Desktop Application: Run Pando as a native desktop app using Wails (embedded into the binary)
  • Agent Client Protocol (ACP): Use Pando as an AI coding assistant directly in compatible editors like VS Code, JetBrains IDEs, and Zed
  • LLM Proxy Support: Configure Pando to be used as a proxy for LLM API requests, allowing you to route requests through Pando for additional processing or logging
  • MCP Server: Start Pando as an MCP server to allow external clients to connect and interact with it using the Model Client Protocol
  • ICP and inter-process communication: Pando autodiscover other Pando instances running on the same machine and can communicate with them using a custom inter-process communication protocol, allowing for distributed AI assistance across multiple terminals or projects.

Installation

Install from binaries

Installer script for windows (copy into powershell)

iex (irm https://raw.githubusercontent.com/digiogithub/pando/main/scripts/install-windows.ps1)

Installer in linux

curl -fsSL https://raw.githubusercontent.com/digiogithub/pando/main/scripts/install-linux.sh | bash

In OSX best download the release of pkg (universal binary) that installs .app and launcher and icons

Using Go
go install github.com/digiogithub/pando@latest
Building from Source
git clone https://github.com/your-repo/pando.git
cd pando
cd web-ui && bun install && bun run build:embedded && cd ..
go build -o pando
./pando app

Configuration

Pando looks for configuration in the following locations:

  • $HOME/.pando.json or $HOME/.pando.toml
  • $XDG_CONFIG_HOME/pando/.pando.json or $XDG_CONFIG_HOME/pando/.pando.toml
  • ./.pando.json or ./.pando.toml (local directory)

Both JSON and TOML formats are supported. Pando auto-detects the format based on the file extension.

Environment Variables

You can configure Pando using environment variables (prefixed with PANDO_ for app-specific settings):

Environment Variable Purpose
ANTHROPIC_API_KEY For Claude models
OPENAI_API_KEY For OpenAI models
GEMINI_API_KEY For Google Gemini models
GITHUB_TOKEN For Github Copilot models
VERTEXAI_PROJECT For Google Cloud VertexAI (Gemini)
VERTEXAI_LOCATION For Google Cloud VertexAI (Gemini)
GROQ_API_KEY For Groq models
AWS_ACCESS_KEY_ID For AWS Bedrock (Claude)
AWS_SECRET_ACCESS_KEY For AWS Bedrock (Claude)
AWS_REGION For AWS Bedrock (Claude)
AZURE_OPENAI_ENDPOINT For Azure OpenAI models
AZURE_OPENAI_API_KEY For Azure OpenAI models (optional when using Entra ID)
AZURE_OPENAI_API_VERSION For Azure OpenAI models
LOCAL_ENDPOINT For self-hosted models
PANDO_DEV_DEBUG Enable dev debug mode (true)
SHELL Default shell to use (if not specified in config)
Configuration File Structure (JSON)
{
  "data": {
    "directory": ".pando"
  },
  "providers": {
    "anthropic": {
      "apiKey": "your-api-key",
      "disabled": false
    }
  },
  "agents": {
    "coder": {
      "model": "claude-3.7-sonnet",
      "maxTokens": 5000
    }
  },
  "shell": {
    "path": "/bin/bash",
    "args": ["-l"]
  },
  "mcpServers": {},
  "lsp": {},
  "debug": false,
  "autoCompact": true
}
Configuration File Structure (TOML)
[data]
directory = ".pando"

[providers.anthropic]
apiKey = "your-api-key"
disabled = false

[agents.coder]
model = "claude-3.7-sonnet"
maxTokens = 5000

[shell]
path = "/bin/bash"
args = ["-l"]

debug = false
autoCompact = true

Usage

# Start Pando
pando

# Start Pando as an MCP server (stdio + HTTP /mcp)
pando mcp-server

# Start with debug logging
pando -d

# Start with a specific working directory
pando -c /path/to/project

# Run a single prompt in non-interactive mode
pando -p "Explain the use of context in Go"

# Get response in JSON format
pando -p "Explain the use of context in Go" -f json

# Check for a newer compatible GitHub release
pando update --check

# Update the current binary in place
pando update

# Disable one MCP transport if needed
pando mcp-server --no-stdio
pando mcp-server --no-http

When Pando starts from a released semantic-version build, it also performs a short background update check and prints a notice if a newer compatible release is available.

Custom Commands

Custom commands are predefined prompts stored as Markdown files:

  1. User Commands (prefixed with user:): $XDG_CONFIG_HOME/pando/commands/ or $HOME/.pando/commands/
  2. Project Commands (prefixed with project:): <PROJECT DIR>/.pando/commands/

Architecture

  • cmd: Command-line interface using Cobra
  • internal/app: Core application services
  • internal/config: Configuration management
  • internal/db: Database operations and migrations
  • internal/llm: LLM providers and tools integration
  • internal/tui: Terminal UI components and layouts
  • internal/logging: Logging infrastructure
  • internal/message: Message handling
  • internal/session: Session management
  • internal/lsp: Language Server Protocol integration

Acknowledgments

Pando is a fork of OpenCode, originally created by Kujtim Hoxha.

Special thanks to:

Tasks

tag

Genera una nueva tag

interactive:true

git tag --sort=creatordate | tail -n 5
git tag $(gum input)
git push origin --tags
build-webui

Compiles the webui

# Build embedded web-ui assets
cd web-ui && bun install && bun run build:embedded && cd ..
build-desktop

Compiles the desktop wails wrapper

make desktop-build
make desktop-embed
build

Compiles the binary

requires: build-webui, build-desktop

# Get version from last git tag
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "dev")
#go build -ldflags "-X github.com/digiogithub/pando/internal/version.Version=$VERSION" -o pando .
make build
rm -f *.log
build-and-copy

Compile the working binary and copy to the binary path ~/bin/.

requires: build

rm -f ~/bin/pando
upx -1 pando
cp pando ~/bin/pando
rm -f *.upx
release

Compiles the binaries for the different platforms (Linux x64, Windows x64, macOS aarch64) and zip them into dist/.

# Create dist folder
mkdir -p dist

# Build embedded web-ui assets
cd web-ui && bun install && bun run build:embedded && cd ..

# Get version from last git tag
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "dev")

# Linux x64
make release-linux-amd64
# Linux arm64
make release-linux-arm64

# Windows x64
make release-windows-amd64

# macOS aarch64
make release-darwin-arm64
# macOS x64
make release-darwin-amd64

ssh mac-mini-de-digio "export PATH=\$PATH:/usr/local/bin:~/.bun/bin:/opt/homebrew/bin/:~/go/bin && cd ~/www/MCP/Pando/pando && git pull origin main && git fetch origin --tags && rm -rf dist && mkdir -p dist && xc build && make release-darwin-arm64 && make release-darwin-amd64 && bash scripts/build-macosx-app"
scp mac-mini-de-digio:~/www/MCP/Pando/pando/dist/*.zip dist/

echo "Release builds completed in dist/"

ACP Support

Pando supports the Agent Client Protocol, allowing it to be used directly in compatible editors as an AI coding assistant.

Quick Start

Run Pando as an ACP server (stdio mode, for editors):

pando acp
Editor Configuration
VS Code

Add to your settings.json:

{
  "agent_servers": {
    "Pando": {
      "command": "pando",
      "args": ["acp"]
    }
  }
}
Zed

Add to ~/.config/zed/settings.json:

{
  "agent_servers": {
    "Pando": {
      "command": "pando",
      "args": ["acp"]
    }
  }
}
JetBrains IDEs

Add to your acp.json:

{
  "agent_servers": {
    "Pando": {
      "command": "/path/to/pando",
      "args": ["acp"]
    }
  }
}
ACP Configuration

Configure ACP behavior in .pando.toml:

[acp]
enabled = true
max_sessions = 10
idle_timeout = "30m"
log_level = "info"
auto_permission = false  # set true for CI/batch environments
Management Commands
# Start ACP server (stdio, for editors)
pando acp

# Start with explicit flags
pando acp start --debug --cwd /path/to/project

# Check server status (HTTP mode)
pando acp status

# List active sessions
pando acp sessions

# View server statistics
pando acp stats

# Stop server
pando acp stop
Client Examples

Examples are provided for:

  • Go client: examples/acp-client/go/
  • Python client: examples/acp-client/python/
Documentation

For comprehensive documentation, see docs/acp-server.md

Features:

  • Stdio transport for editor subprocess mode
  • HTTP+SSE transport for real-time updates
  • Multiple concurrent sessions
  • Security boundaries (path validation)
  • Permission system for tool execution
  • Auto-approval mode for trusted environments

License

Pando is licensed under the MIT License. See the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
schema command
internal
api
app
commands
Package commands provides a shared registry of slash commands used across ACP, TUI, and WebUI interfaces.
Package commands provides a shared registry of slash commands used across ACP, TUI, and WebUI interfaces.
config
Package config manages application configuration from various sources.
Package config manages application configuration from various sources.
db
desktop
Package desktop contains the Wails desktop application wrapper for Pando.
Package desktop contains the Wails desktop application wrapper for Pando.
ipc
ipc/bridge
Package bridge connects in-process pubsub events to the ZMQ Bus, enabling real-time event broadcasting to all connected Pando instances and observers.
Package bridge connects in-process pubsub events to the ZMQ Bus, enabling real-time event broadcasting to all connected Pando instances and observers.
ipc/changepub
Package changepub publishes write-change events on the IPC PUB socket after every successful DB write on the primary instance, allowing secondaries to invalidate caches and refresh views without polling.
Package changepub publishes write-change events on the IPC PUB socket after every successful DB write on the primary instance, allowing secondaries to invalidate caches and refresh views without polling.
ipc/dbproxy
Package dbproxy provides a db.Querier implementation that transparently routes write operations while keeping reads fast.
Package dbproxy provides a db.Querier implementation that transparently routes write operations while keeping reads fast.
ipc/failover
Package failover monitors primary liveness and promotes a secondary instance when the primary dies or shuts down gracefully.
Package failover monitors primary liveness and promotes a secondary instance when the primary dies or shuts down gracefully.
ipc/runtime
Package runtime encapsulates the unified IPC bootstrap sequence that every Pando entrypoint must follow: derive ports, try the lock, open RW or RO DB, and wire services accordingly.
Package runtime encapsulates the unified IPC bootstrap sequence that every Pando entrypoint must follow: derive ports, try the lock, open RW or RO DB, and wire services accordingly.
ipc/writecoordinator
Package writecoordinator serialises all SQLite write operations through a single goroutine, eliminating concurrent write contention on the primary instance and providing a natural chokepoint for metrics and backpressure.
Package writecoordinator serialises all SQLite write operations through a single goroutine, eliminating concurrent write contention on the primary instance and providing a natural chokepoint for metrics and backpressure.
llm/evaluatortools
Package evaluatortools provides MCP tool wrappers for Pando's self-improvement evaluator subsystem.
Package evaluatortools provides MCP tool wrappers for Pando's self-improvement evaluator subsystem.
lsp
Generated code.
Generated code.
mesnada/acp
Package acp provides types and utilities for working with the Agent Client Protocol.
Package acp provides types and utilities for working with the Agent Client Protocol.
mesnada/agent
Package agent handles spawning and managing CLI agent processes.
Package agent handles spawning and managing CLI agent processes.
mesnada/config
Package mesnadaconfig handles Mesnada application configuration.
Package mesnadaconfig handles Mesnada application configuration.
mesnada/orchestrator
Package orchestrator coordinates agent tasks and dependencies.
Package orchestrator coordinates agent tasks and dependencies.
mesnada/persona
Package persona handles loading and managing persona definitions.
Package persona handles loading and managing persona definitions.
mesnada/persona/builtin
Package builtin provides embedded built-in persona definitions.
Package builtin provides embedded built-in persona definitions.
mesnada/server
Package server implements the MCP server with HTTP Streamable and stdio transports.
Package server implements the MCP server with HTTP Streamable and stdio transports.
mesnada/store
Package store provides task persistence and retrieval.
Package store provides task persistence and retrieval.
rag
Package rag provides the RemembrancesService that bundles KB, Events, and Code indexing.
Package rag provides the RemembrancesService that bundles KB, Events, and Code indexing.
rag/code
Package code provides tree-sitter based code indexing with semantic search.
Package code provides tree-sitter based code indexing with semantic search.
rag/embeddings
Package embeddings provides a unified interface for generating embeddings from multiple providers (OpenAI, Google, Ollama, Anthropic/Voyage).
Package embeddings provides a unified interface for generating embeddings from multiple providers (OpenAI, Google, Ollama, Anthropic/Voyage).
rag/events
Package events provides temporal event storage with semantic search capabilities.
Package events provides temporal event storage with semantic search capabilities.
rag/kb
Package kb provides a knowledge base system for storing and searching documents.
Package kb provides a knowledge base system for storing and searching documents.
rag/proxy
Package proxy provides the server-side IPC dispatcher for Remembrances write operations (KB, Events, Code indexing).
Package proxy provides the server-side IPC dispatcher for Remembrances write operations (KB, Events, Code indexing).
rag/treesitter
Package treesitter provides AST walking and symbol extraction utilities.
Package treesitter provides AST walking and symbol extraction utilities.
remoteview
Package remoteview provides types for observing and controlling remote Pando instances over the IPC ZeroMQ bus.
Package remoteview provides types for observing and controlling remote Pando instances over the IPC ZeroMQ bus.
runtime
Package runtime defines abstractions for executing commands and accessing the filesystem in different isolation environments (host, docker, podman, etc.).
Package runtime defines abstractions for executing commands and accessing the filesystem in different isolation environments (host, docker, podman, etc.).
snapshot
Package snapshot provides a service for capturing and comparing point-in-time snapshots of the working directory file system.
Package snapshot provides a service for capturing and comparing point-in-time snapshots of the working directory file system.
tlsutil
Package tlsutil generates and manages TLS certificates for Pando's HTTP server.
Package tlsutil generates and manages TLS certificates for Pando's HTTP server.
toolmeta
Package toolmeta provides shared tool-call metadata helpers used by both the ACP prompt handler and the WebUI SSE handler.
Package toolmeta provides shared tool-call metadata helpers used by both the ACP prompt handler and the WebUI SSE handler.
tui
tui/components/instances
Package instances provides a Bubble Tea component for browsing and interacting with remote Pando instances in a two-panel layout:
Package instances provides a Bubble Tea component for browsing and interacting with remote Pando instances in a two-panel layout:
pkg
mesnada/models
Package models defines the core domain types for the mesnada orchestrator.
Package models defines the core domain types for the mesnada orchestrator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL