pando

command module
v0.110.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 2 Imported by: 0

README

⌬ Pando

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

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) 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 OpenAI, Anthropic Claude, Google Gemini, AWS Bedrock, Groq, Azure OpenAI, and OpenRouter
  • 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

Installation

Using Go
go install github.com/digiogithub/pando@latest
Building from Source
git clone https://github.com/your-repo/pando.git
cd pando
go build -o pando
./pando

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 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

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

build

Compila el binario de pando.

# 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 .
rm -f *.log
build-and-copy

Compila el binario de pando y lo copia a ~/bin/.

# Get version from last git tag
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "dev")
go build -ldflags "-s -w -X github.com/digiogithub/pando/internal/version.Version=$VERSION" -o pando .
rm -f ~/bin/pando
upx -1 pando
cp pando ~/bin/pando
release

Compila binarios para múltiples plataformas (Linux x64, Windows x64, macOS aarch64) y genera releases comprimidos en la carpeta dist/.

# Create dist folder
mkdir -p dist

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

# Function to build and zip
build_and_zip() {
    local os=$1
    local arch=$2
    local suffix=$3
    local ext=$4

    echo "Building for $os-$arch..."
    GOOS=$os GOARCH=$arch go build -ldflags "-X github.com/digiogithub/pando/internal/version.Version=$VERSION" -o dist/pando-$suffix$ext .

    echo "Zipping pando-$suffix$ext..."
    cd dist
    zip pando-$suffix.zip pando-$suffix$ext
    rm pando-$suffix$ext
    cd ..
}

# Linux x64
build_and_zip linux amd64 linux-x64 ""

# Windows x64
build_and_zip windows amd64 windows-x64 ".exe"

# macOS aarch64
build_and_zip darwin arm64 darwin-arm64 ""

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
config
Package config manages application configuration from various sources.
Package config manages application configuration from various sources.
db
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/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/treesitter
Package treesitter provides AST walking and symbol extraction utilities.
Package treesitter provides AST walking and symbol extraction utilities.
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.
tui
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