Skip to main content

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

TierAccessContentsDistribution
FreeNo login30–50 essential triggers (base utilities, common find/grep/xargs patterns)Bundled with ce binary, documented on opshell.dev
NewsletterEmail required50–100 curated triggers from recent articles, weekly trigger dropsVia Opshell Notes email + downloadable YAML
MemberPaid membership200+ triggers across all categories, premium form builders, custom workflowsFull opshell/ matches directory
Digital PacksOne-time purchaseThemed bundles: "Docker Ops Pack", "Linux Admin Toolkit", "Kubernetes CLI Pack"Standalone .yml files with documentation
White-labelAgency partnersFull library rebranded with custom triggers + priority supportPrivate 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:

TouchpointLocationMessage
ce list outputBottom of list"New opshell triggers available: ce update"
ce expand :triggerAfter expansion"Learn more: opshell.dev/articles/trigger-name"
First-time installPost-install message"Subscribe to Opshell Notes for weekly trigger packs"
ce search <query>No results"Search opshell trigger library at opshell.dev/triggers"
Form submissionAfter 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 TypeDescriptionTier
Trigger pack releasesStandalone posts announcing new YAML packsFree/Newsletter
Trigger deep-divesWalk through a single complex trigger formFree
Workflow automationMulti-trigger workflows combining 3+ triggersMember
Custom pack buildsReader requests → custom trigger packDigital Pack
CLI tool comparisonsCompare ce triggers against raw commandsFree

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

ChannelMechanism
opshell.dev/downloads/triggers/Direct YAML downloads + install scripts
ce install opshellBuilt-in command to fetch opshell pack
GitHub releasesTagged trigger pack releases
NewsletterWeekly trigger pack attachment
CommunityUser-submitted triggers via PR
In-ce notifications"ce update" checks for new opshell triggers

KPIs

MetricTargetMeasurement
Trigger YAML downloads100+/month per packServer logs
ce binary installs from opshell50+/monthReferral header
Newsletter sub from ce20+/monthUTM param in CTA
Trigger library size500+ triggers by month 12YAML file count
Member upgrade from trigger10% of trigger usersMembership funnel
Pack purchases5+/month per packPayment 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