Skip to content

rsatyan/achctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

achctl

CLI tool for ACH file processing - read, write, validate, and analyze Nacha-format ACH files.

npm version License

Installation

npm install -g achctl
# or
npx achctl <command>

Commands

Parse ACH File

Convert an ACH file to JSON:

achctl parse payroll.ach --pretty
achctl parse payroll.ach --output payroll.json

Validate ACH File

Validate against Nacha rules:

achctl validate payroll.ach
achctl validate payroll.ach --json

File Summary

Quick overview of an ACH file:

achctl summary payroll.ach
achctl summary payroll.ach --json

Explain (Human-Readable)

Get a detailed, plain-English explanation:

achctl explain payroll.ach
achctl explain payroll.ach --json  # For AI agents

List Entries

View all entries in a file:

achctl entries payroll.ach
achctl entries payroll.ach --csv
achctl entries payroll.ach --json
achctl entries payroll.ach --batch 1  # Specific batch only

Statistics

Analyze file statistics:

achctl stats payroll.ach

Create ACH File

Generate an ACH file from JSON:

achctl create input.json --output payroll.ach

Input JSON format:

{
  "options": {
    "immediateDestination": "231380104",
    "immediateDestinationName": "RECEIVING BANK",
    "immediateOrigin": "121042882",
    "immediateOriginName": "ORIGINATING BANK"
  },
  "batches": [
    {
      "companyName": "ACME CORP",
      "companyIdentification": "1234567890",
      "standardEntryClassCode": "PPD",
      "companyEntryDescription": "PAYROLL",
      "entries": [
        {
          "transactionCode": "22",
          "routingNumber": "231380104",
          "accountNumber": "123456789",
          "amount": 1000.00,
          "individualName": "JOHN SMITH",
          "individualId": "EMP001"
        }
      ]
    }
  ]
}

Validate Routing Number

Check if an ABA routing number is valid:

achctl routing 231380104

Supported SEC Codes

  • PPD - Prearranged Payment and Deposit (payroll, direct deposit)
  • CCD - Corporate Credit or Debit
  • WEB - Internet-Initiated Entry
  • TEL - Telephone-Initiated Entry
  • CTX - Corporate Trade Exchange
  • IAT - International ACH Transaction
  • And all other Nacha SEC codes

Programmatic Usage

import { 
  parseACHFile, 
  validateACHFile, 
  generateACHFile,
  summarizeACHFile 
} from 'achctl';

// Parse an ACH file
const content = fs.readFileSync('payroll.ach', 'utf-8');
const file = parseACHFile(content);

// Validate
const result = validateACHFile(file);
console.log(result.valid); // true/false

// Get summary
const summary = summarizeACHFile(file);
console.log(summary.totalCredits);

// Generate new file
const achContent = generateACHFile(options, batches);

Transaction Codes

Code Description
22 Checking Credit (Deposit)
27 Checking Debit (Withdrawal)
32 Savings Credit (Deposit)
37 Savings Debit (Withdrawal)
23/28/33/38 Prenote variants

Related Tools

Author

Satyan Avatara - Avatara Consulting

License

Apache-2.0

About

CLI for ACH file processing - read, write, validate Nacha-format files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors