Skip to content

Mollie is a command line interface (CLI) for the Mollie REST API.

Notifications You must be signed in to change notification settings

VictorAvelar/mollie-cli

Repository files navigation

mollie-cli

⚠️ This is a work in progress

mollie-cli provides a developer friendly way to interact with Mollie's REST API.

It also works as a good example of how to use the mollie-api-go sdk.

CLI Documentation

Generated automatically using cobra. Read the command docs

Installation

You can install this cli using the go toolchain.

go install github.com/VictorAvelar/mollie-cli/cmd/mollie@latest

Building from source

git clone git@github.com:VictorAvelar/mollie-cli.git

The compile the library yourself, there are a couple of make commands to support this:

If you want to compile your current branch:

make compile-current

If you want to compile master:

make compile-master

Configuration

Copy the config file .mollie.yaml to your home folder or your home folder config. If you are using this during development you can also create a copy in the directory where you execute mollie commands or specify a custom location using the --config flag.

You can also run:

wget https://raw.githubusercontent.com/VictorAvelar/mollie-cli/master/.mollie.yaml

Example config

mollie:
  core:
    # Print JSON togeth er with the standard tab formatted format.
    json: false
    # Enables verbose logging during the command execution.
    verbose: false
    # Enables printing the curl representation for the request
    # performed, useful for importing to other tools like postman,
    # insomnia, etc...
    curl: false
    # For some features it is necessary to specify the type of
    # actions being performed especially when using organization
    # tokens. Accepted values are test/live.
    mode: test
    # Debug prints the report caller on log entries.
    debug: true
    # Set a custom path to parse config, by default the CLI will
    # attempt to parse from ~, ~/.config, and the current working
    # directory (pwd).
    config:
      default: true
      custom_path: "."
  # Fields are each of the data points returned as part of a response
  # all contains all the possible printable values and printable must
  # contain the values you want to print by default, printable can be
  # overwritten by using the persistent `-f` flag.
  fields:
  # ... field map definition

Roadmap

Authentication

  • API token authentication
  • Organization token authentication
  • Custom env variable authentication
  • Mollie connect OAuth2

Resources

  • Payments
  • Methods
  • Refunds
  • Chargebacks
  • Captures
  • Orders
  • Shipments
  • Customers
  • Mandates
  • Subscriptions
  • Connect
  • Permissions
  • Organizations
  • Profiles
  • Onboarding
  • Settlements
  • Invoices
  • Miscellaneous

Utilities

  • Browse - Opens Mollie related resources on a web browser.