Command Line Operation

Running Arelle on the Command Line

Method or System

Command

Python source code

python arelleCmdLine.py [arguments]

Windows x64 or 32 bit

"c:\Program Files\arelleCmdLine.exe" [arguments]

MacOS App

/Applications/Arelle.app/contents/MacOS/arelleCmdLine [arguments]

Linux/Unix

./arelleCmdLine [arguments]

Arguments

General Arguments

Flag

Description

-a or --about

Show product version, copyright, and license.

-h or --help

Prints help message and exits

--version

Display Arelle’s version number and exit

--diagnostics

Output system diagnostics information

--showEnvironment or
--showenvironment

Show Arelle’s config and cache directory and host OS environment parameters.

Input File Arguments

Flag

Description

-f FILENAME or
--file FILENAME

FILENAME is an entry point, which may be an XBRL instance, schema, linkbase file, inline XBRL instance, testcase file, or testcase index file.
The FILENAME may be local or a URL to a web-located file.
For multiple instance filings may be | separated file names or JSON list of file/parameter dicts [{"file":"filepath"}, {"file":"file2path"} ...].

--username USERNAME

The USERNAME if needed (with the password flag) for web file retrieval .

--password PASSWORD

The PASSWORD if needed (with username flag) for web file retrieval.

-i FILENAME or
--import FILENAME

FILENAME is a list of files to import to the DTS, such as additional formula or label linkbases. Multiple file names are separated by a | character.

-d DTS or
--diff DTS

FILENAME is a second entry point when comparing (diffing) two DTSes producing a versioning report.

-r FILE or
--report FILE

Saves the versioning report (with the diff flag) to the specified FILE.

--package=FILE or
--package=URL or
--packages=FILE or
--packages=URL

Load XBRL taxonomy packages. Option can be repeated to specify multiple packages. Specifying a directory will attempt to load all .zip files in the directory.
Command line taxonomy package configuration is not persisted or shared with the GUI.
URLs must be full absolute paths. Multiple packages may also be specified as |-separated list.

--packageManifestName

Provide non-standard archive manifest file name pattern (e.g., *taxonomyPackage.xml). Uses unix file name pattern matching. Multiple manifest files are supported in archive (such as oasis catalogs). (Replaces search for either .taxonomyPackage.xml or catalog.xml).

--skipLoading or
--skiploading

Skip loading discovered or schemaLocated files matching pattern (unix-style file name patterns separated by |), useful when not all linkbases are needed.

Validation Arguments

Flag

Description

-v or --validate

Validate the file according to the entry file type.
For an XBRL file, it is validated according to XBRL validation 2.1
Performs calculation linkbase validation if either --calcDecimals or --calcPrecision are specified
Performs SEC EDGAR Filing Manual validations (if --efm selected)
Performs Global Filer Manual disclosure system validation (if --gfm=XXX selected).
If a test suite or testcase, the test case variations are individually so validated.
If formulae are present they will be validated and run unless --formula=none is specified.

--validateDuplicateFacts or
--validateduplicatefacts

Select which types of duplicates should trigger warnings (none, inconsistent, consistent, incomplete, complete, all).

--validateXmlOim or
--validatexmloim or
--oim

Enables OIM validation for XML and iXBRL documents. OIM only formats (json, csv) are always OIM validated.

--baseTaxonomyValidation or
--basetaxonomyvalidation

Specify if base taxonomies should be validated.
Skipping validation of base taxonomy files which are known to be valid can significantly reduce validation time.
disclosureSystem - (default) skip validation of base taxonomy files which are known to be valid by the disclosure system
none - skip validation of all base taxonomies
all - validate all base taxonomies

--noValidateTestcaseSchema or
--novalidatetestcaseschema

Validate testcases against their schemas.

--calc=CALCS

Specify calculations validations:
CALCS can be one of:
none – no calculations validation.
c10 or xbrl21 – Calc 1.0 (XBRL 2.1) calculations.
c10d or xbrl21-dedup – Calc 1.0 (XBRL 2.1) calculations with de-duplication
c11r or round-to-nearest – Calc 1.1 round-to-nearest mode
c11t or truncation - Calc 1.1 truncation mode

--calcDecimals or
--calcdecimals

DEPRECATED - XBRL v2.1 calculation linkbase validation inferring decimals.

--calcPrecision or
--calcprecision

DEPRECATED - pre-2010 XBRL v2.1 calculation linkbase validation inferring precision.

--calcDeduplicate or
--calcdeduplicate

DEPRECATED - de-duplication of consistent facts when performing calculation validation, chooses most accurate fact.

--efm

Select Edgar Filer Manual (U.S. SEC) disclosure system validation (strict).

--efm-skip-calc-tree

Skip walking of calculation tree during EFM validation.

--disclosureSystem=NAME or
--disclosuresystem=NAME

Specify a disclosure system, and enable disclosure system-specific validation.
Enter --disclosureSystem=help for list of names or help-verbose for list of names and descriptions.

--hmrc

Select U.K. HMRC disclosure system validation.

--utr

Select validation with respect to Unit Type Registry.

--utrUrl=UTRURL or
--utrurl=UTRURL

Used with --utr flag. Override disclosure systems Unit Type Registry.
UTRURL is the location (URL or file path).

--infoset

Select validation with respect testcase infosets.

--compareInstance or
--compareinstance

Compare instance facts against the instance loaded from the given URI.

--compareFormulaOutput or
--compareformulaoutput

Compare formula output facts against the instance loaded from the given URI.

--reportPackage or
--reportpackage

Ignore detected file type and validate all files as Report Packages.

--taxonomyPackage or
--taxonomypackage

Ignore detected file type and validate all files as Taxonomy Packages.

--validationExitCode

Exit with a code indicating validation results:
0 = valid, no issues
2 = usage error (existing parser.error usage)
3 = validation errors found (and/or warnings if --captureWarnings is also used)

--parameters

Specifies parameters for formula and validation (name=value[,name=value]).

--parameterSeparator or
--parameterseparator

Used with --parameters argument. Specify parameters separator string (if other than comma, may be a multi-character separator).

Output Arguments

These arguments can override the system settings for the output options below.

Flag

Description

--labelLang=LABELLANG or
--labellang=LABELLANG

provides an xml:lang language code to override the system language settings for labels output by the following file options, e.g. --labelLang=en-US

--disableRtl

Disable reversing string read order for right to left languages, useful for some locale settings

--labelRole=LABELROLE or
--labelrole=LABELROLE

overrides the standard XBRL 2.1 label role for the labels output by the following file options.
e.g. --labelRole=http://www.xbrl.org/2003/role/terseLabel

Output File Arguments

The following file options determine the type of file saved by the extension of the file name, the extension may be any of: .html, .htm, .xhtml, .json or .csv

Flag

Description

--DTS=DTSFILE or
DEPRECATED --csvDTS=DTSFILE

Write DTS tree into DTSFILE. May be .csv or .html.

--facts=FACTSFILE or
DEPRECATED --csvFacts=FACTSFILE

Write fact list into FACTSFILE.

--factListCols=FACTLISTCOLS

Columns for fact list file

--factTable=FACTTABLEFILE or
DEPRECATED --csvFactTable=FACTTABLEFILE

Write fact table into FILE FACTTABLEFILE

--factTableCols=FACTTABLECOLS

Columns for fact table file

--concepts=CONCEPTSFILE or
DEPRECATED --csvConcepts=CONCEPTSFILE

Write concepts into CONCEPTSFILE

--pre=PREFILE or
--csvPre=PREFILE

Write presentation linkbase into PREFILE

--table=TABLEFILE or
--csvTable=TABLEFILE

Write table linkbase into TABLEFILE

--cal=CALFILE or
--csvCal=CALFILE

Write calculation linkbase into CALFILE

--dim=DIMFILE or
--csvDim=DIMFILE

Write dimensions (of definitions) into DIMFILE

--anch=ANCHFILE

Write anchoring relationships (of definition) linkbase into ANCHFILE
The wider-narrower hierarchy is shown in a tree view.
For each anchored concept, if there are multiple parent (wider) concepts, the others are shown in a second column, “wider”.
To additionally show name, documentation, and references on this view, specify one or all of --relationshipCols “Name,Documentation,References”

--relationshipCols or
--relationshipcols

Extra columns for relationship file (comma or space separated: Name, Namespace, LocalName, Documentation and References).

--formulae=FORMULAEFILE or
--htmlFormulae=FORMULAEFILE

Write formulae linkbase into FORMULAEFILE

--viewArcrole=ARCROLE or
--viewarcrole=ARCROLE

Store relationships for the ARCROLE in the file specified by --viewFile argument.

--viewFile=FILE

Specifies the file to store the --viewArcrole relationships.

--roleTypes=FILE

Write defined role types into FILE

--arcroleTypes=FILE or
--arcroletypes=FILE

Write defined arcrole types into FILE

--testReport=FILE or
--csvTestReport=FILE

Write a test report of validation (of test cases) in specified FILE

--testReportCols=REPORTCOLS

Used with --testReport argument. Specifies columns for test report.
REPORTCOLS are comma separated and can be any of these: Index, Testcase, ID, Name, Reference, ReadMeFirst, Status, Expected, Actual“.

--rssReport=FILE

Write a test report of RSS feed processing in specified FILE

--rssReportCols=RSSCOLS

Used with --rssReport argument. Specifies columns for RSS processing.
RSSCOLS are comma separated and can be any of these: Company Name, Accession Number, Form, Filing Date, CIK, Status, Period, Yr End, Results”.

--renderedTableLinkbase

Write rendered table linkbase grid into FILE (format determined by extension: .html, .xlsx)

--saveOIMToXMLReport or
--saveoimtoxmlreport or
--saveOIMinstance or
--saveoiminstance

Save a report loaded from OIM into this file XML file name

--deduplicateFacts or
--deduplicatefacts

When using --saveDeduplicatedInstance to save a deduplicated instance, check for duplicates of this type (complete, consistent-pairs, consistent-sets).

--saveDeduplicatedInstance or
--savededuplicatedinstance

Save an instance document with duplicates of the provided type (--deduplicateFacts) deduplicated.

Logging Arguments

Flag

Description

--logFile=FILE or
--logfile=FILE

Write log messages into FILE, otherwise they go to standard output. If FILE ends in .xml it is xml-formatted, otherwise it is text.
XML log files contain significant additional details not provided in the text files.
Default files named logToPrint, logToStdOut.xml and logToStdError provide output on standard output and standard error streams.

--logFileMode=MODE or
--logfilemode=MODE

Write log file mode, a=append if existing, w=overwrite if existing.

--logFormat=FORMAT or
--logformat=FORMAT

Specify the Python logger FORMAT for the text description of messages, if absent the default is [%(messageCode)s] %(message)s - %(file)s.

--logLevel=LEVEL or
--loglevel=LEVEL

Minimum LEVEL for messages capture, otherwise the message is ignored.
Current order of levels are: debug, info, info-semantic, warning, warning-semantic, warning, assertion-satisfied, inconsistency, error-semantic, assertion-not-satisfied, and error.

--logLevelFilter=LOGREGX or
--loglevelfilter=LOGREGX

Regular expression filter for logLevel. (E.g., to not match \_-semantic levels, --logLevelFilter=(?!^._-semantic$)(.+).

--logCodeFilter=LOGREGX or
--logcodefilter=LOGREGX

Regular expression filter for log message code.

--logTextMaxLength or
--logtextmaxlength

Log file text field max length override.

--logRefObjectProperties or
--logrefobjectproperties

Log reference object properties (default).

--logNoRefObjectProperties or
--lognorefobjectproperties

Do not log reference object properties.

--logXmlMaxAttributeLength or
--logxmlmaxattributelength

Truncate XML log file attribute values at length. The default is 4,096,000 for JSON content and 128 for everything else.

--collectProfileStats

Collect profile statistics, such as timing of validation activities and formulae.

Formula Options

Flag

Description

--formula

Specify formula action, If this option is not specified, -v or --validate will validate and run formulas if present:
validate - validate only, without running
run - validate and run
none - prevent formula validation or running when also specifying -v or --validate.

--formulaRunIDs or
--formularunids

Specify formula/assertion IDs to run, separated by a | character, or a regex expression.

--formulaCompileOnly or
--formulacompileonly

Specify formula are to be compiled but not executed.

--formulaCacheSize or
--formulacachesize

Specify the number of fact aspect combinations to cache during formula evaluations. Negative numbers have no limit.

--formulaVarSetTimeout or
--formulavarsettimeout

Maximum number of seconds per variable set evaluation before logging a timeout error.

--formulaReportTimeout or
--formulareporttimeout

Maximum number of seconds to run all formula processing before logging a timeout error.

--formulaParamExprResult or
--formulaparamexprresult

Enable ParamExprResult formula tracing.

--formulaParamInputValue or
--formulaparaminputvalue

Enable ParamInputValue formula tracing.

--formulaMaximumMessageInterpolationLength or
--formulamaximummessageinterpolationlength

Truncate interpolated expressions in formula messages to this length.

--formulaCallExprSource or
--formulacallexprsource

Enable CallExprSource formula tracing.

--formulaCallExprCode or
--formulacallexprcode

Enable CallExprCode formula tracing.

--formulaCallExprEval or
--formulacallexpreval

Enable CallExprEval formula tracing.

--formulaCallExprResult or
--formulacallexprtesult

Enable CallExprResult formula tracing.

--formulaVarSetExprEval or
--formulavarsetexpreval

Enable VarSetExprEval formula tracing.

--formulaVarSetExprResult or
--formulavarsetexprresult

Enable VarSetExprResult formula tracing.

--formulaVarSetTiming or
--formulavarsettiming

Specify showing times of variable set evaluation.

--formulaAsserResultCounts or
--formulaasserresultcounts

Specify formula tracing.

--formulaSatisfiedAsser or
--formulasatisfiedasser

Specify formula tracing.

--formulaUnsatisfiedAsser or
--formulaunsatisfiedasser

Specify formula tracing.

--formulaUnsatisfiedAsserError or
--formulaunsatisfiedassererror

Specify formula tracing.

--formulaUnmessagedUnsatisfiedAsser or
--formulaunmessagedunsatisfiedasser

Specify trace messages for unsatisfied assertions with no formula messages.

--formulaFormulaRules or
--formulaformularules

Specify formula tracing.

--formulaVarsOrder or
--formulavarsorder

Specify formula tracing.

--formulaVarExpressionSource or
--formulavarexpressionsource

Specify formula tracing.

--formulaVarExpressionCode or
--formulavarexpressioncode

Specify formula tracing.

--formulaVarExpressionEvaluation or
--formulavarexpressionevaluation

Specify formula tracing.

--formulaVarExpressionResult or
--formulavarexpressionresult

Specify formula tracing.

--formulaVarFiltersResult or
--formulavarfiltersresult

Specify formula tracing.

--formulaVarFilterWinnowing or
--formulavarfilterwinnowing

Specify formula tracing.

Configuration options

It is possible to specify options to be defaults for the web server, such as disclosureSystem and validations, but not including file names.

Flag

Description

--uiLang or --uilang

Language for user interface (override system settings, such as program messages). Does not save setting. Requires locale country code, e.g. en-GB or en-US.

--internetLogDownloads

Log an info message for downloads to the web cache.

--abortOnMajorError

Abort process on major error, such as when load is unable to find an entry or discovered file.

--webserver

Start web server on host:port[:server] for REST and web access.
(e.g., --webserver locahost:8080, or specify nondefault a server name, such as cheroot, --webserver locahost:8080:cheroot.)
Security: the webserver has no authentication and is for trusted callers only. Do not expose it to untrusted users or networks. See Webserver security.

--skipDTS or
--skipdts

Skip DTS activities (loading, discovery, validation), useful when an instance needs only to be parsed.

Internet Connectivity Arguments

Flag

Description

--proxy

Modify and re-save proxy settings configuration. Enter system to use system proxy setting, none to use no proxy, a specific proxy in the format http://[user[:password]@]host[:port]
(e.g., http://192.168.1.253, http://example.com:8080, http://joe:secret@example.com:8080), or show to show current (saved)setting.

--internetConnectivity or
--internetconnectivity

Specify internet connectivity: online or offline.

--internetTimeout or
--internettimeout

Specify internet connection timeout in seconds (0 means unlimited).

--internetRecheck or
--internetrecheck

Specify rechecking for newer cache files quarter-hourly, hourly, daily, weekly or never.

--noCertificateCheck

Skip https SSL certificate checking.

--httpsRedirectCache or
--httpsredirectcache

Treat http and https schemes interchangeably when looking up files from the webcache.

--cacheDirectory or
--cachedirectory

Override the default location of the cache directory.

--httpUserAgent or
--httpuseragent

Specify non-standard http header User-Agent value.

Configuration Arguments

Flag

Description

--optionsFile FILE or
--optionsfile FILE

Provide a path to a JSON file containing runtime options. These options will be overridden by any command line options provided.

--xdgConfigHome

Specify non-standard location for configuration and cache files (overrides environment parameter XDG_CONFIG_HOME, if also provided).

--disablePersistentConfig or
--disablepersistentconfig

Prohibits Arelle from reading and writing a config to the local cache.

--plugin or --plugins

Specify plug-in configuration for this invocation. Enter show to confirm plug-in configuration. Commands show, and module urls are | separated:
url specifies a plug-in by its url or filename, relative URLs are relative to installation plug-in directory, (e.g., ‘http://arelle.org/files/hello_web.py’, ‘C:\Program Files\Arelle\examples\plugin\hello_dolly.py’ to load, or ../examples/plugin/hello_dolly.py for relative use of examples directory).
Local python files do not require .py suffix, e.g., hello_dolly without .py is sufficient, Packaged plug-in urls are their directory’s url (e.g., –plugins EDGAR/render or –plugins xbrlDB).

Test options

Flag

Description

--testcaseExpectedErrors or
--testcaseexpectederrors

For testcase results, specify comma separated additional expected errors by test case id.
--testcaseExpectedErrors=testcase-index.xml:test_id1|IOerror,oime:invalidTaxonomy.

--testcaseFilter or
--testcasefilter

If any filters are provided, any testcase variation path in the form {testcaseFilepath}:{testcaseVariationId} that doesn’t pass any filter will be skipped.

--testcaseResultsCaptureWarnings or
--testcaseresultscapturewarnings or
--captureWarnings

Capture warning-level messages as validation results. Applies to testcase variations, RSS feed items, and when used with --validationExitCode, causes warnings to produce exit code 3.

--testcaseResultOptions

For testcase results, default configuration is to pass if any expected result is matched (match-any). Alternatively, require that all expected results are matched (match-all).

Standard Plugins and Options

Many of the plug-ins add command line (in addition to GUI menu) options. For additional detail see the plug-in documentation. A summary of standard plugin options is provided here.

inlineDocumentSet

Specify an inline XBRL document set by JSON parameter: --file ‘[{“ixDocumentSet”:[{“file”:file1},{“file”:file2}…]}]’

--saveInstance

Provides a file name into which to save an XBRL instance document derived from a loaded manifest (Japan FSA) of a document set of inline documents, or loaded single inline document.
(Currently supports one target instance document only.)

loadFromExcel

Load from Excel file

No command line options, but the -f and --file options can specify an Excel document which represents a DTS.

profileCmdLine

Profiles command line operation

--save-profiler-report

Specifies file into which to save a Python profiler report of the timings of Arelle Python methods and routines for the operations performed by the other command line functions.
Useful to determine if a long running function is spending excessive time in a function that needs implementation attention.

saveDTS

Produces a Taxonomy Package.

--package-DTS

Specifies a file into which to save a Taxonomy Package representing the loaded DTS.

saveHtmlEBAtables

EBA Table Sets.

--save-EBA-tablesets

Specifies an index file (usually index.html) to represent an html page that holds a table of contents to the EBA tables generated for all loaded EBA Table Linkbase tables in the DTS.

saveLoadableExcel

Saves an Excel workbook

--save-loadable-excel

Saves an Excel workbook representing the DTS (which can be subsequently loaded by loadFromExcel.py plugin.

saveSKOS

Saves a SKOS (OMG standard OWL file).

--save-skos

Saves a SKOS (OMG standard OWL file) representing a semantic view of a DTS based on presentation linkbase entries (for US-GAAP, IFRS, and EDInet style taxonomies).

xbrlDB

Saves XBRL data to a database.

--store-to-XBRL-DB=DBSTR

Store into XBRL DB. Provides connection string: host,[port], user, password, database, [timeout], technology.

technology can be:
postgres - XBRL-US Postgres SQL
mssqlSemantic - Semantic MSSQL SQL
mysqlSemantic - Semantic MySQL SQL
orclSemantic - Semantic Oracle SQL
pgSemantic - Semantic Postgres SQL
rexster - Rexter (Titan Cassandra)
rdfDB - RDF (Turtle, NanoSparqlServer)
json - JSON (JSON, MongoDB)

For rdfDB if hostname is rdfTurtleFile or rdfXmlFile, then database specifies a local file system pathname to store a file.
For json, if hostname is jsonFile then database specifies a local file system path name to store into a file.

Example storing into postgres database using XBRL-US schema:

arelleCmdLine -f c:\temp\test.rss -v --disclosureSystem efm-pragmatic-all-years --store-to-XBRL-DB "myhost.com,8084,pgUserId,pgPassword,test_db,90,postgres"

Example storing into local MSSQL database using SQLEXPRESS instance:

arelleCmdLine -f c:\temp\test.rss -v --disclosureSystem efm-pragmatic-all-years --store-to-XBRL-DB "localhost\SQLEXPRESS,,sqlLogin,sqlPassword,,90,mssqlSemantic"

Disclosure System Selections

Run with --disclosureSystem=help to list the disclosure systems that are available for the currently loaded plugins.