<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cli(ctx, pattern):
 """Searches for a saved command."""

    matches = utils.grep_commands(pattern)
    if matches:
        for cmd, desc in matches:
            click.secho("$ {} :: {}".format(cmd, desc), fg='green')
    elif matches == []:
        click.echo('No saved commands matches the pattern {}'.format(pattern))
    else:
        click.echo('No commands to show. Add one by `keep new`.')