Skip to content

Import

terminal
codify import <type> [type...]
[--json]
[--debug]
[-o plain|default|debug|json]
[-s]
[-p <value>]

Use codify import to generate JSON configs from the state of the current system. It performs the opposite operation of codify apply, it queries the system to generate configs instead of applying configs onto the system.

Some resources require additional information in order to properly import. A prompt will be shown to collect the relevant information. For example for aws-profile, the name of the profile is required to import the correct one. If a resource doesn’t exist on the system or failed to be imported, it will show up as an error in the final result.

Arguments

<type>: The type id of the resources to import. Multiple ids separated by spaces can be specified.

Options

Path: —path -p
Specify the path for the codify.json file. This parameter accepts both relative and absolute paths.

Output mode: —output -o
Specify the CLI output mode. Options: [default, plain, debug, json]. The output mode controls what gets printed to the console.

Debug output mode: —debug
A flag to enable debug mode. In debug mode, the debug output will be turned on and the DEBUG=codify flag will be passed to all plugins. Additional and verbose logging will be printed. Useful for debugging any issues.

Secure mode: —secure -s
Activates secure mode which sandboxes all plugins and prevents them from using sudo unless explictly permitted by the user. This is done by launching the plugins as a separate processes without TTY access. Secure mode is automatically turned on if an unverified plugin is used.

Examples

terminal
codify import homebrew nvm vscode
codify import asdf pgcli --output plain -s
codify import jenv --debug