Skip to main content

Overview

Launch an interactive shell (REPL) that allows you to run CoinPaprika CLI commands without typing coinpaprika-cli prefix each time. Perfect for exploration and rapid testing.

Usage

coinpaprika-cli shell

Features

No Prefix Required

Type commands directly: ticker btc-bitcoin instead of coinpaprika-cli ticker btc-bitcoin

Command History

Use up/down arrows to navigate previous commands

Persistent Session

API key and settings preserved across commands

Quick Exit

Type exit, quit, or press Ctrl+D to leave

Examples

Start the shell

coinpaprika-cli shell
Output:
coinpaprika-cli interactive shell — type commands without 'coinpaprika-cli' prefix
Type 'exit' or 'quit' to leave. Ctrl+D also exits.

coinpaprika>

Run commands interactively

coinpaprika> global
# Shows global market data

coinpaprika> ticker btc-bitcoin
# Shows Bitcoin ticker

coinpaprika> tickers --limit 10
# Shows top 10 tickers

coinpaprika> exit
# Exits the shell

Using flags and options

coinpaprika> ticker eth-ethereum --output json
# JSON output works normally

coinpaprika> ohlcv btc-bitcoin --start 2024-01-01 --limit 30
# All flags are supported

coinpaprika> search bitcoin --categories currencies --limit 5
# Complex commands with multiple arguments

Shell Commands

exit
command
Exit the interactive shell
quit
command
Exit the interactive shell (alias for exit)
Ctrl+D
shortcut
Exit the interactive shell (EOF signal)
Ctrl+C
shortcut
Interrupt current command (shell remains open)
↑ / ↓
shortcut
Navigate command history

How It Works

  1. Launch shell: coinpaprika-cli shell
  2. Prompt appears: coinpaprika>
  3. Type commands: Omit the coinpaprika-cli prefix
  4. Commands execute: Results displayed immediately
  5. Repeat: Run as many commands as needed
  6. Exit: Type exit or press Ctrl+D

Use Cases

Exploration and Learning

coinpaprika> coins --limit 5
# Browse available coins

coinpaprika> coin btc-bitcoin
# Explore coin details

coinpaprika> ticker btc-bitcoin
# Check price data

Rapid Testing

# Test different quote currencies
coinpaprika> ticker btc-bitcoin --quotes USD
coinpaprika> ticker btc-bitcoin --quotes EUR
coinpaprika> ticker btc-bitcoin --quotes BTC,ETH

Data Comparison

coinpaprika> ticker btc-bitcoin
coinpaprika> ticker eth-ethereum
coinpaprika> ticker ada-cardano
# Compare multiple assets quickly

Development Workflow

# Keep shell open while developing
coinpaprika> ticker btc-bitcoin --output json
# Test JSON structure

coinpaprika> ticker btc-bitcoin --raw
# Test raw output mode

Advanced Features

Command History

The shell remembers commands within the session:
coinpaprika> ticker btc-bitcoin
# Press ↑ to recall
# Edit and run variations

Quoting Arguments

Use quotes for arguments with spaces:
coinpaprika> search "bitcoin cash"
coinpaprika> search 'wrapped btc'

Error Handling

Errors don’t exit the shell:
coinpaprika> ticker invalid-coin-id
Error: Not found

coinpaprika> # Shell still running, try another command

Keyboard Shortcuts

ShortcutAction
Previous command
Next command
Move cursor
Ctrl+ABeginning of line
Ctrl+EEnd of line
Ctrl+CInterrupt (doesn’t exit)
Ctrl+DExit shell
Ctrl+LClear screen (if supported)

Shell vs Direct Commands

coinpaprika-cli ticker btc-bitcoin
coinpaprika-cli ticker eth-ethereum
coinpaprika-cli ticker ada-cardano

Configuration

The shell respects all configuration settings:
  • API key: Uses key from config file or environment
  • Global flags: Can be specified per-command
  • Output format: Defaults to table, override with --output json

Limitations

  • Shell commands don’t support piping to external tools (use direct CLI for that)
  • No command chaining with && or ||
  • No shell scripting features (variables, loops, etc.)
  • For automation, use the direct CLI interface

Exit Methods

coinpaprika> exit
Clean exit with command

commands

View available commands

config

Configure API key for shell sessions

Notes

  • History is only saved for the current session (not persistent)
  • The shell is built with rustyline (readline-like library)
  • All commands work the same as the direct CLI
  • Global flags like --output and --api-key work per-command
  • Perfect for interactive tutorials and demonstrations

Build docs developers (and LLMs) love