Getting Started
No installation needed - usenpx to run Edgit:
For CI/CD pipelines, use
npx @ensemble-edge/edgit init -y to skip interactive prompts.Global
edgit --version
Show Edgit version:
edgit --help
Show help:
Info
ensemble edgit info
View comprehensive Edgit project info including initialization state, tracked components, recent versions, and deployments:
Example Output (Full):
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:
.edgit/components.json- Component registry- Initial directory structure
Component Registry
edgit components add
Register a component:
type- Component type (prompt, config, query, script, template, docs, agent, ensemble, tool, schema)name- Unique component namepath- File path relative to repo root
--description- Human-readable description
edgit components list
List all components:
--format <type>- Output format (tree, table, json, yaml)--type <type>- Filter by type--untracked- Show untracked components
edgit components remove
Remove a component from registry:
Versioning
Tag Format
Edgit uses a 4-level tag format:- prefix -
componentsorlogic(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)
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:
name- Component nameversion- Semantic version (v..)
-m <message>- Tag message
Version tags are immutable and don’t require
--force to push.edgit tag bump
Bump the version of a component based on semantic versioning:
component- Component namelevel- Bump level:major,minor,patch, orprerelease
--ref <ref>- Git ref to tag (default: HEAD)
Examples:
edgit tag set
Create or move a mutable environment tag:
component- Component nameenvironment- Environment name (production, staging, dev, etc.)ref- Optional git ref (default: HEAD)
Environment tags are mutable and require
--force when pushing if the tag has moved: edgit push --tags --forceedgit tag list
List versions of a component:
--with-dates- Include creation dates--format <type>- Output format (text,json). Default:text
edgit tag show
Show details of a specific version:
--format <type>- Output format (text,json). Default:text
edgit tag delete
Delete a version tag:
Push
edgit push
Push commits and tags to remote:
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:
--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
edgit discover detect
Detect component type of a file:
edgit discover patterns list
List component detection patterns:
--format <type>- Output format (text,json). Default:text
Git Pass-Through
Allgit 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: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- Success1- General error2- Invalid arguments3- Git repository not found4- Component not found5- Version already exists6- 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

