Skip to main content

Getting Started

No installation needed - use npx to run Edgit:
For CI/CD pipelines, use npx @ensemble-edge/edgit init -y to skip interactive prompts.

Global

edgit --version

Show Edgit version:
For a landscape view showing all Ensemble projects with update status, use ensemble --version. To upgrade Edgit across multiple projects, use ensemble upgrade. See Ensemble CLI for details.

edgit --help

Show help:

Info

ensemble edgit info

View comprehensive Edgit project info including initialization state, tracked components, recent versions, and deployments:
Options: Example Output (Full):
Example Output (Compact):
Example Output (JSON):
Command Naming: The official command is info. Using ensemble edgit status will pass through to git status since Edgit is git-native. Use info for Edgit project information.

edgit info (Direct CLI)

You can also run the info command directly via the Edgit CLI:
The info command provides the same data whether called via Ensemble CLI or directly. The Ensemble CLI adds visual styling (banners, colors, boxes) for a richer experience.

Initialization

edgit init

Initialize Edgit in your repository:
Creates:
  • .edgit/components.json - Component registry
  • Initial directory structure
Requirements: Must be in a Git repository

Component Registry

edgit components add

Register a component:
Arguments:
  • type - Component type (prompt, config, query, script, template, docs, agent, ensemble, tool, schema)
  • name - Unique component name
  • path - File path relative to repo root
Options:
  • --description - Human-readable description
Examples:

edgit components list

List all components:
Options:
  • --format <type> - Output format (tree, table, json, yaml)
  • --type <type> - Filter by type
  • --untracked - Show untracked components
Examples:

edgit components remove

Remove a component from registry:
Note: Doesn’t delete files, just removes from registry

Versioning

Tag Format

Edgit uses a 4-level tag format:
  • prefix - components or logic (inferred from file location)
  • type - prompts, agents, schemas, etc.
  • name - Component name
  • slot - Version (e.g., v1.0.0) or environment (e.g., production, staging)
Examples:

Type-Specific Tag Namespaces

Each component type gets its own namespace in the 4-level format: The prefix (components or logic) is automatically inferred from the component’s file location.

edgit tag create

Create a version tag:
Arguments:
  • name - Component name
  • version - Semantic version (v..)
Options:
  • -m <message> - Tag message
Examples:
Version tags are immutable and don’t require --force to push.

edgit tag bump

Bump the version of a component based on semantic versioning:
Arguments:
  • component - Component name
  • level - Bump level: major, minor, patch, or prerelease
Options:
  • --ref <ref> - Git ref to tag (default: HEAD)
Bump Types: Examples:
Output:
Use edgit tag bump in CI/CD pipelines to automatically increment versions when components change.

edgit tag set

Create or move a mutable environment tag:
Arguments:
  • component - Component name
  • environment - Environment name (production, staging, dev, etc.)
  • ref - Optional git ref (default: HEAD)
Examples:
Environment tags are mutable and require --force when pushing if the tag has moved: edgit push --tags --force

edgit tag list

List versions of a component:
Options:
  • --with-dates - Include creation dates
  • --format <type> - Output format (text, json). Default: text
Examples:

edgit tag show

Show details of a specific version:
Options:
  • --format <type> - Output format (text, json). Default: text
Examples:

edgit tag delete

Delete a version tag:
Caution: This deletes the Git tag. Use sparingly.

Push

edgit push

Push commits and tags to remote:
Examples:
Use --force when pushing moved environment tags (production, staging, etc.). Version tags are immutable and never need --force.

Discovery

edgit discover scan

Scan repository for components:
Options:
  • --type <type> - Filter by type (prompt, config, query, script, agent, ensemble)
  • --register - Automatically register discovered components
  • --changed - Only scan files changed since last commit (useful for CI/CD)
  • --since <ref> - Git ref to compare against (default: HEAD~1). Use with —changed
  • --tracked-only - Only scan git-tracked files
  • --output <format> - Output format: table (default), json, simple
Examples:

edgit discover detect

Detect component type of a file:
Examples:

edgit discover patterns list

List component detection patterns:
Options:
  • --format <type> - Output format (text, json). Default: text
Examples:

Git Pass-Through

All git commands work with Edgit:
For standard git operations, you can also use git directly. The pass-through is convenient when you’re already working with edgit commands.

Version Management

Edgit uses explicit Git tags for versioning. To get the latest version for a component:
For CI/CD automation, use shell commands to calculate version bumps:

Environment Variables

Edgit respects these environment variables:

OPENAI_API_KEY

OpenAI API key for AI-powered commit messages:

EDGIT_REGISTRY_PATH

Custom registry path (default: .edgit/components.json):

EDGIT_AUTO_PUSH

Automatically push tags after creating them:

Exit Codes

  • 0 - Success
  • 1 - General error
  • 2 - Invalid arguments
  • 3 - Git repository not found
  • 4 - Component not found
  • 5 - Version already exists
  • 6 - Version not found

Common Workflows

Register and Version

Deploy Pipeline

Rollback

Discovery

Tips

Aliases

Add to your .bashrc or .zshrc for convenience:

Auto-Completion

Generate completion script:

Scripting

Use --format json for scripts:

Next Steps

Unified CLI

Full Ensemble CLI documentation

Basic Usage

Essential commands and workflows

Versioning Guide

Master versioning strategies

CI/CD Integration

Automate in your pipeline