A command-line interface tool for managing TEI Publisher applications with Jinks
npm install @teipublisher/jinks-cliA command-line interface tool for managing TEI Publisher applications with Jinks.
``bash`
npm install -g @teipublisher/jinks-cli
After installation, you can use the jinks command from anywhere in your terminal.
#### jinks -h or jinks --help
Display help information for the jinks CLI tool or for a specific command.
`bash`
jinks -h
jinks create --help
#### jinks -v or jinks --version
Display the version number of the jinks CLI tool.
`bash`
jinks -v
#### jinks list
List all installed applications on the server.
`bash`
jinks list
#### jinks create [abbrev]
Create a new application. If no abbreviation is provided, you'll be prompted to enter one.
`bash`
jinks create my-app
Options:
- -s, --server
- Server address (default: http://localhost:8080/exist/apps/jinks)
- -u, --user - Username (default: tei)
- -p, --password - Password (default: simple)
- -e, --edit - Use text editor rather than interactive mode
- -q, --quiet - Do not print banner
- -c, --config - Use the given configuration file rather than interactive mode to create the application.####
jinks edit [abbrev]
Edit an existing application configuration. If no application is provided, you'll be prompted to select from installed applications.`bash
jinks edit my-app
`Options:
-
-s, --server - Server address
- -u, --user - Username
- -p, --password - Password
- -e, --edit - Use text editor rather than interactive mode
- -q, --quiet - Do not print banner
- -r, --reinstall - Fully reinstall application, overwriting existing files
- -f, --force - Ignore last modified date and check every file for changes####
jinks update [abbrev]
Update an existing application. If no application is provided, you'll be prompted to select from installed applications.`bash
jinks update my-app
`Options:
-
-s, --server - Server address
- -u, --user - Username
- -p, --password - Password
- -q, --quiet - Do not print banner
- -r, --reinstall - Fully reinstall application, overwriting existing files
- -f, --force - Ignore last modified date and check every file for changes####
jinks config [abbrev]
Get configuration for an application.`bash
jinks config my-app
`Options:
-
-x, --expand - Show the expanded configuration
- -s, --server - Server address
- -u, --user - Username
- -p, --password - Password####
jinks run [abbrev] [action]
Run an action on an installed application. If no action is provided, you'll be prompted to select from available actions.`bash
jinks run my-app reindex
`Options:
-
-U, --update - Perform an update of the application before running the action
- -s, --server - Server address
- -u, --user - Username
- -p, --password - Password####
jinks create-profile [abbrev]
Create a new profile (blueprint, feature, or theme) and save it to a directory. If the resulting package is built (with ant) and installed into the database, it will appear within jinks as a profile users can select to extend.`bash
jinks create-profile my-feature
`Options:
-
-s, --server - Server address
- -u, --user - Username
- -p, --password - Password
- -o, --out - Directory to save the profile configuration to
- -q, --quiet - Do not print banner####
jinks edit-profile
Edit an existing profile configuration.`bash
jinks edit-profile ./my-feature
`Options:
-
-s, --server - Server address
- -u, --user - Username
- -p, --password - Password
- -q, --quiet - Do not print bannerExamples
$3
`bash
jinks create
`$3
`bash
jinks create my-tei-app
`$3
`bash
jinks edit
`$3
`bash
jinks edit my-tei-app
`$3
`bash
jinks update my-tei-app --force
`$3
`bash
jinks run my-tei-app
`$3
`bash
jinks run my-tei-app reindex
`$3
`bash
jinks create-profile my-feature --out ./my-feature
`$3
`bash
jinks edit-profile ./my-feature
`$3
`bash
jinks list --server http://my-server:8080/exist/apps/jinks
`Interactive Features
The CLI provides rich interactive features:
- Application Selection: When no application abbreviation is provided, you'll be presented with a list of installed applications to choose from
- Action Selection: When running actions, you can select from available actions if none is specified
- Profile Selection: Interactive checkboxes for selecting features and dependencies
- Conflict Resolution: Automatic detection and resolution of file conflicts during updates
- Dependency Management: Automatic detection and addition of missing dependencies
Configuration
The CLI connects to a Jinks server running on eXist-db. By default, it connects to:
- Server:
http://localhost:8080/exist/apps/jinks
- Username: tei
- Password: simple`You can override these defaults using command-line options.
When creating profiles, you can choose from three types:
- Blueprint: Base configuration for an application
- Feature: Reusable functionality module
- Theme: Styling and appearance configuration
- Node.js 20.0.0 or higher
- A running eXist-db instance with Jinks installed
GPL-3.0-or-later
https://github.com/eeditiones/jinks