Skip to content

Developing the Fintoc CLI

Daniel Leal edited this page May 5, 2026 · 2 revisions

Installation

The Fintoc CLI is built using Node. You need a Node version >=22 to be able to run this CLI locally.

  1. git clone this repo
  2. cd fintoc-cli
  3. npm install to install dependencies
  4. npm run dev to watch for changes

You can then invoke the local version of the CLI by running:

node dist/index.js

Optionally, you can link the built artifact to make running the local version a little easier.

npm link

You can then run the local CLI simply by running fintoc. To unlink:

npm unlink -g @fintoc/cli

Testing against localhost endpoints

Because this CLI uses the Fintoc Node SDK, the URL is actually controlled by the Node SDK, not the CLI itself. If you want to test the CLI against local backend changes, you need to:

  1. git clone the fintoc-node repo, then cd fintoc-node
  2. npm install the fintoc-node repo
  3. Replace the API_BASE_URL constant with your local backend URL (for example, http://localhost:3000)
  4. npm run build the Node SDK
  5. npm link the Node SDK
  6. cd ../fintoc-cli to move to the CLI folder
  7. rm -rf node_modules/fintoc, to stop using the npm version of the fintoc-node SDK
  8. npm link fintoc, to link the local pathched fintoc-node SDK to the CLI repo

Now the local CLI will run against your local backend instead of https://api.fintoc.com

Checks

You can run the tests by running:

npm run test

You can run the linter by running:

npm run lint

You can run the typecheck by running:

npm run typecheck

Clone this wiki locally