CLI-Expander Integration Strategy
Overview
cli-expander is an interactive command builder written in Rust. It expands typed triggers (:findx[Space]) into full CLI commands, supports multi-field terminal forms, fzf-powered trigger discovery, and a portable CSV trigger database.
Opshell.dev publishes content about Linux, CLI, automation, DevOps, and AI — every article contains commands that can be productized as cli-expander trigger libraries. This creates a natural content-to-product pipeline where free SEO articles feed directly into a growing CLI tool library that drives newsletter subscriptions, memberships, and digital pack sales.
The Core Loop
Write free article about CLI workflow
→ Extract commands as cli-expander trigger YAML
→ Publish trigger pack as free or member resource
→ Readers install ce binary + pack
→ They use triggers daily → dependency on library
→ Upgrade to premium packs for advanced workflows
→ Contribute back: community trigger submissions
Content-to-Trigger Pipeline
How It Works
Every opshell article follows a structured content skeleton. The final section before the CTA becomes a trigger pack:
Article structure:
1. Problem statement
2. Prerequisites
3. Step-by-step implementation (commands, code, configs)
4. Verification
5. Common errors and troubleshooting
6. CLI-Expander trigger pack (CTA to download the .yml file)
Example: find Article → Trigger Pack
A blog post titled "Mastering find: 10 Practical Examples" would produce:
# opshell-find.yml — generated from article
matches:
- trigger: ":find-name"
replace: "find {{path}} -name '{{pattern}}' {{maxdepth}}"
search_label: "Find files by name"
vars:
- name: form
type: form
params:
layout: "Search path: [[path]]\nName pattern: [[pattern]]\nMax depth: [[maxdepth]]"
fields:
path:
default: "."
pattern:
default: "*.sh"
maxdepth:
type: choice
values: ["", "-maxdepth 1", "-maxdepth 2", "-maxdepth 3"]
- trigger: ":find-size"
replace: "find {{path}} -size {{size}} -exec ls -lh {} +"
search_label: "Find files by size"
vars:
- name: form
type: form
params:
layout: "Search path: [[path]]\nSize filter (e.g. +100M, -1G): [[size]]"
fields:
path:
default: "."
size:
default: "+100M"
Each article yields 3–10 triggers. Over 50 articles, this builds a library of 150–500 production CLI commands.
Trigger Library Tiers
| Tier | Access | Contents | Distribution |
|---|---|---|---|
| Free | No login | 30–50 essential triggers (base utilities, common find/grep/xargs patterns) | Bundled with ce binary, documented on opshell.dev |
| Newsletter | Email required | 50–100 curated triggers from recent articles, weekly trigger drops | Via Opshell Notes email + downloadable YAML |
| Member | Paid membership | 200+ triggers across all categories, premium form builders, custom workflows | Full opshell/ matches directory |
| Digital Packs | One-time purchase | Themed bundles: "Docker Ops Pack", "Linux Admin Toolkit", "Kubernetes CLI Pack" | Standalone .yml files with documentation |
| White-label | Agency partners | Full library rebranded with custom triggers + priority support | Private repo + installation script |
Category Structure
The trigger library mirrors opshell.dev's content pillars:
~/.config/cli-expander/matches/opshell/
├── base.yml # Free — universal essentials
├── linux/
│ ├── find.yml # Free — find examples
│ ├── grep.yml # Newsletter
│ ├── awk-sed.yml # Member
│ ├── permissions.yml # Member
│ └── systemd.yml # Digital Pack
├── docker/
│ ├── basic.yml # Newsletter
│ ├── compose.yml # Member
│ └── swarm.yml # Digital Pack
├── devops/
│ ├── ansible.yml # Member
│ ├── backup.yml # Free
│ └── monitoring.yml # Member
├── automation/
│ ├── n8n.yml # Member
│ └── bash-automation.yml # Newsletter
├── wordpress/
│ ├── wp-cli-basic.yml # Free
│ ├── wp-cli-advanced.yml # Member
│ └── troubleshooting.yml # Digital Pack
└── ai-prompts/
├── code-review.yml # Free
├── architecture.yml # Member
└── ops-prompts.yml # Newsletter
Conversion Funnel with cli-expander
Visitor reads free article
→ Article includes inline ce trigger examples
→ Reader installs ce binary (brew/cargo)
→ Free base trigger pack from opshell.dev
→ Daily use builds habit
→ Newsletter CTA inside ce output: "New triggers available"
→ Subscribe → get weekly trigger pack
→ Member CTA: "Unlock 200+ triggers"
→ Premium member → full library
→ Digital pack upsell: themed bundles
Touchpoints in the CLI
The ce binary itself becomes a distribution channel:
| Touchpoint | Location | Message |
|---|---|---|
ce list output | Bottom of list | "New opshell triggers available: ce update" |
ce expand :trigger | After expansion | "Learn more: opshell.dev/articles/trigger-name" |
| First-time install | Post-install message | "Subscribe to Opshell Notes for weekly trigger packs" |
ce search <query> | No results | "Search opshell trigger library at opshell.dev/triggers" |
| Form submission | After form completion | "Get 150+ more triggers with Opshell Membership" |
Generation Workflow
Manual (Current)
Write article → Extract commands → Write YAML → Add to category
→ Run `ce generate-csv --force` → Publish article + trigger pack
Automated (Future)
Write article in markdown
→ CI pipeline parses code blocks
→ Auto-generates trigger YAML
→ Runs `ce generate`
→ Updates triggers.csv
→ Commits to opshell/triggers repo
→ Deploys to opshell.dev/downloads/triggers/
YAML Generation Template
Each article section yields one or more triggers:
# Template for article-to-trigger conversion
matches:
- trigger: ":ops-{{article-slug}}-{{command-name}}"
replace: "{{command template from article}}"
search_label: "{{short description}}"
vars:
- name: form
type: form
params:
layout: |
{{parameter 1}}: [[field1]]
{{parameter 2}}: [[field2]]
fields:
field1:
default: "{{example value from article}}"
field2:
type: choice
values: ["option1", "option2"]
# Metadata for opshell.dev tracking
ops:
article: "/linux/find-examples"
tier: "free"
version: "1.0.0"
Content Strategy Updates
Article Skeleton (Updated)
Every article gains a new concluding section:
6. CLI-Expander Trigger Pack
Save these commands as reusable triggers:
ce add https://opshell.dev/triggers/linux/find-examples.yml
Or browse all available packs:
ce search opshell
New Content Types
| Content Type | Description | Tier |
|---|---|---|
| Trigger pack releases | Standalone posts announcing new YAML packs | Free/Newsletter |
| Trigger deep-dives | Walk through a single complex trigger form | Free |
| Workflow automation | Multi-trigger workflows combining 3+ triggers | Member |
| Custom pack builds | Reader requests → custom trigger pack | Digital Pack |
| CLI tool comparisons | Compare ce triggers against raw commands | Free |
SEO Benefits
Each trigger YAML file becomes an indexed document. The search_label and description fields in YAML are optimized for keyword matching. When users run ce search <query>, they find opshell triggers alongside their target commands — creating organic discovery from within the terminal.
Distribution Channels
| Channel | Mechanism |
|---|---|
| opshell.dev/downloads/triggers/ | Direct YAML downloads + install scripts |
ce install opshell | Built-in command to fetch opshell pack |
| GitHub releases | Tagged trigger pack releases |
| Newsletter | Weekly trigger pack attachment |
| Community | User-submitted triggers via PR |
| In-ce notifications | "ce update" checks for new opshell triggers |
KPIs
| Metric | Target | Measurement |
|---|---|---|
| Trigger YAML downloads | 100+/month per pack | Server logs |
| ce binary installs from opshell | 50+/month | Referral header |
| Newsletter sub from ce | 20+/month | UTM param in CTA |
| Trigger library size | 500+ triggers by month 12 | YAML file count |
| Member upgrade from trigger | 10% of trigger users | Membership funnel |
| Pack purchases | 5+/month per pack | Payment processor |
Relationship to Existing Strategy
This integration extends the existing monetization and conversion strategies:
- Monetization: Adds "Trigger Packs" as a new digital product tier between membership and services
- Conversion: Creates a CLI-native touchpoint that reaches users inside their terminal — beyond the browser
- Content: Every article now produces two assets: the article itself and a trigger YAML file
- Entry strategy: Trigger library can launch early as a free differentiator before monetizing