The agentic command-line tool manages the distribution of agents and commands to your projects. It ensures your OpenCode setup stays synchronized with the latest agent configurations.
# From the agentic repository
bun install
bun link # Makes 'agentic' available globallyPulls the latest agents and commands to a project's .opencode directory.
Usage:
# Pull to current directory (auto-detects project)
cd ~/projects/my-app
agentic pull
# Pull to specific project
agentic pull ~/projects/my-app
# Pull ignoring YAML frontmatter changes
agentic pull --ignore-frontmatterOptions:
--ignore-frontmatter: Ignore YAML frontmatter in Markdown (.md) files when comparing and preserve target frontmatter during pull
What it does:
- Creates
.opencodedirectory if it doesn't exist - Copies all files from
agent/andcommand/directories - Preserves directory structure
- Reports progress for each file copied
- When
--ignore-frontmatteris used: preserves existing frontmatter in target .md files
Output:
📦 Pulling to: /home/user/projects/my-app/.opencode
📁 Including: agent, command
✓ Copied: agent/codebase-analyzer.md
✓ Copied: agent/codebase-locator.md
✓ Copied: command/research.md
✓ Copied: command/plan.md
✅ Pulled 10 files
Checks synchronization status between your project and the agentic repository.
Usage:
# Check status of current directory
cd ~/projects/my-app
agentic status
# Check status of specific project
agentic status ~/projects/my-app
# Check status ignoring YAML frontmatter changes
agentic status --ignore-frontmatterOptions:
--ignore-frontmatter: Ignore YAML frontmatter in Markdown (.md) files when comparing
What it does:
- Compares files in
.opencodewith source repository - Identifies missing, outdated, or extra files
- Uses SHA-256 hashing for content comparison
- When
--ignore-frontmatteris used: treats files with only frontmatter changes as up-to-date
Output:
📊 Status for: /home/user/projects/my-app/.opencode
📁 Checking: agent, command
✅ agent/codebase-analyzer.md
✅ agent/codebase-locator.md
❌ command/research.md (outdated)
❌ command/execute.md (missing in project)
📋 Summary:
✅ Up-to-date: 2
❌ Outdated: 1
❌ Missing: 1
⚠️ 2 files need attention
Run 'agentic pull' to update the project
Displays project metadata for use in research documentation.
Usage:
agentic metadataWhat it does:
- Collects current date/time with timezone
- Retrieves git information (commit hash, branch, repository name)
- Generates timestamp for filename formatting
Output Example:
Current Date/Time (TZ): 01/15/2025 14:30:45 EST
<git_commit>abc123def456789...</git_commit>
<branch>feature/oauth-implementation</branch>
<repository>my-app</repository>
<last_updated>2025-01-15</last_updated>
<date>2025-01-15</date>
Use Cases:
- Populating research document frontmatter
- Creating timestamped filenames
- Recording project state for documentation
- Tracking when analysis was performed
This command is particularly useful when creating research documents, as it provides all the metadata needed for proper documentation tracking.
Displays usage information.
agentic help
agentic --help
agentic -hShows the installed version of agentic.
agentic version
agentic --versionThe CLI uses intelligent project detection:
- With path argument: Uses the provided path directly
- Without argument: Searches upward from current directory for
.opencode - Stops at: Home directory boundary (won't search outside
$HOME)
The CLI reads configuration from config.json in the agentic repository:
{
"pull": {
"include": ["agent", "command"]
}
}Currently, this specifies which directories to include when pulling.
The CLI provides clear error messages:
- No .opencode found: Suggests running from project directory or specifying path
- Invalid directory: Reports if specified path doesn't exist
- Outside home: Alerts when auto-detection is outside home directory
Uses Bun's built-in SHA-256 hasher for fast, reliable file comparison.
Recursively processes all files in configured directories while preserving structure.
- Never deletes files
- Only overwrites during
pulloperation - Reports all changes clearly
# Without installing globally
bun run src/cli/index.ts pull ~/projects/my-appThe CLI is written in TypeScript with full type safety:
bun run typecheck # Verify types- Create new command file in
src/cli/ - Export async function that handles the command
- Add case in
src/cli/index.tsswitch statement - Update help text
- Regular Updates: Run
agentic statusperiodically to check for updates - Project Setup: Run
agentic pullimmediately after cloning a project - Version Control: Add
.opencode/to.gitignore(agents are distributed separately) - Automation: Consider adding
agentic pullto project setup scripts
- Ensure you ran
bun linkin the agentic repository - Check that
~/.bun/binis in your PATH
- Ensure you're in a project directory
- Or specify the project path explicitly
- Run
agentic pullto update - Check if you have local modifications
Planned improvements include:
- Project initialization command
- Selective agent/command installation
- Update notifications
- Dry-run mode for pull command