VDC & SDK swagger management tool
$ npm install -g @ionos-cloud/codex
$ codex COMMAND
running command...
$ codex (-v|--version|version)
@ionos-cloud/codex/4.1.0 darwin-x64 node-v16.0.0
$ codex --help [COMMAND]
USAGE
$ codex COMMAND
...
This might be easier than dealing with private registry etc
git clone [email protected]:ionos-cloud/codex.git && (cd codex && npm install -g .) && rm -rf codex
codex autocomplete [SHELL]
codex commit
codex compile
codex config [PATH] [VALUE]
codex diff FILE1 FILE2
codex edit
codex help [COMMAND]
codex init URL
codex lock
codex login
codex normalize FILE
codex patch
codex sdk-changes
codex state
codex status
codex unlock
codex update
display autocomplete installation instructions
USAGE
$ codex autocomplete [SHELL]
ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ codex autocomplete
$ codex autocomplete bash
$ codex autocomplete zsh
$ codex autocomplete --refresh-cache
See code: @oclif/plugin-autocomplete
commit changes into the patch being edited
USAGE
$ codex commit
OPTIONS
-d, --debug show debug information
-h, --help show CLI help
-m, --message=message
See code: src/commands/commit.ts
compile baseline plus all the patches
USAGE
$ codex compile
OPTIONS
-d, --debug show debug information
-h, --help show CLI help
-o, --output=output
See code: src/commands/compile.ts
codex configuration management
USAGE
$ codex config [PATH] [VALUE]
ARGUMENTS
PATH configuration setting path e.g. 'auth.username'
VALUE configuration value
OPTIONS
-d, --debug show debug information
-h, --help show CLI help
EXAMPLES
$ codex config
$ codex config foo.bar
$ codex config foo.bar value
See code: src/commands/config.ts
compute a diff between two json or yaml files, normalizing them first.
you can use --semantic
/-s
option together with --output yaml
/-o yaml
for a user-friendly output.
USAGE
$ codex diff FILE1 FILE2
ARGUMENTS
FILE1 first file
FILE2 second file
OPTIONS
-d, --debug show debug information
-f, --format=yaml|json [default: json] input files format
-h, --help show CLI help
-i, --ignore=ignore ignore node
-o, --output=yaml|json [default: yaml] output format. recommended to use it with semantic option
-s, --semantic perform a swagger semantic diff
See code: src/commands/diff.ts
edit the swagger file after applying all patches or edit a specific patch
USAGE
$ codex edit
OPTIONS
-a, --abort
-d, --debug show debug information
-h, --help show CLI help
-o, --output=output
-p, --patch=patch
See code: src/commands/edit.ts
display help for codex
USAGE
$ codex help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
initialize a codex project in S3
❗ Note: Before running the command, make sure to create the new bucket in dcd manager. After you create the bucket, run : codex config s3.bucket <bucket_name_here>
, so you point to the correct
location. Make sure the new bucket supports versioning in order to save older versions of the swagger files over time.
USAGE
$ codex init URL
ARGUMENTS
URL api spec url
OPTIONS
-d, --debug show debug information
-f, --format=yaml|json (required) spec format
-h, --help show CLI help
EXAMPLE
$ codex init https://api.url/spec
See code: src/commands/init.ts
acquire the global codex lock
USAGE
$ codex lock
OPTIONS
-d, --debug show debug information
-h, --help show CLI help
EXAMPLE
$ codex lock
See code: src/commands/lock.ts
authenticate using the Inside credentials
USAGE
$ codex login
OPTIONS
-d, --debug show debug information
-h, --help show CLI help
-p, --password=password password to login with
-u, --username=username username to login with
EXAMPLE
$ codex login
See code: src/commands/login.ts
take a minified json or yaml file a produce an indented version of it
USAGE
$ codex normalize FILE
ARGUMENTS
FILE file to normalizeFile
OPTIONS
-f, --format=yaml|json [default: json] file format
-h, --help show CLI help
-i, --indent=indent [default: 2]
See code: src/commands/normalize.ts
list, remove or display patches or edit their description
USAGE
$ codex patch
OPTIONS
-d, --debug show debug information
-g, --get=get display the contents of the specified patch
-h, --help show CLI help
-l, --list list all the patches
-m, --message=message
-n, --number=number patch to set message for; defaults to last patch
-o, --output=output save patch to the specified file
-r, --rm=rm remove the specified patch
See code: src/commands/patch.ts
display changes brought in by the SDK patches
USAGE
$ codex sdk-changes
OPTIONS
-d, --debug show debug information
-h, --help show CLI help
EXAMPLE
$ codex sdk-changes
See code: src/commands/sdk-changes.ts
inspect or reset the state
USAGE
$ codex state
OPTIONS
-d, --debug show debug information
-h, --help show CLI help
--reset
See code: src/commands/state.ts
display status information
USAGE
$ codex status
OPTIONS
-d, --debug show debug information
-h, --help show CLI help
-r, --reset
EXAMPLE
$ codex status
See code: src/commands/status.ts
forcefully release the lock
USAGE
$ codex unlock
OPTIONS
-d, --debug show debug information
-h, --help show CLI help
EXAMPLE
$ codex unlock
See code: src/commands/unlock.ts
update baseline from vdc
USAGE
$ codex update
OPTIONS
-c, --check check if there's an update without actually performing the update
-d, --debug show debug information
-h, --help show CLI help
-o, --output=output (required)
-y, --yes answer yes to all questions; useful in CI automation
See code: src/commands/update.ts