Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

pze/agent-openbox

Repository files navigation

Agent-OpenBox - Agent Configuration Management CLI

A Rust CLI tool for flexible agent configuration management that helps you manage prompts, workflows, and commands across multiple LLM agent ecosystems (Copilot, Windsurf, Forge, etc.).

Features

  • Alias Management: Abstract configuration layer using "aliases" that map to agent-specific concepts
  • Multi-Agent Support: Generate files for different agents (Copilot prompts, Windsurf workflows, Forge commands) from shared aliases
  • Template-Driven Generation: Uses MiniJinja templates to render agent-specific outputs
  • TOML Configuration: Human-readable configuration format with validation
  • CLI Interface: Comprehensive command-line interface for all operations
  • Diff and Lint: Validate aliases and compare with generated files
  • Project Scaffolding: Initialize new projects with directory structure

Quick Start

# Install (or download binary from releases)
cargo install --path .

# Initialize a new project
agent-openbox init

# Add an alias
agent-openbox alias add code_review

# Edit the alias file (configs/base/aliases/code_review.toml)
# Then generate agent-specific files
agent-openbox alias generate

# List all aliases
agent-openbox alias list

# Validate aliases
agent-openbox alias lint

# Compare aliases with generated files
agent-openbox alias diff

Examples and Tutorials

The examples/ directory contains comprehensive tutorials and demonstrations:

Perfect for first-time users - 30-second demonstration of core functionality

cd examples/03-quick-demo && ./run.sh

Learn the fundamentals - Complete walkthrough of project initialization, alias creation, and file generation

cd examples/01-basic-setup && ./run.sh

Real-world usage - Development-focused aliases for code review, testing, documentation, and debugging

cd examples/02-development-workflow && ./run.sh  

See the examples README for the complete list of tutorials covering:

  • Content creation workflows
  • Custom template development
  • CI/CD integration patterns
  • Advanced configuration techniques

Each example includes:

  • Detailed step-by-step instructions
  • Automated run scripts (Linux/macOS/Windows)
  • Sample configurations and outputs
  • Troubleshooting guides

Core Concepts

  • Alias: A short identifier that references longer prompt/workflow/command content
  • Agent: A specific LLM ecosystem (Copilot, Windsurf, Forge) with its own file format
  • Template: MiniJinja template files that define how aliases are rendered for each agent
  • Generation: Process of creating agent-specific files from alias definitions

CLI Commands

Project Management

  • agent-openbox init [--path <dir>] - Initialize project structure

Alias Management

  • agent-openbox alias list - List all aliases with metadata
  • agent-openbox alias show <id> - Show detailed alias information
  • agent-openbox alias cat <id> - Output raw alias content
  • agent-openbox alias add <id> - Create new alias
  • agent-openbox alias edit <id> - Get path to edit alias
  • agent-openbox alias rm <id> - Remove alias
  • agent-openbox alias lint - Validate all aliases
  • agent-openbox alias diff - Compare aliases with generated files
  • agent-openbox alias generate - Generate agent-specific files from aliases

Project Structure

openbox.toml               # Main configuration
configs/
  base/
    aliases/               # Alias definitions (.toml files)
      hello.toml
      code_review.toml
      refine/
        summarize_fast.toml
  agents/                  # Agent-specific configurations
  schema/                  # JSON schemas
templates/                 # MiniJinja template files
  copilot-prompt.jinja    # GitHub Copilot prompt template
  windsurf-workflow.jinja # Windsurf workflow template
  forge-command.jinja     # Forge command template
generated/                # Generated agent files
  copilot/
    hello.md
    code_review.md
  windsurf/
    hello.yaml
    code_review.yaml

Alias Configuration

Aliases are defined in TOML files with the following structure:

id = "code_review"
name = "Code Review Assistant"
description = "Helps with thorough code reviews"
content = "Please review this code for:\n1. Functionality\n2. Best practices\n3. Security\n4. Performance"
tags = ["development", "quality"]
version = "1.0.0"
created_at = "2025-09-25T03:14:53Z"
updated_at = "2025-09-25T03:14:53Z"

Agent Configuration

The main openbox.toml file defines agent configurations with proper formats for each agent type:

[agents.copilot]
agent_type = "copilot"
output_format = "markdown"
file_extension = "md"
template_name = "copilot-prompt.jinja"

[agents.copilot.meta_fields]
model = "gpt-4"
max_tokens = "2048"

[agents.windsurf]  
agent_type = "windsurf"
output_format = "yaml"
file_extension = "yaml"
template_name = "windsurf-workflow.jinja"

[agents.windsurf.meta_fields]
workflow_version = "1.0"
timeout = "300"

[agents.forge]
agent_type = "forge"
output_format = "yaml"
file_extension = "yaml"
template_name = "forge-command.jinja"

[agents.forge.meta_fields]
category = "general"
priority = "normal"

Agent-Specific Formats

GitHub Copilot Prompt Files

Generated .md files follow the GitHub Copilot prompt file format with:

  • YAML frontmatter containing system, user, temperature, and other configuration
  • Structured content optimized for Copilot's context understanding
  • Proper temperature and token limits for optimal results

Windsurf Workflows

Generated .yaml files follow the Windsurf workflow format with:

  • Workflow name, description, and version metadata
  • Trigger configuration (on section)
  • Step-based workflow definition with actions
  • Timeout and execution parameters

Forge Commands

Generated .yaml files follow a command-based format with:

  • Command identifier and description
  • Category and priority metadata
  • Prompt definition for command execution
  • Extensible for custom command frameworks

Templates

Templates use MiniJinja syntax and have access to:

  • alias - The alias object with id, name, content, etc.
  • agent - The agent configuration
  • agent_meta_pairs - Agent metadata as key-value pairs for iteration
  • config - The main openbox configuration

Example GitHub Copilot template (templates/copilot-prompt.jinja):

---
system: |
  You are an AI assistant helping with {{ alias.name }}.
  {% if alias.description %}{{ alias.description }}{% endif %}

user: |
  {{ alias.content }}

temperature: 0.1
{% for pair in agent_meta_pairs -%}
{{ pair[0] }}: {{ pair[1] }}
{% endfor -%}
---

# {{ alias.name }}

This is a GitHub Copilot prompt file for {{ alias.name }}.

<!-- Generated by agent-openbox from alias: {{ alias.id }} -->

Development

  • Format: cargo fmt --all -- --check
  • Lint: RUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets --all-features --verbose
  • Test: cargo test --all-features --verbose

Releases

This project uses conventional commits (feat:, fix:, etc.) for automated semantic versioning and releases.

License

MIT License - see LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors

Languages