Skip to content

Configuration Reference

Complete reference for AgentStash configuration files, directories, and provider definitions.

AgentStash stores its configuration and data in the ~/.config/agentstash/ directory.

~/.config/agentstash/
├── state.json # Application state and preferences
├── dotagents.yaml # Dotagents (Hub) configuration
├── providers/ # Custom provider definitions
│ └── my-tool.yaml
├── backups/ # Automatic backups before sync
├── cas/ # Content Addressable Storage
└── staging/ # Temporary staging area

Stores application state including:

  • Sync directory path
  • Provider enable/disable states
  • Resource enable/disable states
  • UI preferences

Configures the Dotagents (Hub) feature that distributes skills to all your AI tools via symlinks.

# Enable/disable Dotagents distribution
enabled: true
# Base path for the canonical source
base_path: "~/.agents"
FieldTypeDefaultDescription
enabledbooleantrueEnable Dotagents distribution
base_pathstring~/.agentsDirectory containing your canonical skills

When enabled, AgentStash creates symlinks from each provider’s skills directory to ~/.agents/skills/, allowing all tools to share the same skill definitions.

You can add support for additional AI tools by creating YAML files in ~/.config/agentstash/providers/.

# yaml-language-server: $schema=https://agentstash.dev/provider.schema.json
id: my-tool
name: "My Tool"
discovery:
base_path: "~/.my-tool"
exists_check: true
resources:
- glob: "skills/**"
handler: directory_bundle
description: "My Tool skills"
hub_capabilities:
- skills
FieldTypeDescription
idstringUnique identifier (lowercase, alphanumeric with hyphens)
namestringHuman-readable display name
discovery.base_pathstringPath where the tool stores its configuration
resourcesarrayList of resource configurations to sync
FieldTypeDefaultDescription
base_pathstringrequiredBase path for the provider (supports ~)
exists_checkbooleantrueVerify path exists before syncing

Each resource defines what files to sync:

FieldTypeDefaultDescription
globstringrequiredGlob pattern for matching files
handlerstringrequiredHow to process matched files
descriptionstring""Human-readable description
default_enabledbooleantrueWhether enabled by default
excludearray[]Glob patterns to exclude
HandlerUse Case
file_copySingle files (e.g., rules.md, config.json)
directory_bundleDirectories as atomic units (e.g., skills/**)
json_normalizeJSON files (normalized before comparison)
yaml_normalizeYAML files (normalized before comparison)

Enable Dotagents distribution for specific resource types:

hub_capabilities:
- skills # Distribute skills via symlinks
- commands # Distribute commands via symlinks

Available capabilities: skills, commands, hooks, agents, rules, prompts

Each AI tool stores its configuration in a specific location. AgentStash reads from and syncs to these paths:

ProviderConfiguration Path
Claude Code~/.claude
Cursor~/.cursor
Windsurf~/.codeium/windsurf
OpenCode~/.config/opencode
Cline~/.cline
Continue~/.continue
Roo Code~/.roo
Goose~/.config/goose
Codex~/.codex
Gemini CLI~/.gemini
GitHub Copilot~/.copilot
Amp~/.config/agents
Trae~/.trae
Trae CN~/.trae-cn

AgentStash respects the following environment variables:

VariableDescription
HOMEUser home directory (used for ~ expansion)
XDG_CONFIG_HOMEAlternative config directory (defaults to ~/.config)

Before each sync operation, AgentStash automatically backs up affected files to ~/.config/agentstash/backups/. Backups are timestamped and can be restored if needed.