{"id":20181390,"url":"https://github.com/ac000/itsa","last_synced_at":"2026-05-11T17:33:21.999Z","repository":{"id":42441055,"uuid":"344686261","full_name":"ac000/itsa","owner":"ac000","description":"Command line client to the UK's HMRC Make Tax Digital for Income Tax Self-Assessment API","archived":false,"fork":false,"pushed_at":"2023-08-06T00:51:32.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-13T17:20:16.533Z","etag":null,"topics":["c","cli","freebsd","hmrc","itsa","linux","mtd","tax"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ac000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"Contributing.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-05T03:45:17.000Z","updated_at":"2023-10-25T18:14:54.000Z","dependencies_parsed_at":"2024-11-14T02:45:35.599Z","dependency_job_id":null,"html_url":"https://github.com/ac000/itsa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac000%2Fitsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac000%2Fitsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac000%2Fitsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac000%2Fitsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ac000","download_url":"https://codeload.github.com/ac000/itsa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241616700,"owners_count":19991543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cli","freebsd","hmrc","itsa","linux","mtd","tax"],"created_at":"2024-11-14T02:35:24.117Z","updated_at":"2026-05-11T17:33:21.952Z","avatar_url":"https://github.com/ac000.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# itsa - Income Tax Self-Assessment\n\n[![Builds](https://github.com/ac000/itsa/actions/workflows/build_tests.yaml/badge.svg)](https://github.com/ac000/itsa/actions/workflows/build_tests.yaml \"GitHub workflow builds\")\n[![FreeBSD Build Status](https://api.cirrus-ci.com/github/ac000/itsa.svg)](https://cirrus-ci.com/github/ac000/itsa \"Cirrus FreeBSD builds\")\n[![CodeQL](https://github.com/ac000/itsa/workflows/CodeQL/badge.svg)](https://github.com/ac000/itsa/actions?query=workflow:CodeQL \"Code quality workflow status\")\n\nitsa is a program for interacting with the UK's HMRC [Make Tax Digital](https://developer.service.hmrc.gov.uk/api-documentation) APIs.\n\nIt makes use of [libmtdac](https://github.com/ac000/libmtdac)\n\n# Status\n\n### Credentials\n\n- [2021-03-05] Started the process of obtaining production credentials.\n- [2021-11-19] Finally have production credentials! You can see the gory details of the journey [here](https://github.com/ac000/libmtdac/discussions/18).\n\nUnfortunately anyone wishing to use itsa will have to go through the same\nprocedure by signing up to the\n[HMRC Developer HUB](https://developer.service.hmrc.gov.uk/api-documentation)\nand registering this application and then applying for production credentials.\n\nFeel free to\n[email](mailto:Andrew%20Clayton%20%3candrew%40digital-domain.net%3e?subject=%5bitsa%20registration%5d%20)\nme with any questions regarding this particular bit. General questions/issues\nshould be done through the GitHub [itsa](https://github.com/ac000/itsa)\nproject.\n\nitsa currently supports the following actions\n\n  - List Self-Employment period obligations\n  - Create and update Self-Employment periods\n  - Create/Update a Self-Employment annual summary\n  - Submit an End-of-Year Statement\n  - Submit a final declaration\n  - List/view tax calculations\n  - View an End-of-Year tax/nics estimate\n  - Add/view/amend savings accounts\n\nCurrently it gets the required accounting data from a GNUCash SQLite backed\nfile.\n\n# Building \u0026 Installing\n\nitsa is primarily developed under Linux but it also builds and runs under\nFreeBSD.\n\n### Linux\n\nitsa has a few dependencies\n\n  - [libmtdac](https://github.com/ac000/libmtdac)\n  - [libac](https://github.com/ac000/libac)\n  - [libcurl](https://curl.se/libcurl/) (via libmtdac)\n  - [jansson](https://digip.org/jansson/)\n  - [sqlite](https://www.sqlite.org/index.html)\n\nthe last two should already be packaged up for your system.\n\nOn Red Hat/Fedora/etc libcurl and jansson can be obtained with\n\n```\n$ sudo dnf install libcurl{,-devel} jansson{,-devel} sqlite{,-devel}\n```\n\nOn Debian (something like...)\n\n```\n$ sudo apt-get install libcurl4{,-openssl-dev} libjansson{4,-dev} libsqlite3-{0,dev}\n```\n\nOnce they are installed you can build the other two libraries.\n\nOn Red Hat/Fedora you can build RPMs for these.\n\nFirst create the rpm-build directory structure\n\n```\n$ mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}\n```\n\nmake sure you have the rpm-build package\n\n```\n$ sudo dnf install rpm-build\n```\n\n```\n$ git clone https://github.com/ac000/libmtdac.git\n$ cd libmtdac\n$ make rpm\n$ sudo dnf install ~/rpmbuild/RPMS/x86_64/libmtdac-*\n```\n\n```\ncd ..\n```\n\n```\n$ git clone https://github.com/ac000/libac.git\n$ cd libac\n$ make rpm\n$ sudo dnf install ~/rpmbuild/RPMS/x86_64/libac-*\n```\n\n```\ncd ..\n```\n\nand finally itsa itself\n\n```\n$ git clone https://github.com/ac000/itsa.git\n$ cd itsa\n$ make rpm\n$ sudo dnf install ~/rpmbuild/RPMS/x86_64/itsa-*\n```\n\n### FreeBSD\n\nQuick start.\n\nInstall dependencies\n\n    $ sudo pkg install gmake jansson curl sqlite3 e2fsprogs-libuuid\n\nBuild libmtdac\n\n```\n$ git clone https://github.com/ac000/libmtdac.git\n$ cd libmtdac\n$ gmake\n```\n\n```\ncd ..\n```\n\n```\n$ git clone https://github.com/ac000/libac.git\n$ cd libac\n$ gmake\n```\n\n```\ncd ..\n```\n\nand finally itsa itself\n\n```\n$ git clone https://github.com/ac000/itsa.git\n$ cd itsa\n$ CFLAGS=-I../../libac/src/include LIBS=-L../../libac/src gmake\n```\n\nThe above _gmake_ commands will use GCC by default, to use clang, add CC=clang\nto the gmake command, e.g\n\n    $ gmake CC=clang\n\nThen you can run it like\n\n    $ LD_LIBRARY_PATH=../../libmtdac/src:../../libac/src ./itsa\n\n# Using\n\nitsa currently supports the following commands\n\n```\nUsage: itsa COMMAND [OPTIONS]\n\nCommands\n    init\n    re-auth\n\n    switch-business\n\n    list-periods [\u003cstart\u003e \u003cend\u003e]\n    create-period [\u003cstart\u003e \u003cend\u003e]\n    update-period \u003cperiod_id\u003e\n    update-annual-summary \u003ctax_year\u003e\n    get-end-of-period-statement-obligations [\u003cstart\u003e \u003cend\u003e]\n    submit-end-of-period-statement \u003cstart\u003e \u003cend\u003e\n    submit-final-declaration \u003ctax_year\u003e\n    list-calculations [tax_year]\n    view-end-of-year-estimate\n    add-savings-account\n    view-savings-accounts [tax_year]\n    amend-savings-account \u003ctax_year\u003e\n```\n\nIt requires a little bit of config...\n\n```\n$ mkdir -p ~/.config/itsa\n$ cp config.json.tmpl ~/.config/itsa/config.json\n```\n\nSet *production_api* accordingly.\n\nNext you will need to run\n\n```\n$ itsa init\n```\n\nthis need only be run once. Follow the instructions.\n\n# Fraud Prevention Headers\n\nIt's important to point out that itsa will send various headers to HMRC with\nvarious bits of information such as your IP addresses, MAC addresses,\nOS username, a unique device ID.\n\n# Environment variables\n\nCurrently there are two environment variables that can bet set to control\nbehaviour\n\n### ITSA_LOG_LEVEL\n\nThis can be used to override the default log level (MTD\\_OPT\\_LOG\\_ERR).\n\nCurrently recognised values are; *debug* \u0026 *info*\n\n### VISUAL \u0026 EDITOR\n\nFor some things itsa will open an editor, to determine what editor to use,\nitsa will first check the **VISUAL** environment variable and execute what\nthat's set to.\n\nIf that isn't set it will execute whatever **EDITOR** is set to.\n\nIf neither of those are set, itsa will default to **vi**.\n\n### NO_COLOR\n\nBy default itsa will use colourised output. This can be disabled by setting\nthe **NO_COLOR** environment variable. Its value is unimportant (can be empty).\n\nThis can be overridden by [ITSA\\_COLOR](#itsa_color)\n\n### ITSA_COLOR\n\nBy default, itsa will use colourised output. If the above *NO\\_COLOR*\nenvironment variable is set then it won't.\n\n*ITSA\\_COLOR* can be used to either force the colourised output on or off\n(regardless of the setting of *NO\\_COLOR*).\n\nIt can be set to either *yes/true* or *no/false*\n\n# License\n\nitsa is licensed under the GNU General Public License (GPL) version 2\n\nSee *COPYING* in the repository root for details.\n\n# Contributing\n\nSee *CodingStyle.md* \u0026 *Contributing.md*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fac000%2Fitsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fac000%2Fitsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fac000%2Fitsa/lists"}