Skip to content

Apio api


apio api

The command group apio apio contains subcommands that that are intended to be used by tools and programs such as Icestudio, rather than being used directly by users.

Options

-h, --help  Show this message and exit.

Subcommands

apio api get-system
apio api get-project
apio api get-build-report
apio api get-boards
apio api get-fpgas
apio api get-programmers
apio api get-examples
apio api get-commands
apio api get-packages
apio api get-config
apio api scan-path
apio api scan-devices
apio api echo

apio api get-system

The command apio api get-system exports information about apio and the underlying system as a JSON foc. It is similar to the command apio info system which is intended for human consumption.

The optional flag --timestamp allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api get-system                # Write to stdout
apio api get-system  -o apio.json  # Write to a file

Options

-t, --timestamp text    Set a user provided timestamp.
-o, --output file-name  Set output file.
-f, --force             Overwrite output file.
-h, --help              Show this message and exit.

apio api get-project

The command apio api get-project exports information about an Apio project as a JSON foc.

The optional flag --timestamp allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api get-project               # Report default env
apio api get-project -e env1       # Report specified env
apio api get-project -p foo/bar    # Project in another dir
apio api get-project -o apio.json  # Write to a file

Options

-e, --env name          Set the apio.ini env.
-p, --project-dir path  Set the root directory for the project.
-t, --timestamp text    Set a user provided timestamp.
-o, --output file-name  Set output file.
-f, --force             Overwrite output file.
-h, --help              Show this message and exit.

apio api get-build-report

The command apio api get-build-report provides utilization and max clock information from a built project. The information is extracted from the file hardware.pnr that is generated by Apio when building the project.

The optional flag --timestamp allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api get-build-report               # Report for default env
apio api get-build-report -e env1       # Report for specified env
apio api get-build-report -p foo/bar    # Project in another dir
apio api get-build-report -o apio.json  # Write to a file

Options

-e, --env name          Set the apio.ini env.
-p, --project-dir path  Set the root directory for the project.
-t, --timestamp text    Set a user provided timestamp.
-o, --output file-name  Set output file.
-f, --force             Overwrite output file.
-h, --help              Show this message and exit.

apio api get-boards

The command apio api get-boards exports apio standard boards information as a JSON document. It does not show an custom boards in the user's project, for that, use the apio api get-project command.

The optional flag --timestamp allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

  apio api get-boards                # Write to stdout
  apio api get-boards  -o apio.json  # Write to a file

Options

-t, --timestamp text    Set a user provided timestamp.
-o, --output file-name  Set output file.
-f, --force             Overwrite output file.
-h, --help              Show this message and exit.

apio api get-fpgas

The command apio api get-fpgas exports apio standard FPGAs information as a JSON document. It does not show any custom fpgas in the user's project, for that, use the apio api get-project command.

The optional flag --timestamp allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api get-fpgas                # Write to stdout
apio api get-fpgas  -o apio.json  # Write to a file

Options

-t, --timestamp text    Set a user provided timestamp.
-o, --output file-name  Set output file.
-f, --force             Overwrite output file.
-h, --help              Show this message and exit.

apio api get-programmers

The command apio api get-programmers exports apio standard programmers information as a JSON document. It does not show any custom programmers in the user's project, for that, use the apio api get-project command. JSON document.

The optional flag --timestamp allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api get-programmers                # Write to stdout
apio api get-programmers  -o apio.json  # Write to a file

Options

-t, --timestamp text    Set a user provided timestamp.
-o, --output file-name  Set output file.
-f, --force             Overwrite output file.
-h, --help              Show this message and exit.

apio api get-examples

The command apio api get-examples exports apio examples information as a JSON document.

The optional flag --timestamp allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api get-examples               # Write to stdout
apio api get-examples -o apio.json  # Write to a file

Options

-t, --timestamp text    Set a user provided timestamp.
-o, --output file-name  Set output file.
-f, --force             Overwrite output file.
-h, --help              Show this message and exit.

apio api get-commands

The command apio api get-commands exports apio command structure of Apio as a JSON docs. This is used by various tools such as documentation generators and tests.

The optional flag --timestamp allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api get-commands                # Write to stdout
apio api get-commands  -o apio.json  # Write to a file

Options

-t, --timestamp text    Set a user provided timestamp.
-o, --output file-name  Set output file.
-f, --force             Overwrite output file.
-h, --help              Show this message and exit.

apio api get-packages

The command apio api get-packages exports information about the apio packages on the current platform as a JSON foc. Note that the set of apio packages used depends on the platform used as some packages may be platform specific.

The optional flag --timestamp allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api get-packages               # Write to stdout
apio api get-packages -o apio.json  # Write to a file

Options

-t, --timestamp text    Set a user provided timestamp.
-o, --output file-name  Set output file.
-f, --force             Overwrite output file.
-h, --help              Show this message and exit.

apio api get-config

The command apio api get-config exports information about the resolution of the Apio configuration in the file config.jsonc for the current platform.

The optional flag --timestamp allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api get-config               # Write to stdout
apio api get-config -o apio.json  # Write to a file

Options

-t, --timestamp text    Set a user provided timestamp.
-o, --output file-name  Set output file.
-f, --force             Overwrite output file.
-h, --help              Show this message and exit.

apio api scan-path

The command apio api scan-path scans and reports anomalies related to accessing apio packages using the PATH additions.

The optional flag '--timestamp' allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api scan-path                # Write to stdout
apio api scan-path  -o apio.json  # Write to a file

Options

  -t, --timestamp text    Set a user provided timestamp.
  -o, --output file-name  Set output file.
  -f, --force             Overwrite output file.
  -h, --help              Show this message and exit.

apio api get-devices

The command apio api scan-devices scans and report the available usb and serial devices.

The optional flag '--timestamp' allows the caller to embed in the JSON document a known timestamp that allows to verify that the JSON document was indeed was generated by the same invocation.

Examples

apio api scan-devices                # Write to stdout
apio api scan-devices  -o apio.json  # Write to a file

Options

  -t, --timestamp text    Set a user provided timestamp.
  -o, --output file-name  Set output file.
  -f, --force             Overwrite output file.
  -h, --help              Show this message and exit.

apio api echo

The command apio api echo allows external programs such as the Apio VS Code extension to print a short message in a format that is consistent with that Apio theme that is currently selected in the user preferences.

The required option --style should have one of these values: OK, INFO, WARNING, ERROR, TITLE, EMPH1, EMPH2, or EMPH3. The style colors can be viewed with the command apio info themes.

Examples

apio api echo -t "Hello world", -s INFO
apio api echo -t "Task completed successfully", -s OK
apio api echo -t "Task failed", -s ERROR

Options

-t, --text MESSAGE  Set message to echo.  [required]
-s, --style STYLE   Set style to use.  [required]
-h, --help          Show this message and exit.