Skip to main content
ScryCLI uses AI to understand your natural language commands and help you work with your code. While it focuses primarily on file operations, you can use the AI’s conversational abilities to discuss and understand your code.

How ScryCLI Works with Code

ScryCLI’s AI engine interprets your natural language prompts and can:
  1. Read files from your project for analysis
  2. Answer questions about code structure and patterns
  3. Generate new code based on your requirements
  4. Modify existing files with improvements
  5. Create structured responses about your codebase
The system uses the file tree context to understand your project structure and provide accurate responses.

Reading and Understanding Code

1

Start ScryCLI

Launch the CLI tool in your project directory:
scrycli
The tool will automatically detect your project structure and generate a file tree for context.
2

Ask About Your Code

Use natural language to ask ScryCLI about your code:
> Read the App.jsx file and explain what it does
Or ask specific questions:
> What does the authentication logic in src/lib/auth.ts do?
3

Review AI Response

The AI will read the file and provide a conversational explanation. While you may see structured JSON for file operations, analysis questions typically get conversational responses.

Implemented File Operations

ScryCLI supports these core file operations:
  • read_file - Read and examine file contents
  • write_file - Modify or overwrite existing files
  • create_file - Create new files with content
  • delete_file - Remove files from your project
ScryCLI automatically ignores common directories like node_modules, .git, dist, build, and .next when generating the file tree context.

Working with Your Codebase

Reading Files

Ask the AI to read specific files:
# Read a single file
> Read the useChat hook implementation

# Read and explain
> Show me what's in src/config/configManage.ts and explain how it works
The AI will use the read_file action to access the file and provide information about it.

Understanding Project Structure

ScryCLI automatically includes your project structure in every request:
File Tree:
src/
  bin/
  config/
    configManage.ts
  hooks/
    useChat.ts
    useToolExecutor.ts
  lib/
    auth.ts
    isModelSelected.ts
  model/
    openRouter.ts
    systemPrompt.ts
  tools/
    createFile.ts
    deleteFile.ts
    readFile.ts
    writeFile.ts
    getFileTree.ts
This context helps the AI understand file relationships and dependencies.

Asking Code Questions

You can ask general questions about your code:
# Understand implementations
> How does the authentication system work?

# Get suggestions
> What improvements could be made to the error handling in useToolExecutor?

# Understand relationships
> How do the hooks integrate with the file operations?
The AI will provide conversational responses based on the file tree context and any files it reads.
For best results, be specific about what you want to know. Instead of “explain the code,” try “explain how the JWT verification works in the auth module.”

Example Workflows

Code Understanding Workflow

# Step 1: Get overview
> Give me an overview of the hooks directory

# Step 2: Dive deeper
> Read useChat.ts and explain what the send function does

# Step 3: Understand integration
> How does useChat integrate with the OpenRouter API?

Code Modification Workflow

# Step 1: Read existing code
> Show me the current implementation of useToolExecutor

# Step 2: Request changes
> Update useToolExecutor to add better error messages

# Step 3: Verify changes
> Read the updated file and confirm the changes were made

What ScryCLI Can and Cannot Do

✅ What Works

  • File operations: Read, write, create, and delete files
  • Code generation: Create new files with complete, functional code
  • File modification: Update existing files based on your instructions
  • Conversational assistance: Answer questions about your code based on file tree context
  • Context awareness: Understand project structure and file relationships

❌ Current Limitations

  • No built-in code search: Can’t search across multiple files for patterns (must request file reads explicitly)
  • No automated error detection: Doesn’t scan for errors automatically (you must ask specific questions)
  • No static analysis: Doesn’t perform automated linting or type checking
  • Limited multi-file analysis: Works best with specific file requests rather than project-wide scans
The system prompt (src/model/systemPrompt.ts) references actions like explain_code and search_code, but these are not currently implemented in the tool executor. The AI may mention these actions, but only read_file, write_file, create_file, and delete_file are actually executed.

Best Practices

  1. Be Specific: Provide clear, specific prompts
    • Good: “Read src/hooks/useChat.ts and explain the error handling”
    • Bad: “Tell me about the hooks”
  2. Use File Paths: Reference exact file paths when possible
    • Good: “Check src/config/configManage.ts”
    • Bad: “Check the config file”
  3. Iterative Approach: Start with broad questions, then drill down
    • First: “What files are in the hooks directory?”
    • Then: “Read useToolExecutor.ts and explain how it works”
  4. Request File Reads: Explicitly ask to read files when you need code details
    • “Read the authentication module before we modify it”

Common Commands

# Understanding code
> Read package.json and tell me what this project does

# Getting explanations
> Explain how the SelectModel component works

# Asking for improvements
> How could we improve error handling in the auth module?

# Understanding structure
> What's the relationship between the tools and hooks directories?

# Preparing for changes
> Read the current implementation before we add new features

Next Steps

Fixing Errors

Learn how to modify code and fix issues

File Management

Master file operations through natural language