CLI

A command-line interface that runs anywhere

Below is a full list of CLI commands.

General Options

The below options can be run with any command.

napi [command]

Options:
  --help           Show help             [boolean]
  --version        Show version number   [boolean]
  --workdir, --wd  working directory     [string] [default: "/your/current/directory"]

napi init

The init command runs in the current directory by default and outputs a .napirc file. These files are used so the tool can understand your codebases.

Options

The init command takes no specific arguments beyond the general options.

Basic Execution

napi init

initialize a NanoAPI project

Examples

napi init # Run in the current directory

napi init --help # Show command info

napi init --workdir=/path/to/your/project # Run init in a specific directory

napi manifest generate

The manifest generate command creates the special data structure needed to visualize the architecture of a codebase.

Options

The manifest generate command takes no specific arguments beyond the general options.

Basic Execution

napi manifest generate

Generate the manifest for viewing and auditing your system architecture

napi manifest view

The manifest view command spins up the Audit Tool.

The manifest view command requires that manifest generate is run first. It will give a warning telling you to run this command before manifest view will work.

Options

The init command takes no specific arguments beyond the general options.

Basic Execution

napi manifest view

Audit your program with the UI

Examples

napi manifest view # Run in the current directory

napi manifest view --help # Show command info

napi manifest view --workdir=/path/to/your/project # Run the audit tool in a specific directory

napi extract

napi extract enables you to extract functionality from codebases into a separate system or codebase. This is how Symbol Extraction runs within the system and this command powers that process.

Options

  • —symbol: accepts a single definition of a symbol in the shape of <filename>|<symbol_name>. This tells napi to extract that functionality and all dependencies into an output codebase. Multiple —symbol invocations are possible for a single run of napi extract.

Basic Execution

napi extract --symbol=app.py|app --symbol=...

Extract the above symbols into an output microservice
Updated on