Skip to content

Repository files navigation

Instantly AI CLI

A command-line interface for the Instantly.ai API V2. The project currently implements the full in-scope Instantly API v2 surface for campaigns, leads, accounts, analytics, deliverability, webhooks, and related workspace resources from the terminal.

Installation

go build -o instantly .

Configuration

The CLI resolves configuration in this priority order:

  1. CLI flags
  2. Environment variables (INSTANTLY_API_KEY, INSTANTLY_OUTPUT_FORMAT)
  3. Config file (~/.config/instantly/config.yaml)

Save your API key:

./instantly auth <your-api-key>

Or pass it directly:

./instantly --api-key <key> account list

Usage

Commands follow the pattern: instantly <resource> <action> [flags]

# Authenticate once, then use the saved key
instantly auth <your-api-key># Accounts
instantly account list
instantly account get --email user@example.com
instantly account test-vitals --emails user@example.com
# Campaigns
instantly campaign list --limit 50
instantly campaign get --id <uuid>
instantly campaign activate --id <uuid>
instantly campaign pause --id <uuid># Leads
instantly lead list --campaign <uuid>
instantly lead create --email lead@example.com --campaign <uuid># Inspect exact flags for complex commands
instantly account create --help
instantly campaign create --help
instantly webhook create --help

Utility Commands

These commands ship with the CLI but are not API resource groups:

  • auth - Save an API key to ~/.config/instantly/config.yaml
  • skill - Install the bundled SKILL.md for agent tools
  • completion - Generate shell completion scripts

Agent Skill Installation

The CLI includes a bundled AI-agent skill for tools that support SKILL.md-based workflows. This skill is meant for agents using the installed instantly binary to operate the Instantly API correctly.

instantly skill install
instantly skill install --target agents --target claude
instantly skill install --target codex --force

By default, the installer writes SKILL.md into:

  • ~/.agents/skills/instantly-cli/
  • ~/.claude/skills/instantly-cli/
  • ~/.codex/skills/instantly-cli/

Global Flags

FlagShortDescription
--api-key-kAPI key (also via INSTANTLY_API_KEY env var)
--output-oOutput format: json, table, csv
--no-colorDisable colored output
--verbose-vShow request/response details

Pagination Flags

Most list commands support:

  • --limit - Number of items per page
  • --starting-after - Cursor for the next page
  • --all - Auto-paginate and return all results

Supported Resources

ResourceCLI Subcommand
Accountaccount
Analyticsanalytics
Account Campaign Mappingaccount-campaign-mapping
Audit Logaudit-log
Background Jobbackground-job
Block List Entryblock-list-entry
Campaigncampaign
Campaign Subsequencesubsequence
CRM Actionscrm
Custom Prompt Templateprompt-template
Custom Tagcustom-tag
Custom Tag Mappingcustom-tag-mapping
Emailemail
Email Templateemail-template
Email Verificationemail-verification
Inbox Placement Analyticsinbox-placement-analytics
Inbox Placement Reportsinbox-placement-report
Inbox Placement Testinbox-placement-test
Leadlead
Lead Labellead-label
Lead Listlead-list
Sales Flowsales-flow
SuperSearch Enrichmentsupersearch
Webhookwebhook
Webhook Eventwebhook-event
Workspaceworkspace
Workspace Group Memberworkspace-group-member
Workspace Memberworkspace-member

Intentionally Excluded API Groups

These Instantly API v2 groups are currently out of scope for this CLI:

  • oauth
  • api-key
  • workspace-billing
  • dfy-order

Development

# Build
go build -o instantly .# Run tests
go test ./...
# Run tests (verbose)
go test -v ./...

Tech Stack

  • Go 1.24+
  • Cobra for CLI commands
  • Viper for configuration
  • Standard library net/http for API calls

API Reference

  • Base URL:https://api.instantly.ai/
  • Auth: Bearer token via Authorization: Bearer <api_key> header
  • Rate Limits: 100 requests per second; 6,000 requests per minute (workspace-wide, shared across API keys)
  • Docs:https://developer.instantly.ai/

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages