enrichlayer-cli
v0.7.1
Published
Enrich Layer CLI - command-line interface for professional data enrichment API
Downloads
346
Maintainers
Readme
Enrich Layer CLI
The official command-line interface for the Enrich Layer professional data enrichment API. Access LinkedIn profile data, company information, contact details, and powerful search capabilities directly from your terminal.
npm install -g enrichlayer-cliLocal Development
To run the CLI from source (before npm publish):
git clone [email protected]:vertical-int/enrich-layer/cli.git
cd cli
bun install
bun run build
# Run commands using bun instead of 'el':
bun dist/cli.js login
bun dist/cli.js profile https://linkedin.com/in/satyanadella
bun dist/cli.js creditsTip: You can create a shell alias for convenience:
alias el="bun $(pwd)/dist/cli.js"
Quick Start
# Authenticate with your API key
el login
# Look up a LinkedIn profile
el profile https://linkedin.com/in/satyanadella
# Look up a company
el company https://linkedin.com/company/microsoft
# Search for people
el search person --name "John Smith" --company "Google"
# Check your credit balance
el creditsTable of Contents
- Installation
- Authentication
- Commands Reference
- Output Formats
- Use Cases & Workflows
- Batch Processing
- Shell Completion
- Configuration
- Environment Variables
- Exit Codes
- Troubleshooting
Installation
npm (recommended)
npm install -g enrichlayer-cliBun
bun install -g enrichlayer-cliYarn
yarn global add enrichlayer-cliVerify installation
el --version
# or, equivalent:
enrichlayer --versionThe package installs two binaries that point at the same script: el (short, default) and enrichlayer (full brand name). Use whichever you prefer; both accept identical arguments.
Authentication
Interactive login
el loginYou'll be prompted to enter your API key (input is masked for security).
Direct token
el login --token YOUR_API_KEYBrowser-based authentication
el login --browserOpens the Enrich Layer dashboard in your browser to authenticate.
Device code flow (headless environments)
el login --devicePerfect for CI/CD, servers, or environments without a browser.
Environment variable
export ENRICHLAYER_API_KEY=your_api_key
el profile https://linkedin.com/in/johndoeCheck authentication status
el whoami
# or
el auth statusLogout
el logoutCommands Reference
Profile Lookup
Look up detailed information about a person from their LinkedIn profile.
# Basic lookup - shows smart summary card
el profile https://linkedin.com/in/satyanadella
# Get full details (all experiences, education, skills)
el profile https://linkedin.com/in/satyanadella --full
# Output as JSON
el profile https://linkedin.com/in/satyanadella --json
# Copy result to clipboard
el profile https://linkedin.com/in/satyanadella --copy
# Save to file
el profile https://linkedin.com/in/satyanadella --json --output profile.jsonFind person by name and company
el profile lookup --name "Satya Nadella" --company "Microsoft"Find person by role
el profile role --role "CEO" --company "Apple"Get profile picture URL
el profile picture https://linkedin.com/in/satyanadellaCompany Lookup
Get detailed company information from LinkedIn.
# Basic lookup - shows smart summary card
el company https://linkedin.com/company/microsoft
# Full details (all locations, specialties, etc.)
el company https://linkedin.com/company/microsoft --full
# JSON output
el company https://linkedin.com/company/microsoft --jsonFind company by name or domain
el company lookup --name "Microsoft"
el company lookup --domain "microsoft.com"List employees
el company employees https://linkedin.com/company/microsoft
el company employees https://linkedin.com/company/microsoft --page-size 50Search employees with filters
el company employee-search https://linkedin.com/company/microsoft \
--title "Engineer" \
--first-name "John"Get employee count
el company employee-count https://linkedin.com/company/microsoftGet company logo URL
el company picture https://linkedin.com/company/microsoftSearch
Search for people and companies with powerful filters.
Person search
# Search by name
el search person --first-name "John" --last-name "Doe"
# Search by company
el search person --company "Google" --title "Engineer"
# Search with location
el search person --name "John" --country "US" --city "San Francisco"
# Limit results
el search person --name "John" --limit 10Available filters:
| Filter | Description |
|--------|-------------|
| --first-name | First name |
| --last-name | Last name |
| --name | Full name |
| --company | Current company name |
| --title | Job title |
| --country | Country code (US, UK, DE, etc.) |
| --city | City name |
| --region | Region/State |
| --school | School/University |
| --industry | Industry |
| --limit | Maximum results (default: 10) |
Company search
# Search by name
el search company --name "Microsoft"
# Search by industry and location
el search company --industry "Technology" --country "US"
# Search by employee size
el search company --min-employees 1000 --max-employees 10000Contact Information
Find email addresses and phone numbers.
Personal email lookup
Find someone's personal email by their name and company domain:
el contact email --name "John Doe" --domain "company.com"Work email from LinkedIn profile
Get the work email associated with a LinkedIn profile:
el contact work-email https://linkedin.com/in/johndoeReverse email lookup
Find a LinkedIn profile from an email address:
el contact reverse-email [email protected]Reverse phone lookup
Find a LinkedIn profile from a phone number:
el contact reverse-phone "+1-555-123-4567"Jobs & Schools
Job posting details
Get detailed information about a LinkedIn job posting:
el job https://linkedin.com/jobs/view/123456789Returns: job title, company, location, description, requirements, and more.
School/University profile
Get information about educational institutions:
el school https://linkedin.com/school/stanford-universityAPI Key Management
Manage your Enrich Layer API keys programmatically.
# List all API keys
el api-keys list
# Create a new key with a label (max 32 chars)
el api-keys create --label "production"
# Create a new key from a list of tags (joined into a single label)
el api-keys create --labels "prod,team-alpha"
# Revoke a key (with confirmation)
el api-keys revoke abc123xyz
# Revoke without confirmation
el api-keys revoke abc123xyz --force--label wins when both --label and --labels are provided. The joined
result of --labels is validated against the 32-character limit before the
network call so errors are actionable.
Credits
Check your API credit balance:
el creditsOutput Formats
Smart output (default)
In an interactive terminal, the CLI shows a human-readable summary:
Satya Nadella
Chairman and CEO at Microsoft
📍 Greater Seattle Area
42 experiences · 1 education · 500+ connections
Current:
Chairman and CEO at Microsoft
Use --full for details, --json for raw dataJSON output
Best for scripting and automation:
el profile https://linkedin.com/in/satyanadella --jsonFull details
Shows all available data in a formatted view:
el profile https://linkedin.com/in/satyanadella --fullTable format (legacy)
el profile https://linkedin.com/in/satyanadella --tableCSV output
Perfect for spreadsheets:
el search person --name "John" --format csvYAML output
el profile https://linkedin.com/in/satyanadella --format yamlCopy to clipboard
el profile https://linkedin.com/in/satyanadella --copyWrite to file
el profile https://linkedin.com/in/satyanadella --json --output profile.jsonSelect specific fields
el profile https://linkedin.com/in/satyanadella --fields "full_name,headline,city"Piped output (auto-JSON)
When piped to another command, output is automatically JSON:
el profile https://linkedin.com/in/satyanadella | jq '.headline'Use Cases & Workflows
Lead Generation Pipeline
Find decision-makers at a target company:
# 1. Find the company LinkedIn URL from domain
COMPANY_URL=$(el company lookup --domain "target-company.com" --json | jq -r '.linkedin_url')
# 2. Search for executives
el company employee-search "$COMPANY_URL" --title "VP" --json > executives.json
# 3. Get contact info for each executive
cat executives.json | jq -r '.employees[].profile_url' | while read url; do
el contact work-email "$url" --json
sleep 0.5
done > contacts.jsonEmail-to-Profile Enrichment
Start with an email address, get full professional profile:
# 1. Find LinkedIn profile from email
PROFILE_URL=$(el contact reverse-email [email protected] --json | jq -r '.url')
# 2. Get full profile data
el profile "$PROFILE_URL" --full
# 3. Get their current company details
COMPANY_URL=$(el profile "$PROFILE_URL" --json | jq -r '.experiences[0].company_linkedin_profile_url')
el company "$COMPANY_URL" --jsonCompetitive Intelligence
Research a competitor's team:
# Get employee distribution by role
el company employee-count https://linkedin.com/company/competitor
# Find engineering leadership
el company employee-search https://linkedin.com/company/competitor \
--title "Director" \
--json > directors.json
# Get details on each director
cat directors.json | jq -r '.employees[].profile_url' | while read url; do
el profile "$url" --json
done > director_profiles.jsonlCRM Enrichment
Bulk enrich your contact database:
# Process a file of LinkedIn URLs (one per line)
cat linkedin_urls.txt | while read url; do
el profile "$url" --json
sleep 0.5 # Rate limiting
done > enriched_profiles.jsonl
# Or use batch processing
el profile --file linkedin_urls.txt --jsonl > enriched.jsonlTalent Sourcing
Find candidates matching specific criteria:
# Search for senior engineers in specific companies
el search person \
--title "Senior Engineer" \
--company "Google" \
--city "San Francisco" \
--limit 50 \
--json > candidates.json
# Get full profiles for top candidates
cat candidates.json | jq -r '.results[].linkedin_profile_url' | head -10 | while read url; do
el profile "$url" --full
doneSales Prospecting with Email Discovery
Complete workflow from company to contact info:
# 1. Search for target companies
el search company --industry "SaaS" --min-employees 50 --max-employees 200 --json > companies.json
# 2. For each company, find the CEO
cat companies.json | jq -r '.results[].linkedin_profile_url' | while read company_url; do
el company employee-search "$company_url" --title "CEO" --json
done > ceos.json
# 3. Get personal emails for outreach
cat ceos.json | jq -r '.employees[].profile_url' | while read profile_url; do
DOMAIN=$(el profile "$profile_url" --json | jq -r '.experiences[0].company_domain')
NAME=$(el profile "$profile_url" --json | jq -r '.full_name')
el contact email --name "$NAME" --domain "$DOMAIN" --json
done > ceo_emails.jsonAI Agent Integration
The CLI is optimized for AI agent workflows:
# Structured JSON output - easy to parse
el profile https://linkedin.com/in/johndoe --json
# JSONL for streaming processing
el profile --file urls.txt --jsonl
# Quiet mode - suppress info messages, only output data
el profile https://linkedin.com/in/johndoe --json --quiet
# Specific fields for focused data extraction
el profile https://linkedin.com/in/johndoe --fields "full_name,headline,experiences" --json
# Save credits by preferring cached data
el profile https://linkedin.com/in/johndoe --use-cache if-present
el company https://linkedin.com/company/microsoft --use-cache if-recent
# Discover recipes for common workflows
el how-to --list
el how-to lead-gen
el how-to --list --json # machine-readable catalog for agentsRecipes and cost-saving
The CLI ships with a searchable recipe library: el how-to prints copy-pasteable
snippets for lead-gen, CRM enrichment, email-to-profile, talent sourcing, batch
pipelines, and agent-friendly output.
Any profile or company lookup accepts --use-cache <mode> to lower credit spend:
| Mode | Behavior |
|------|----------|
| if-present | Return a cached copy if one exists (cheapest, fastest) |
| if-recent | Return a cached copy only when it is fresh enough |
The flag is forwarded to the API as use_cache; servers that do not recognize
it ignore it, so enabling it is always safe.
Batch Processing
Process URLs from a file
# urls.txt contains one LinkedIn URL per line
el profile --file urls.txt --jsonl > results.jsonlProcess from stdin
cat urls.txt | el profile --stdin --jsonlJSON Lines output
For streaming processing of large datasets:
el profile --file urls.txt --jsonl | while read line; do
echo "$line" | jq '.full_name'
doneShell Completion
Enable tab completion for commands and options.
Bash
# Add to ~/.bashrc or ~/.bash_profile
eval "$(el completion bash)"Zsh
# Add to ~/.zshrc
eval "$(el completion zsh)"Fish
el completion fish > ~/.config/fish/completions/el.fishConfiguration
View all settings
el config listSet a configuration value
el config set output_format json
el config set default_limit 20Get a specific value
el config get output_formatRemove a setting
el config unset output_formatConfig file location
el config path
# Returns: ~/.config/enrichlayer/Available settings
| Setting | Values | Description |
|---------|--------|-------------|
| output_format | json, table | Default output format |
| default_limit | number | Default search result limit |
Environment Variables
| Variable | Description |
|----------|-------------|
| ENRICHLAYER_API_KEY | API key for authentication |
Priority order
When resolving the API key, the CLI checks in this order:
--tokencommand-line flagENRICHLAYER_API_KEYenvironment variable- Stored credentials (
~/.config/enrichlayer/credentials.json)
Exit Codes
| Code | Meaning | |------|---------| | 0 | Success | | 1 | General error |
Troubleshooting
"Not authenticated" error
# Check auth status
el whoami
# Re-authenticate
el loginRate limiting (429 errors)
The CLI automatically retries with exponential backoff. For bulk operations, add delays:
cat urls.txt | while read url; do
el profile "$url" --json
sleep 1 # 1 second between requests
doneAPI errors
# Get detailed error output
el profile https://linkedin.com/in/johndoe --json 2>&1
# Check your credits
el creditsCheck version
el --versionUpdate to latest
npm update -g enrichlayer-cliDisable colored output
el profile https://linkedin.com/in/johndoe --no-colorAPI Reference
This CLI wraps the Enrich Layer REST API. For complete API documentation:
Support
- Documentation: https://enrichlayer.com/docs/cli
- Issues: https://gitlab.com/vertical-int/enrich-layer/cli/-/issues
- Email: [email protected]
License
MIT
