CLI Commands
Quick reference for all Edgit commands.Global
edgit --version
Show Edgit version:
edgit --help
Show help:
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, agent)name- Unique component namepath- File path relative to repo root
--description- Human-readable description--type=agent- Register as agent (for agent implementations)
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
edgit tag create
Create a version tag:
name- Component or agent nameversion- Semantic version (v..)
--type=agent- Tag an agent (default: component)-m <message>- Tag message--force- Overwrite existing tag
edgit tag list
List versions of a component or agent:
--with-dates- Include creation dates
edgit tag delete
Delete a version tag:
Deployment
edgit deploy set
Deploy a version to an environment:
name- Component or agent nameversion- Version to deploy--to- Target environment (prod, staging, dev, etc.)
--type=agent- Deploy an agent
edgit deploy get
Get deployed version for an environment:
Discovery
edgit discover scan
Scan repository for components:
--type <type>- Filter by type (prompt, config, query, script)--register- Automatically register discovered components
edgit discover detect
Detect component type of a file:
History
edgit history
View deployment history:
--date <ISO8601>- Show versions at specific date/time--from <environment>- Filter by environment--format <type>- Output format (text, json)
Git Pass-Through
Allgit commands work with edgit:
Version Helpers
edgit version bump
Calculate next version:
version- Current version (v1.2.3)level- Bump level (major, minor, patch)
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:
Auto-Completion
Generate completion script:Scripting
Use--format json for scripts:

