CLI Reference

Complete reference guide for all nokey.ai commands and options

Command Overview

nokey provides a simple yet powerful command-line interface to manage AI access to your secrets.

Commands

nokey logs monitoring

Display the audit log of all AI access requests.

nokey logs [options]

Options:

  • --since <time> - Show logs since a specific time (e.g., "1h", "24h", "2024-01-01")
  • --filter <pattern> - Filter logs by file pattern or keyword
  • --json - Output logs in JSON format

Example:

nokey logs --since 1h --filter .env
nokey status info

Show the current status of nokey protection.

nokey status

Displays whether nokey is active, which files are protected, and recent activity summary.

nokey config configuration

Manage nokey configuration settings.

nokey config [command]

Subcommands:

  • show - Display current configuration
  • set <key> <value> - Set a configuration value
  • reset - Reset to default configuration

Examples:

nokey config show nokey config set notify true
nokey allow permissions

Temporarily allow AI access to specific files or patterns.

nokey allow <pattern> [options]

Options:

  • --duration <time> - Allow for specific duration (e.g., "1h", "30m")
  • --permanent - Allow permanently (until manually revoked)

Example:

nokey allow .env.development --duration 1h
nokey deny permissions

Explicitly deny AI access to specific files or patterns.

nokey deny <pattern>

Example:

nokey deny secrets/*.key
nokey init setup

Initialize nokey in the current project directory.

nokey init [options]

Creates a .nokey.yaml configuration file with project-specific settings.

nokey --version info

Display the installed version of nokey.

nokey --version
nokey --help info

Display help information for all commands.

nokey --help
nokey <command> --help

Add --help to any command to see detailed usage information.

Global Flags

  • --verbose - Enable verbose output for debugging
  • --quiet - Suppress non-error output
  • --config <path> - Use a custom configuration file

Need More Details?

Check out the Configuration Guide for advanced usage and customization options.