Deeplint is still in the MVP development phase and not yet available for use.

Command Aliases

This guide explains how to use DeepLint's command aliases to save time and improve your workflow.

Overview

DeepLint provides two types of command aliases:

  1. Full-word aliases: Alternative names for commands that are more descriptive or intuitive

  2. Short aliases: Single-character shortcuts for frequently used commands

Aliases make it easier to use DeepLint by providing multiple ways to invoke the same command.

Using Full-Word Aliases

Full-word aliases are alternative names for commands that you can use interchangeably with the primary command name. For example, the init command has the following aliases:

  • initialize

  • create-config

You can use any of these aliases instead of the primary command name:

deeplint init
deeplint initialize
deeplint create-config

All of these commands do exactly the same thing.

Using Short Aliases

Short aliases are single-character shortcuts for commands. For example, the init command has the short alias i. You can use short aliases in two ways:

deeplint i

This is the recommended way to use short aliases, following the pattern used by tools like npm (npm i for install).

With Dash (Supported for Backward Compatibility)

deeplint -i

Both forms are equivalent to:

deeplint init

Short aliases are particularly useful for frequently used commands, as they require less typing.

How Short Aliases Work

Short aliases in DeepLint work by converting the short alias to the corresponding command name before processing the command-line arguments. This means that:

  1. The short alias must be a separate argument (e.g., i or -i, not -i=value or -ivalue)

  2. The short alias must be the first argument after the command name

  3. You can combine short aliases with options (e.g., i --force or -i --force)

For example, these are all valid ways to use short aliases:

deeplint i
deeplint i --force
deeplint h init

With dash prefix (backward compatibility):

deeplint -i
deeplint -i --force
deeplint -h init

But these are not valid:

deeplint i=value   # Not valid, use i --option=value instead
deeplint iforce    # Not valid, use i --force instead
deeplint -i=value  # Not valid, use -i --option=value instead
deeplint -iforce   # Not valid, use -i --force instead

Available Aliases

Here's a list of available commands and their aliases:

Default Command (Run)

The default command runs when you don't specify a command (just deeplint).

Short Aliases:

  • r: Run DeepLint on staged changes

  • run: Run DeepLint on staged changes

deeplint r
deeplint run

You can also use the dash prefix for backward compatibility:

deeplint -r
deeplint -run

Init Command

The init command initializes DeepLint in your project.

Full-Word Aliases:

  • initialize: Initialize DeepLint in the current project

  • create-config: Create a DeepLint configuration file

Short Aliases:

  • i: Initialize DeepLint in the current project

deeplint init
deeplint initialize
deeplint create-config
deeplint i

You can also use the dash prefix for backward compatibility:

deeplint -i

Help Command

The help command displays help information for DeepLint commands.

Full-Word Aliases:

  • ?: Display help information

Short Aliases:

  • h: Display help information

deeplint help
deeplint ?
deeplint h

You can also use the dash prefix for backward compatibility:

deeplint -h

Combining Aliases with Options

You can combine aliases with command options:

deeplint i --force

Or with the dash prefix for backward compatibility:

deeplint -i --force

Both are equivalent to:

deeplint init --force

Finding Command Aliases

To see the aliases for a specific command, use the help command:

deeplint help <command>

For example:

deeplint help init

This will display information about the command, including its aliases.

Best Practices

  • Use short aliases for frequent operations: Short aliases are designed for commands you use often

  • Use full-word aliases for clarity in scripts: When writing scripts or documentation, consider using full-word aliases for better readability

  • Learn the aliases for your most-used commands: Memorizing a few key aliases can significantly speed up your workflow

Next Steps

Now that you understand how to use command aliases, you can:

  1. Try using aliases for your most common DeepLint operations

  2. Learn more about DeepLint's help system

  3. Explore verbose mode for more detailed output

For more information about DeepLint's commands, see the help command:

deeplint help

Last updated